Commit 5a23096
fix(objectql,service-automation,runtime): the card's named warnings and endpoint hints state each decision in words instead of a tracker number (#20738)
Part of #20513
Clause-②: no
The card's named producers are 11 author- and operator-shown messages in
4 files. Each one pointed the reader at a tracker number for the reason
behind it. Each now says what the cited decision was, in the sentence
being read (form D, as the migration-entry rewrite applied it). **Text
only:** no error `code`, field name, HTTP status or behaviour changes.
Every changed line in the four source files is a string-literal line.
This PR covers the card's first step only. The rest of the family is the
maintainer's burn-down decision, and the census below is the input to
it, so 20513 stays open.
## What each sentence now says
| Where (about) | Cited | The sentence now says |
|---|---|---|
| objectql `engine.ts` data.record.* warning (7077) | 4639, 4626 | It
refuses to fabricate a per-record event with an empty `recordId`. A
predicate (`multi: true`) write publishes its own `data.records.*` event
carrying the affected-row count, so reaching this line is a driver
defect. |
| objectql `engine.ts` data.records.* warning (7171) | 4639 | A bulk
event states only the count (no records, no predicate), so a driver
result that is not a count publishes nothing. |
| service-automation `engine.ts` resumeAuthority warning (3276) | 3801,
5561, 3823 | The resume-authority gate refuses this type's pauses. An
undeclared `resumeAuthority` resolves to `'service'`, fail-closed,
because guessing `'any'` is how a raw resume once walked past an
approval decision no service had recorded. |
| same file, resume refusal log line (6268) and error text (6275) | 5561
| An undeclared `resumeAuthority` resolves to `'service'`, fail-closed.
|
| same file, undeclared-suspension refusal (6410) | 5561 | An undeclared
`resumeAuthority` resolves to `'service'`, which the generic route
refuses. |
| runtime `api-endpoint-step.ts` no-policy-context hint (245) | 5040 E5b
| Execution is reachable only on the far side of the policy chain, so
the composed runtime always threads the policy context. |
| same file, no-execution-wiring hint (264) | 5040 E5b | The composed
runtime supplies the execution wiring together with the policy context;
only a hand-mounted step can omit it. |
| same file, `NOT_IMPLEMENTED` message (346) | 5040 | No wiring was
supplied, so nothing was executed. |
| runtime `api-mapping.ts` path hint (233) | 5040 E7 | The publish gate
rejects the same shapes, so a declaration that reaches this check was
stored without passing that gate. |
| same file, `transform` refusal (265) | 5040 §3.4, E7 | The sentence
already said `transform` is rejected at publish rather than parsed and
ignored; only the citation goes. |
The integration pin in
`dispatcher-plugin.endpoint-fallback.integration.test.ts` asserts
`not.toContain('without a policy context')` and `not.toContain('no
wiring')`. Both phrases are kept verbatim, so that negative pin still
means what it meant.
## Pins re-pinned: 6, one more than the order counted
Each of these now asserts the words that carry the decision instead of
the number:
- `resume-authority-declaration.test.ts` 84-85
- `engine-data-events.test.ts` 374
- `api-endpoint-step.test.ts` 143, 232
- `api-mapping.test.ts` 230: a `mustMention` fragment list. The
matcher-line grep behind the order's count of 5 cannot see it. It pins
the `transform` refusal, one of the 11 named messages, so it had to
move. The first full runtime run showed it red; after the re-pin it is
green.
## Ledger burn-down
`scripts/doc-authoring-prose-id.baseline.json` was regenerated with
`node scripts/check-doc-authoring.mjs --census-ledger`. It was generated
into a scratch file first, so the growth refusal ran against the
checked-in baseline, and then copied into place. 14 id occurrences leave
in 7 (file, id) pairs, and 2 files leave the ledger entirely. Pairs go
618 to 611, occurrences 945 to 931, files 229 to 227, and the gate's
printed "pinned site(s)" (id-bearing string literals) 808 to 794.
Nothing else in the file moved. `pnpm check:doc-authoring` is green on
it.
## Census: the input to the maintainer's burn-down decision
**Instrument.** A TypeScript-compiler AST walk over every non-test
`src/` file of every public package under `packages/` (69 manifests,
2,582 files). It works per message:
- **Folding.** Before matching, each message is folded into one text: a
maximal chain of pieces joined by `+`, a template literal, parentheses,
and a string array whose parent is `.join(sep)`. A string nested inside
a span, or inside a call that is an operand of the chain, is folded into
the outermost message.
- **No comments.** A non-string operand renders only its string leaves,
never raw source, so comments are never read.
- **Match.** A hash plus 3-5 digits, not after an ampersand, a hash or a
digit, and not followed by an alphanumeric. Word forms (issue, PR or
card plus a number) were scanned too: 0 hits.
- **Classification.** By syntactic context: logger calls, thrown errors,
envelope fields (message, hint, reason, error, detail(s) and the like),
error-factory calls, and refusal prose built in a const or return.
Outside the population: test-facing strings shipped under `src/`
(testkits, bench, contract-suite case labels), metadata text
(description, help or label, and generated translations), and one
excluded false positive (CSS colours in the CLI's inline HTML).
**Controls.**
- **Lit, single line:** objectql `engine.ts` 7077-7080 gives one logger
message citing 4639 and 4626.
- **Lit, multi-line:** the service-automation warning at 3276-3283 is
one `+` chain over 8 lines and is read as ONE message citing 3801, 5561
and 3823.
- **Dark:** the service-automation docblock at 3231 gives 0 hits, and so
does a `//` comment interleaved inside a `+` chain in lint's
`validate-action-body-writes.ts` (426). Across the whole tree, 1,125 hit
lines were checked and 0 fall on a comment line.
- **Independent cross-check** against the gate's own ledger: on all 211
files both read, per-file id-occurrence counts are identical. The totals
reconcile exactly by scope.
**The doc-authoring ledger finding.** The card says
`check:doc-authoring` does not read these positions. It does. Its
ledgered sibling-package leg, added in 3f54efd, holds every one of
them in a shrink-only baseline. It exits 0 because they are baselined,
not because they are unread. So the gate's reach does not need to move:
any burn-down is monotone, and each burn-down PR regenerates that one
shared file. That makes parallel stages serialise on it.
**Totals** (tree 36d043b, before this PR):
- 743 population messages cite 554 distinct ids in 39 of the 69 public
packages.
- The engine lane holds 201 of them, citing 128 ids: 145 author-facing
refusal or prescription prose and 56 log lines.
- Outside the population: 84 test-facing strings, 75 metadata texts and
1 excluded false positive.
This PR removes 11 messages. On the merged head the census reads 892
messages with an id where it read 903, with 0 new.
Per package (bold = this lane; "id occurrences" counts the ids the
population messages cite):
| Package | Messages | logger | thrown | envelope | factory | prose | id
occurrences | test-facing | metadata text |
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
| spec | 175 | 0 | 0 | 26 | 0 | 149 | 373 | 45 | 3 |
| lint | 83 | 0 | 1 | 63 | 0 | 19 | 104 | 0 | 0 |
| runtime | 53 | 7 | 2 | 9 | 1 | 34 | 72 | 0 | 0 |
| **drivers/driver-sql** (lane) | 52 | 15 | 6 | 5 | 20 | 6 | 66 | 7 | 0
|
| **metadata-protocol** (lane) | 40 | 19 | 5 | 3 | 11 | 2 | 49 | 1 | 0 |
| **objectql** (lane) | 40 | 14 | 6 | 0 | 3 | 17 | 44 | 3 | 2 |
| plugins/plugin-security | 34 | 20 | 1 | 3 | 2 | 8 | 39 | 0 | 4 |
| services/service-automation | 28 | 12 | 2 | 2 | 2 | 10 | 34 | 0 | 5 |
| plugins/plugin-auth | 27 | 10 | 3 | 0 | 2 | 12 | 28 | 0 | 0 |
| **drivers/driver-turso** (lane) | 24 | 3 | 6 | 0 | 12 | 3 | 44 | 0 | 0
|
| rest | 23 | 1 | 0 | 1 | 0 | 21 | 33 | 0 | 1 |
| plugins/plugin-webhooks | 20 | 5 | 5 | 0 | 0 | 10 | 33 | 0 | 0 |
| cli | 19 | 0 | 2 | 2 | 1 | 14 | 22 | 0 | 2 |
| services/service-analytics | 15 | 1 | 3 | 0 | 9 | 2 | 34 | 0 | 0 |
| **core** (lane) | 12 | 0 | 2 | 3 | 2 | 5 | 13 | 0 | 0 |
| **drivers/driver-mongodb** (lane) | 10 | 0 | 5 | 0 | 5 | 0 | 12 | 3 |
0 |
| plugins/plugin-approvals | 10 | 8 | 1 | 0 | 0 | 1 | 10 | 0 | 15 |
| **drivers/driver-memory** (lane) | 9 | 0 | 1 | 0 | 8 | 0 | 12 | 0 | 0
|
| plugins/plugin-sharing | 7 | 3 | 2 | 0 | 0 | 2 | 7 | 0 | 0 |
| verify | 7 | 0 | 2 | 2 | 0 | 3 | 8 | 0 | 2 |
| cloud-connection | 6 | 0 | 0 | 0 | 0 | 6 | 6 | 0 | 0 |
| **metadata** (lane) | 6 | 3 | 1 | 0 | 0 | 2 | 6 | 0 | 0 |
| services/service-datasource | 6 | 0 | 0 | 1 | 0 | 5 | 9 | 0 | 0 |
| services/service-messaging | 6 | 0 | 4 | 0 | 0 | 2 | 8 | 0 | 15 |
| **metadata-core** (lane) | 4 | 0 | 0 | 0 | 0 | 4 | 4 | 25 | 0 |
| **platform-objects** (lane) | 3 | 2 | 0 | 1 | 0 | 0 | 3 | 0 | 17 |
| plugins/plugin-dev | 3 | 1 | 2 | 0 | 0 | 0 | 3 | 0 | 0 |
| services/service-storage | 3 | 1 | 0 | 0 | 0 | 2 | 4 | 0 | 0 |
| connectors/connector-mcp | 2 | 0 | 2 | 0 | 0 | 0 | 2 | 0 | 0 |
| plugins/plugin-email | 2 | 1 | 1 | 0 | 0 | 0 | 2 | 0 | 4 |
| services/service-i18n | 2 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 |
| services/service-knowledge | 2 | 2 | 0 | 0 | 0 | 0 | 3 | 0 | 0 |
| services/service-queue | 2 | 1 | 1 | 0 | 0 | 0 | 2 | 0 | 0 |
| services/service-sms | 2 | 1 | 0 | 0 | 0 | 1 | 2 | 0 | 0 |
| types | 2 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 |
| **formula** (lane) | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 |
| plugins/plugin-audit | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 5 |
| plugins/plugin-hono-server | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
| triggers/trigger-record-change | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
The full per-hit list (file, line and cited ids for all 903 messages) is
in the os-dev-report comment on the card (5900801368).
## Verification
Final head `f636206f33`: this branch plus a merge of `main` at
1940afd. That merge touched none of this PR's files.
- **Build.** `turbo run build` over the closure of objectql,
service-automation and runtime: 31/31 tasks. Then the whole workspace
except docs: 72/72 tasks.
- **Built output.** The replaced fragments appear in neither the ESM nor
the CJS bundle of the three packages. The new sentences appear in both.
- **Tests, run before the merge:**
- `@objectstack/service-automation`: 155 files, 1,942 tests passed.
- `@objectstack/runtime`: 289 of 290 files passed. The red one was the
api-mapping pin above; after its re-pin, `api-mapping.test.ts` and
`api-endpoint-step.test.ts` pass 59/59.
- `@objectstack/objectql`: 336 files, 6,679 tests passed.
- After the merge, the closure was rebuilt, and the incoming objectql
test file plus `engine-data-events.test.ts` passed 50/50. That is
AGENTS.md's scoped re-check: the incoming commits touch spec and
metadata-protocol, not these packages or this behaviour.
- **Typecheck.** `typecheck` for the three packages exits 0 each; each
includes `check:test-typecheck`.
- **Derived gates.** `node scripts/pm/dispatch-gates.mjs --commands` on
`f636206f33` names 75 commands, and all 75 exit 0.
`check:dual-build-cjs-loads` first answered PREREQUISITE NOT MET on the
partial build. It was re-run after the full build: exit 0, 104 entries
measured. `--ran` reconciliation: 75 derived, 75 run, 0 NOT-MEASURED, 0
UNRUN.
- **Lint, narrowed.** `eslint --no-inline-config --format json` over the
8 touched TypeScript files: 8 files reported, 0 errors, 0 warnings, on
`f636206f33`. The narrowing is safe because `eslint.config.mjs` enables
no type-aware linting (no `parserOptions.project` or `projectService`
anywhere), so this diff cannot move any untouched file's verdict. The
repo-wide `pnpm lint` is CI's.
- **NOT MEASURED here (CI's):** the Test Core shards, Temporal
Conformance, the Dogfood jobs, Build Core's own steps and the workspace
type-check lanes.
## Acceptance notes
- **Other pins, other producers.** `service-knowledge`'s
`event-sync-data-events.test.ts` pins service-knowledge's OWN warning
(`knowledge-service-plugin.ts`, ids 4639 and 4672), not the objectql
string. It is untouched here. Runtime also has 5040 citations beyond
this order's five sites: `endpoint-executor.ts` 255 (pinned by
`endpoint-executor.test.ts` 212) and `route-ledger.ts` 574. Both are
census hits left for the burn-down decision.
- **Comments untouched.** Comments and docblocks citing the same numbers
in these files are not runtime strings and are not changed here.
- **A correction to the round-1 report.** It called the gate's printed
"808 pinned site(s)" file-id pairs. That figure counts id-bearing string
literals; the ledger's pairs were 618.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01DEvba2nBuD4tWzfq8r8NFY)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent b785c3b commit 5a23096
10 files changed
Lines changed: 62 additions & 36 deletions
File tree
- .changeset
- packages
- objectql/src
- runtime/src
- services/service-automation/src
- scripts
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
| 374 | + | |
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7075 | 7075 | | |
7076 | 7076 | | |
7077 | 7077 | | |
7078 | | - | |
7079 | | - | |
7080 | | - | |
| 7078 | + | |
| 7079 | + | |
| 7080 | + | |
| 7081 | + | |
7081 | 7082 | | |
7082 | 7083 | | |
7083 | 7084 | | |
| |||
7169 | 7170 | | |
7170 | 7171 | | |
7171 | 7172 | | |
7172 | | - | |
7173 | | - | |
| 7173 | + | |
| 7174 | + | |
7174 | 7175 | | |
7175 | 7176 | | |
7176 | 7177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| |||
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
266 | | - | |
| 267 | + | |
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
| |||
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
347 | | - | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
| 231 | + | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
| 236 | + | |
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| |||
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
266 | | - | |
267 | | - | |
| 267 | + | |
| 268 | + | |
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3274 | 3274 | | |
3275 | 3275 | | |
3276 | 3276 | | |
3277 | | - | |
3278 | | - | |
3279 | | - | |
| 3277 | + | |
| 3278 | + | |
| 3279 | + | |
| 3280 | + | |
3280 | 3281 | | |
3281 | 3282 | | |
3282 | 3283 | | |
| |||
6266 | 6267 | | |
6267 | 6268 | | |
6268 | 6269 | | |
6269 | | - | |
| 6270 | + | |
| 6271 | + | |
6270 | 6272 | | |
6271 | 6273 | | |
6272 | 6274 | | |
6273 | 6275 | | |
6274 | 6276 | | |
6275 | 6277 | | |
6276 | | - | |
| 6278 | + | |
| 6279 | + | |
6277 | 6280 | | |
6278 | 6281 | | |
6279 | 6282 | | |
| |||
6409 | 6412 | | |
6410 | 6413 | | |
6411 | 6414 | | |
6412 | | - | |
| 6415 | + | |
| 6416 | + | |
6413 | 6417 | | |
6414 | 6418 | | |
6415 | 6419 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | | - | |
413 | 411 | | |
414 | 412 | | |
415 | 413 | | |
| |||
835 | 833 | | |
836 | 834 | | |
837 | 835 | | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | 836 | | |
845 | 837 | | |
846 | 838 | | |
| |||
957 | 949 | | |
958 | 950 | | |
959 | 951 | | |
960 | | - | |
961 | | - | |
962 | 952 | | |
963 | 953 | | |
964 | 954 | | |
965 | | - | |
966 | | - | |
| 955 | + | |
967 | 956 | | |
968 | 957 | | |
969 | 958 | | |
| |||
0 commit comments