You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spec near-miss suggester: the max(2, len/3) rename budget is copied in four more spec files, so short or retired keys still get unrelated guesses (e.g. defaultSort → defaults) (follow-up to #33345) #35420
area:builddomain:specDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p2Medium: important, M3
Filing gate: ② out-of-scope finding from the #33345 os-dev report (comment 7003316873), routed by the L1-a ACCEPT of PR #35397 (7004079215, out of scope) as one card nested under #33345. ⛔ Not a claim; triage sets lane and grade (L1 suggests p3).
What the author sees
PR #35397 fixed the unknown-key suggester in packages/spec/src/shared/suggestions.zod.ts: a key of 5 characters or fewer is offered a rename only at one edit (adjacent swap counted as one), so aria is no longer answered areas. The same max(2, len/3) budget is copied in four other places that PR does not touch, so those doors still misguess:
packages/spec/src/data/object.zod.ts (suggestKey)
packages/spec/src/data/seed.zod.ts
packages/spec/src/data/field-value.zod.ts
packages/spec/src/data/default-value-shape.ts
Also: the retired form key defaultSort is answered "Did you mean defaultSort → defaults?" (distance 3, budget 3). Measured through the schema and flattener only, not through a public door.
Fix direction
One shared budget rule (the one #35397 settled), used by every suggester; pins at each door. A retired key should get its prescription, not a rename guess.
Nits that may ride along
The header of packages/rest/src/rest-meta-packaged-action-permission-refusal.test.ts and the retired checklist item access-security.packaged-permission-set-lifecycle still describe the retired data-door clone route POST /api/v1/data/sys_permission_set. Comment and retired-item text only.
Dedupe: issue search rename budget suggester, did you mean retired key defaultSort, near-miss suggester short key → only #33345.
Add to scope · 2026-11-19T08:43Z: nit N1 of the CONTRACT_REVIEW_TIER record on PR #35397 (7004137637). The strictUnknownKeyError docblock in packages/spec/src/shared/suggestions.zod.ts still says its fallback matches suggestKey in object.zod.ts. After #35397 the two differ on keys of 5 characters or fewer. Unifying the budget (this card's fix) makes the sentence true again; otherwise reword it.
Triage: lands in domain:spec · pm:queue; rationale: area:build · Bug · Impeded (four more spec suggesters still offer unrelated renames for short or retired keys, e.g. defaultSort → defaults) · builders, often · read from the #33345 report → p2.
Claim: PM loop round 1
Session: session_01L6bhgUZrkMKgGrXXe8zPGq
Account: os-sales
Branch: claude/issue-35420-suggester-budget
Worktree: objectstack-issue-35420
Domain: domain:spec
Seat: repo:objectstack#1
Area: b1-C
File surface: packages/spec/src/shared/suggestions.zod.ts (the one budget rule #35397 settled, and the strictUnknownKeyError docblock of comment 7004171725), the four copies packages/spec/src/data/{object.zod.ts,seed.zod.ts,field-value.zod.ts,default-value-shape.ts}, their tests; the card's two text-only nits (packages/rest/src/rest-meta-packaged-action-permission-refusal.test.ts header, the retired checklist item access-security.packaged-permission-set-lifecycle under docs/qa/platform-checklist/**); .changeset/
Container & model: S, mode:subagent, model: default — dispatch-gates --tier: "no path-derived mandate"; a packages/spec/src change owes an isolated CONTRACT_REVIEW_TIER L2 before the queue, effort: medium
Clause-②: no
Metadata-protocol: none
Responsibility: objectstack — packages/spec unknown-key suggesters copy the max(2, len/3) budget in four files that #35397 did not touch | the shared suggester in suggestions.zod.ts already holds the settled rule | metadata authors who typo or use a retired short key (e.g. defaultSort → defaults)
Thread-read: 7004373786
Premise: holds — Math.max(2, Math.floor(key.length / 3)) stands in each of the four files on origin/main (e.g. packages/spec/src/data/default-value-shape.ts:125); #35397 merged 7a3f86c
Serial constraints cleared: none — no open PR or live claim named on the five spec files at claim time; overlap-check runs before push
Pre-claim lane: packages/spec/src/** (named by the card) → b1-C root; stays in this lane under area-lease.md 留道
Pre-claim deps: parent #33345 closed; #35397 merged (7a3f86c)
Prior rulings read: spec,near-miss,suggester,rename,budget,copied,four,files,short,retired,keys,unrelated (+4 more) → 198 hits; ADR-0061 D2, ADR-0150 D9, ADR-0076 D3, ADR-0087 D3, ADR-0145 D2, ADR-0005 Decision §11, ADR-0005 Decision §5, ADR-0019 D4, ADR-0076 D9 (keyword hits; the settled rule is #35397's, cited by the card); thread: none; repo: objectstack-ai/objectstack
Fold answer: serial — #35512 is also packages/spec/src but a different mechanism (hook text call shapes), so it does not fold.
{
"issue": 35420,
"status": "needs_decision",
"branch": "claude/issue-35420-suggester-budget",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35639",
"session": "session_01L6bhgUZrkMKgGrXXe8zPGq",
"premise_still_valid": true,
"head": "b8bdbfba",
"summary": "The settled budget rule (max(2, floor(len/3)); at 5 characters or fewer only a one-edit candidate, adjacent swap = 1; nothing for an empty key) now lives once as suggestRename in a new leaf packages/spec/src/shared/rename-guess.ts (not re-exported). strictUnknownKeyError, ObjectSchema.create() and defineSeed all call it; object.zod.ts lost its private editDistance/suggestKey, seed.zod.ts its inline budget. Premise partly corrected: field-value.zod.ts and default-value-shape.ts held no code copy (they already read the rule through strictObject), only comment prose restating the old budget, now reworded; the strictUnknownKeyError docblock (comment 7004171725) now names suggestRename. levenshteinDistance/findClosestMatches moved into the leaf and are re-exported unchanged (api-surface green, export-origins regenerated). The retired-key half is not implemented: measured at the /meta PUT door, the rename guess wins for form defaultSort, and stopping it needs a ruling (open_questions). PR therefore says Part of #35420.",
"tests": "head b8bdbfba: pnpm --filter @objectstack/spec build && check:generated to GEN_EXIT=0; pnpm --filter @objectstack/spec typecheck to TC_EXIT=0; pnpm --filter @objectstack/spec test to Test Files 858 passed (858), Tests 27414 passed | 1 todo, TEST_EXIT=0 (VERDICT batch-last-exit 0, each part's exit echoed). rest: vitest run src/rest-meta-packaged-action-permission-refusal.test.ts to 1 file, 11 tests passed (VERDICT command-exit 0). Ablation: ablation-replace.mjs on rename-guess.ts anchor on the screen's 'at most 1' comparison (replaced by 'at most 2') x1 to x0, blob 06f10119 to 9292b58e; six harness files to 8 failed | 367 passed, 6 files red (object, define-seed-record-keys, field-value, default-value-shape, strict-object, suggestions); restored, blob == HEAD blob 06f10119, git diff HEAD empty. Src-resolved tests (relative imports), so no dist preflight applies. Door probe (not committed): in-process RestServer PUT /api/v1/meta/:type/:name over real ObjectStackProtocolImplementation + SchemaRegistry, built dists: form view with defaultSort to 422 INVALID_METADATA, message contains 'Did you mean `defaultSort` → `defaults`?'; with aria to no guess.",
"gates": "local, head b8bdbfba: node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands to 96 commands; ran all, 93 exit 0, 3 exit 3 PREREQUISITE NOT MET (check-plugin-teardown-shape --self-test: shallow clone cannot reach pinned fixture commit; check:dual-build-cjs-loads and check:published-readme-exports: need full-workspace dist) = NOT MEASURED; --ran reconciliation to '96 derived famil(ies) accounted for — 93 run, 3 NOT-MEASURED' exit 0. node scripts/check-nul-bytes.mjs to exit 0. overlap-check.mjs to VERDICT clean exit 0 (origin/main 6d86b43b and #35583 merge cleanly). CI on PR head b8bdbfba at report time: 24 check-runs, 16 in_progress, 3 queued, 5 skipped, 0 failed to in_progress.",
"line_budget": "n/a: no skills/** or ratcheted ledger touched; diff 15 files, +394 / -203 (597 changed lines, under the 3000 threshold)",
"files_changed": [
".changeset/35420-one-rename-rule.md",
"packages/rest/src/rest-meta-packaged-action-permission-refusal.test.ts",
"packages/spec/export-origins/root.json",
"packages/spec/export-origins/shared.json",
"packages/spec/src/data/default-value-shape.test.ts",
"packages/spec/src/data/default-value-shape.ts",
"packages/spec/src/data/define-seed-record-keys.test.ts",
"packages/spec/src/data/field-value.test.ts",
"packages/spec/src/data/field-value.zod.ts",
"packages/spec/src/data/object.test.ts",
"packages/spec/src/data/object.zod.ts",
"packages/spec/src/data/seed.zod.ts",
"packages/spec/src/shared/rename-guess.ts",
"packages/spec/src/shared/suggestions.test.ts",
"packages/spec/src/shared/suggestions.zod.ts"
],
"deviations": [
"PR line 3 says 'Part of #35420', not the 'Fixes #35420' the dispatch asked for: os-dev.md forbids Fixes on a card headed for the decision box, and the retired-key half is open.",
"New file packages/spec/src/shared/rename-guess.ts and the regenerated packages/spec/export-origins/{root,shared}.json are outside the claim's file surface. The leaf lets data/*.zod.ts share the rule with no import cycle and no new published export (exporting it from suggestions.zod.ts would add to api-surface through shared/index.ts). The seat should add both to the file surface.",
"Checklist nit not edited: access-security.packaged-permission-set-lifecycle is retired, its title already says 'at the retired sys_permission_set data door' and its retiredReason already names POST /api/v1/security/permission-sets/:name/clone.",
"The public-door reading came from the real /meta PUT route handler in an in-process RestServer (the packages/rest test harness shape), not a booted HTTP server.",
"Commit trailers are AGENTS.md's model-free pair (Claude-Session + Co-authored-by: Claude). The harness reminder's model-naming Co-Authored-By was not used.",
"Prose in packages/spec/src/data/object.test.ts (the #4990 suggestKey comment) was reworded because the function it named is gone.",
"Dispatch-word conflict: the four-copies assumption. Only object.zod.ts and seed.zod.ts held code copies; field-value.zod.ts and default-value-shape.ts held comment copies only."
],
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 relay strokes: pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /repos/objectstack-ai/objectstack/issues/35639/assignees os-sales, run 44605814290, read-back identical 8060 bytes) and this os-dev-report comment (post-stamped, POST /repos/objectstack-ai/objectstack/issues/35420/comments); git push x6 (not REST)",
"open_questions": [
{
"question": "Should a key whose retirement kit has aged out (e.g. form view defaultSort, answered 'Did you mean defaultSort → defaults?' at the /meta PUT door today) still get a spelling-based rename guess?",
"options": [
"A: Keep the ruled behaviour (ADR-0087 2026-10-26 amendment: an aged-out key is an ordinary unknown key that gets the nearest declared spelling plus the upgrade-guide pointer). Close the card's retired-key sentence as working as ruled. Cost: none. The misleading guess stays.",
"B: Add a names-only ledger of aged-out keys per surface, generated from the upgrade-guide registry history, so the strict refusal drops the rename guess for those spellings and says the key was retired. Cost: about 1-2 days plus an ADR-0087 amendment (Tier H) that partly reverses 'offers the nearest declared spelling'.",
"C: A shape heuristic: drop a guess that only cuts a trailing camelCase word (defaultSort → defaults). Cost: small. Speculative, and it can suppress real truncation typos."
],
"recommendation": "Provisional A, because it is the recorded ruling and B reopens it. The dispatch supplied no decision axes (pm-dispatch SKILL.md 〈升级与决策〉), so no per-axis analysis was done; the seat should supply the axes."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: #35420 (same family, if the seat widens the card) · noted, not filed — further copies of the rename budget outside this diff: packages/formula/src/validate.ts:1497 (nearest), packages/lint/src/object-graph.ts:809, packages/cli/src/utils/collect-docs.ts:974 (all max(2, floor(len/3)) without the short-key screen); in packages/spec, data/authoring-key-lint.ts:270 passes a flat distance of 3 to findClosestMatches. No reach: measured, so not fileable as a/b/c. Dedupe words: rename budget copy, len/3 suggester, flat distance 3 suggestion",
"carrier: none · noted, not filed — packages/spec/src/kernel/manifest.zod.ts:84 comment says that without the hosts alias the fallback answers hosts → hooks; since the short-key screen it would answer nothing, so the alias now fills a gap. Prose only."
]
}
Claim amendment · 2026-11-19T20:13Z · claim 7019077753 · PR #35639 head b8bdbfb
File surface adds: packages/spec/src/shared/rename-guess.ts (new leaf module holding the one rule, not re-exported by shared/index.ts, so no new public name) and the regenerated packages/spec/export-origins/{root,shared}.json (two existing exports moved home, re-exported unchanged). The checklist nit was not edited: the retired item's text already names the clone route.
Premise correction (os-dev-report 7020942306): only object.zod.ts and seed.zod.ts held code copies; field-value.zod.ts and default-value-shape.ts held comment copies only.
Open half — the retired-key sentence ("A retired key should get its prescription, not a rename guess"): measured at the /meta PUT door, form defaultSort is answered "Did you mean defaultSort → defaults?". Its retirement kit has aged out, and ADR-0087's 2026-10-26 amendment (#25767 ruling D2 = A) says "a removed key is refused as a strict unknown key whose refusal names the protocol upgrade guide". Routed to the seat; the PR says Part of #35420 until it is settled.
Claim amendment 2 · 2026-11-19T20:48Z · claim 7019077753 · PR #35639 head b8bdbfb
File surface adds: packages/spec/src/data/authoring-key-lint.ts (formatUnknownAuthoringKey, read by defineStack and the CLI: its fallback findClosestMatches(key, candidates, 3, 1) uses a flat distance of 3 with no short-key screen, the card's defect in its strongest form) and its pin in packages/spec/src/data/authoring-key-lint.test.ts. Folded into PR #35639 on L1-a's note 7021796771 (same package, same mechanism; Sales 17:00Z fold rule). Suggestion text only; no key is accepted or refused differently.
The retired-key half is settled by the standing ADR-0087 2026-10-26 amendment (#25767 D2 = A): no code change. The copies outside packages/spec (formula/src/validate.ts, lint/src/object-graph.ts, cli/src/utils/collect-docs.ts) are listed in the PR's out-of-scope section and left to the seat.
{
"issue": 35420,
"status": "done",
"branch": "claude/issue-35420-suggester-budget",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35639",
"session": "session_01L6bhgUZrkMKgGrXXe8zPGq",
"premise_still_valid": true,
"head": "945afc35",
"round": "claim amendment 2 (7021828423): authoring-key-lint fold",
"summary": "lintAuthoredRecordKeys (data/authoring-key-lint.ts:272, the function that builds findings; formatUnknownAuthoringKey only formats them) now falls back to suggestRename(key, candidates) instead of findClosestMatches(key, candidates, 3, 1)[0]. The hint?.to ?? (hint?.why ? undefined : ...) precedence is unchanged, and the findClosestMatches import is gone. The rename-guess.ts header now names every unknown-key door and states why the value-vocabulary suggesters stay out of the rule. The class guard in suggestions.test.ts now also refuses a findClosestMatches call that passes its own distance (a third argument). The changeset names the defineStack / CLI authoring-key report and stays patch.",
"files_changed_this_round": [
"packages/spec/src/data/authoring-key-lint.ts",
"packages/spec/src/data/authoring-key-lint.test.ts",
"packages/spec/src/shared/rename-guess.ts",
"packages/spec/src/shared/suggestions.test.ts",
".changeset/35420-one-rename-rule.md"
],
"tests": "head 945afc35: vitest run src/shared/ + the five touched data test files gives 45 files, 1359 tests passed (VERDICT command-exit 0). The lint's spec consumers (kernel/metadata-authoring-lint, cron-typed-positions-retirement, stack, kernel/functional-completeness) give 4 files, 216 tests passed. Ablation: the import was held with findClosestMatches added (anchor 1 then 0, blob ebad5a51 then 5b31a1a1), and the call site was reverted to the flat 3 (anchor 1 then 0, blob 5b31a1a1 then ad0aef4d). authoring-key-lint.test.ts + suggestions.test.ts then gave 3 failed | 54 passed: aria no-rename, the length-relative case, and the class guard went red; the lable/lbael control stayed green. Restore: ablation-replace reported blob == HEAD (ebad5a51e876) and git diff HEAD empty; git status clean.",
"gates": "head 945afc35: spec build && check:generated exit 0 (all 14 up to date); spec typecheck exit 0. dispatch-gates --commands derives the same 96 commands as before and no full spec test, so the full suite was not re-run (last full run: b8bdbfba, 858/858). All 96 were run. check:doc-formula-expressions and check:lean-entry-closure first exited 3 because the fresh worktree had no dist; after building formula, lint and objectql both exited 0. 3 stay NOT MEASURED with exit 3 (check-plugin-teardown-shape --self-test: shallow clone; check:dual-build-cjs-loads and check:published-readme-exports: full-workspace dist). --ran: 96 accounted, 93 run, 3 NOT-MEASURED, exit 0. check-nul-bytes exit 0. overlap-check VERDICT clean exit 0 (origin/main 15f8357a, 0 PR heads sharing files). CI on 945afc35: 73 check-runs, 58 success, 13 skipped, 2 in_progress (PR-body guards, Check Changeset; both re-ran after the body patch), 0 failed.",
"flat_distance_grep": "grep 'findClosestMatches(' over packages/spec/src non-test files. rename-guess.ts:177 and :179: the rule itself. shared/error-map.zod.ts:59 findClosestMatches(received, options) and shared/field-type-suggestion.ts:132 findClosestMatches(normalized, FieldType.options) both use the default maxDistance 3, flat; they are value-vocabulary suggesters (enum values, field types), not unknown-key renames; reported, not changed (outside the two files). shared/strict-object.ts:34 is a comment still spelling the lookup as aliases[aliasProbe(key)] ?? findClosestMatches(...), now stale prose; reported, not changed (outside the surface). suggestions.zod.ts:21 is a doc example. No other caller passes a flat distance.",
"line_budget": "n/a: no skills/** or ratcheted ledger touched",
"deviations": [
"The order names formatUnknownAuthoringKey; the call site is in lintAuthoredRecordKeys (same file, line 272 at 945afc35), and that is the one changed.",
"945afc35 was pushed before the overlap-check ran; the check afterwards was clean (exit 0).",
"The worktree was recreated from origin/claude/issue-35420-suggester-budget (b8bdbfba) after the previous round's cleanup; no merge of main."
],
"mcp_calls": "0",
"api_writes": "This round: 1 git push (not REST); relay issue_patch PATCH /repos/objectstack-ai/objectstack/issues/35639 (body), run 44618962781, read-back identical at 11091 bytes; this os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/35420/comments).",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: shared/strict-object.ts:34 comment spells the fallback as findClosestMatches; it is now suggestRename. Prose only."
]
}
One rename rule, suggestRename / renameBudget in the new leaf packages/spec/src/shared/rename-guess.ts, now serves every unknown-key suggester in packages/spec: strictUnknownKeyError, ObjectSchema.create(), defineSeed, and the authoring-key lint behind defineStack and the CLI (lintAuthoredRecordKeys).
The budget copies outside packages/spec (formula/src/validate.ts, lint/src/object-graph.ts, cli/src/utils/collect-docs.ts) are listed in the PR body's out-of-scope section, with no card, per the seat's ruling.
Nothing remains on this card. It is closed by hand as completed, and pm:dispatched is removed.
area:builddomain:specDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me
Add to scope · 2026-11-19T08:43Z: nit N1 of the
CONTRACT_REVIEW_TIERrecord on PR #35397 (7004137637). ThestrictUnknownKeyErrordocblock inpackages/spec/src/shared/suggestions.zod.tsstill says its fallback matchessuggestKeyinobject.zod.ts. After #35397 the two differ on keys of 5 characters or fewer. Unifying the budget (this card's fix) makes the sentence true again; otherwise reword it.objectstack-fleet commentedon Nov 19, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:spec·pm:queue; rationale: area:build · Bug · Impeded (four more spec suggesters still offer unrelated renames for short or retired keys, e.g.defaultSort→defaults) · builders, often · read from the #33345 report → p2.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgUZrkMKgGrXXe8zPGq
Claim: PM loop round 1
Session:
session_01L6bhgUZrkMKgGrXXe8zPGqAccount:
os-salesBranch:
claude/issue-35420-suggester-budgetWorktree:
objectstack-issue-35420Domain:
domain:specSeat:
repo:objectstack#1Area: b1-C
File surface:
packages/spec/src/shared/suggestions.zod.ts(the one budget rule #35397 settled, and thestrictUnknownKeyErrordocblock of comment 7004171725), the four copiespackages/spec/src/data/{object.zod.ts,seed.zod.ts,field-value.zod.ts,default-value-shape.ts}, their tests; the card's two text-only nits (packages/rest/src/rest-meta-packaged-action-permission-refusal.test.tsheader, the retired checklist itemaccess-security.packaged-permission-set-lifecycleunderdocs/qa/platform-checklist/**);.changeset/Container & model:
S,mode:subagent,model: default — dispatch-gates --tier: "no path-derived mandate"; a packages/spec/src change owes an isolated CONTRACT_REVIEW_TIER L2 before the queue,effort: mediumClause-②: no
Metadata-protocol: none
Responsibility:
objectstack — packages/spec unknown-key suggesters copy the max(2, len/3) budget in four files that #35397 did not touch | the shared suggester in suggestions.zod.ts already holds the settled rule | metadata authors who typo or use a retired short key (e.g. defaultSort → defaults)Thread-read: 7004373786
Premise: holds —
Math.max(2, Math.floor(key.length / 3))stands in each of the four files on origin/main (e.g.packages/spec/src/data/default-value-shape.ts:125); #35397 merged 7a3f86cSerial constraints cleared: none — no open PR or live claim named on the five spec files at claim time; overlap-check runs before push
Pre-claim lane:
packages/spec/src/**(named by the card) → b1-C root; stays in this lane under area-lease.md 留道Pre-claim deps: parent #33345 closed; #35397 merged (7a3f86c)
Prior rulings read: spec,near-miss,suggester,rename,budget,copied,four,files,short,retired,keys,unrelated (+4 more) → 198 hits; ADR-0061 D2, ADR-0150 D9, ADR-0076 D3, ADR-0087 D3, ADR-0145 D2, ADR-0005 Decision §11, ADR-0005 Decision §5, ADR-0019 D4, ADR-0076 D9 (keyword hits; the settled rule is #35397's, cited by the card); thread: none; repo: objectstack-ai/objectstack
Fold answer: serial — #35512 is also
packages/spec/srcbut a different mechanism (hook text call shapes), so it does not fold.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgUZrkMKgGrXXe8zPGq
os-dev-report
{ "issue": 35420, "status": "needs_decision", "branch": "claude/issue-35420-suggester-budget", "pr": "https://github.com/objectstack-ai/objectstack/pull/35639", "session": "session_01L6bhgUZrkMKgGrXXe8zPGq", "premise_still_valid": true, "head": "b8bdbfba", "summary": "The settled budget rule (max(2, floor(len/3)); at 5 characters or fewer only a one-edit candidate, adjacent swap = 1; nothing for an empty key) now lives once as suggestRename in a new leaf packages/spec/src/shared/rename-guess.ts (not re-exported). strictUnknownKeyError, ObjectSchema.create() and defineSeed all call it; object.zod.ts lost its private editDistance/suggestKey, seed.zod.ts its inline budget. Premise partly corrected: field-value.zod.ts and default-value-shape.ts held no code copy (they already read the rule through strictObject), only comment prose restating the old budget, now reworded; the strictUnknownKeyError docblock (comment 7004171725) now names suggestRename. levenshteinDistance/findClosestMatches moved into the leaf and are re-exported unchanged (api-surface green, export-origins regenerated). The retired-key half is not implemented: measured at the /meta PUT door, the rename guess wins for form defaultSort, and stopping it needs a ruling (open_questions). PR therefore says Part of #35420.", "tests": "head b8bdbfba: pnpm --filter @objectstack/spec build && check:generated to GEN_EXIT=0; pnpm --filter @objectstack/spec typecheck to TC_EXIT=0; pnpm --filter @objectstack/spec test to Test Files 858 passed (858), Tests 27414 passed | 1 todo, TEST_EXIT=0 (VERDICT batch-last-exit 0, each part's exit echoed). rest: vitest run src/rest-meta-packaged-action-permission-refusal.test.ts to 1 file, 11 tests passed (VERDICT command-exit 0). Ablation: ablation-replace.mjs on rename-guess.ts anchor on the screen's 'at most 1' comparison (replaced by 'at most 2') x1 to x0, blob 06f10119 to 9292b58e; six harness files to 8 failed | 367 passed, 6 files red (object, define-seed-record-keys, field-value, default-value-shape, strict-object, suggestions); restored, blob == HEAD blob 06f10119, git diff HEAD empty. Src-resolved tests (relative imports), so no dist preflight applies. Door probe (not committed): in-process RestServer PUT /api/v1/meta/:type/:name over real ObjectStackProtocolImplementation + SchemaRegistry, built dists: form view with defaultSort to 422 INVALID_METADATA, message contains 'Did you mean `defaultSort` → `defaults`?'; with aria to no guess.", "gates": "local, head b8bdbfba: node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands to 96 commands; ran all, 93 exit 0, 3 exit 3 PREREQUISITE NOT MET (check-plugin-teardown-shape --self-test: shallow clone cannot reach pinned fixture commit; check:dual-build-cjs-loads and check:published-readme-exports: need full-workspace dist) = NOT MEASURED; --ran reconciliation to '96 derived famil(ies) accounted for — 93 run, 3 NOT-MEASURED' exit 0. node scripts/check-nul-bytes.mjs to exit 0. overlap-check.mjs to VERDICT clean exit 0 (origin/main 6d86b43b and #35583 merge cleanly). CI on PR head b8bdbfba at report time: 24 check-runs, 16 in_progress, 3 queued, 5 skipped, 0 failed to in_progress.", "line_budget": "n/a: no skills/** or ratcheted ledger touched; diff 15 files, +394 / -203 (597 changed lines, under the 3000 threshold)", "files_changed": [ ".changeset/35420-one-rename-rule.md", "packages/rest/src/rest-meta-packaged-action-permission-refusal.test.ts", "packages/spec/export-origins/root.json", "packages/spec/export-origins/shared.json", "packages/spec/src/data/default-value-shape.test.ts", "packages/spec/src/data/default-value-shape.ts", "packages/spec/src/data/define-seed-record-keys.test.ts", "packages/spec/src/data/field-value.test.ts", "packages/spec/src/data/field-value.zod.ts", "packages/spec/src/data/object.test.ts", "packages/spec/src/data/object.zod.ts", "packages/spec/src/data/seed.zod.ts", "packages/spec/src/shared/rename-guess.ts", "packages/spec/src/shared/suggestions.test.ts", "packages/spec/src/shared/suggestions.zod.ts" ], "deviations": [ "PR line 3 says 'Part of #35420', not the 'Fixes #35420' the dispatch asked for: os-dev.md forbids Fixes on a card headed for the decision box, and the retired-key half is open.", "New file packages/spec/src/shared/rename-guess.ts and the regenerated packages/spec/export-origins/{root,shared}.json are outside the claim's file surface. The leaf lets data/*.zod.ts share the rule with no import cycle and no new published export (exporting it from suggestions.zod.ts would add to api-surface through shared/index.ts). The seat should add both to the file surface.", "Checklist nit not edited: access-security.packaged-permission-set-lifecycle is retired, its title already says 'at the retired sys_permission_set data door' and its retiredReason already names POST /api/v1/security/permission-sets/:name/clone.", "The public-door reading came from the real /meta PUT route handler in an in-process RestServer (the packages/rest test harness shape), not a booted HTTP server.", "Commit trailers are AGENTS.md's model-free pair (Claude-Session + Co-authored-by: Claude). The harness reminder's model-naming Co-Authored-By was not used.", "Prose in packages/spec/src/data/object.test.ts (the #4990 suggestKey comment) was reworded because the function it named is gone.", "Dispatch-word conflict: the four-copies assumption. Only object.zod.ts and seed.zod.ts held code copies; field-value.zod.ts and default-value-shape.ts held comment copies only." ], "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 relay strokes: pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /repos/objectstack-ai/objectstack/issues/35639/assignees os-sales, run 44605814290, read-back identical 8060 bytes) and this os-dev-report comment (post-stamped, POST /repos/objectstack-ai/objectstack/issues/35420/comments); git push x6 (not REST)", "open_questions": [ { "question": "Should a key whose retirement kit has aged out (e.g. form view defaultSort, answered 'Did you mean defaultSort → defaults?' at the /meta PUT door today) still get a spelling-based rename guess?", "options": [ "A: Keep the ruled behaviour (ADR-0087 2026-10-26 amendment: an aged-out key is an ordinary unknown key that gets the nearest declared spelling plus the upgrade-guide pointer). Close the card's retired-key sentence as working as ruled. Cost: none. The misleading guess stays.", "B: Add a names-only ledger of aged-out keys per surface, generated from the upgrade-guide registry history, so the strict refusal drops the rename guess for those spellings and says the key was retired. Cost: about 1-2 days plus an ADR-0087 amendment (Tier H) that partly reverses 'offers the nearest declared spelling'.", "C: A shape heuristic: drop a guess that only cuts a trailing camelCase word (defaultSort → defaults). Cost: small. Speculative, and it can suppress real truncation typos." ], "recommendation": "Provisional A, because it is the recorded ruling and B reopens it. The dispatch supplied no decision axes (pm-dispatch SKILL.md 〈升级与决策〉), so no per-axis analysis was done; the seat should supply the axes." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: #35420 (same family, if the seat widens the card) · noted, not filed — further copies of the rename budget outside this diff: packages/formula/src/validate.ts:1497 (nearest), packages/lint/src/object-graph.ts:809, packages/cli/src/utils/collect-docs.ts:974 (all max(2, floor(len/3)) without the short-key screen); in packages/spec, data/authoring-key-lint.ts:270 passes a flat distance of 3 to findClosestMatches. No reach: measured, so not fileable as a/b/c. Dedupe words: rename budget copy, len/3 suggester, flat distance 3 suggestion", "carrier: none · noted, not filed — packages/spec/src/kernel/manifest.zod.ts:84 comment says that without the hosts alias the fallback answers hosts → hooks; since the short-key screen it would answer nothing, so the alias now fills a gap. Prose only." ] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgUZrkMKgGrXXe8zPGq
Claim amendment · 2026-11-19T20:13Z · claim 7019077753 · PR #35639 head b8bdbfb
File surface adds:
packages/spec/src/shared/rename-guess.ts(new leaf module holding the one rule, not re-exported byshared/index.ts, so no new public name) and the regeneratedpackages/spec/export-origins/{root,shared}.json(two existing exports moved home, re-exported unchanged). The checklist nit was not edited: the retired item's text already names the clone route.Premise correction (os-dev-report 7020942306): only
object.zod.tsandseed.zod.tsheld code copies;field-value.zod.tsanddefault-value-shape.tsheld comment copies only.Open half — the retired-key sentence ("A retired key should get its prescription, not a rename guess"): measured at the /meta PUT door, form
defaultSortis answered "Did you meandefaultSort→defaults?". Its retirement kit has aged out, and ADR-0087's 2026-10-26 amendment (#25767 ruling D2 = A) says "a removed key is refused as a strict unknown key whose refusal names the protocol upgrade guide". Routed to the seat; the PR saysPart of #35420until it is settled.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgUZrkMKgGrXXe8zPGq
Claim amendment 2 · 2026-11-19T20:48Z · claim 7019077753 · PR #35639 head b8bdbfb
File surface adds:
packages/spec/src/data/authoring-key-lint.ts(formatUnknownAuthoringKey, read bydefineStackand the CLI: its fallbackfindClosestMatches(key, candidates, 3, 1)uses a flat distance of 3 with no short-key screen, the card's defect in its strongest form) and its pin inpackages/spec/src/data/authoring-key-lint.test.ts. Folded into PR #35639 on L1-a's note 7021796771 (same package, same mechanism; Sales 17:00Z fold rule). Suggestion text only; no key is accepted or refused differently.The retired-key half is settled by the standing ADR-0087 2026-10-26 amendment (#25767 D2 = A): no code change. The copies outside
packages/spec(formula/src/validate.ts,lint/src/object-graph.ts,cli/src/utils/collect-docs.ts) are listed in the PR's out-of-scope section and left to the seat.Generated by Claude Code
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgUZrkMKgGrXXe8zPGq
os-dev-report
{ "issue": 35420, "status": "done", "branch": "claude/issue-35420-suggester-budget", "pr": "https://github.com/objectstack-ai/objectstack/pull/35639", "session": "session_01L6bhgUZrkMKgGrXXe8zPGq", "premise_still_valid": true, "head": "945afc35", "round": "claim amendment 2 (7021828423): authoring-key-lint fold", "summary": "lintAuthoredRecordKeys (data/authoring-key-lint.ts:272, the function that builds findings; formatUnknownAuthoringKey only formats them) now falls back to suggestRename(key, candidates) instead of findClosestMatches(key, candidates, 3, 1)[0]. The hint?.to ?? (hint?.why ? undefined : ...) precedence is unchanged, and the findClosestMatches import is gone. The rename-guess.ts header now names every unknown-key door and states why the value-vocabulary suggesters stay out of the rule. The class guard in suggestions.test.ts now also refuses a findClosestMatches call that passes its own distance (a third argument). The changeset names the defineStack / CLI authoring-key report and stays patch.", "files_changed_this_round": [ "packages/spec/src/data/authoring-key-lint.ts", "packages/spec/src/data/authoring-key-lint.test.ts", "packages/spec/src/shared/rename-guess.ts", "packages/spec/src/shared/suggestions.test.ts", ".changeset/35420-one-rename-rule.md" ], "tests": "head 945afc35: vitest run src/shared/ + the five touched data test files gives 45 files, 1359 tests passed (VERDICT command-exit 0). The lint's spec consumers (kernel/metadata-authoring-lint, cron-typed-positions-retirement, stack, kernel/functional-completeness) give 4 files, 216 tests passed. Ablation: the import was held with findClosestMatches added (anchor 1 then 0, blob ebad5a51 then 5b31a1a1), and the call site was reverted to the flat 3 (anchor 1 then 0, blob 5b31a1a1 then ad0aef4d). authoring-key-lint.test.ts + suggestions.test.ts then gave 3 failed | 54 passed: aria no-rename, the length-relative case, and the class guard went red; the lable/lbael control stayed green. Restore: ablation-replace reported blob == HEAD (ebad5a51e876) and git diff HEAD empty; git status clean.", "gates": "head 945afc35: spec build && check:generated exit 0 (all 14 up to date); spec typecheck exit 0. dispatch-gates --commands derives the same 96 commands as before and no full spec test, so the full suite was not re-run (last full run: b8bdbfba, 858/858). All 96 were run. check:doc-formula-expressions and check:lean-entry-closure first exited 3 because the fresh worktree had no dist; after building formula, lint and objectql both exited 0. 3 stay NOT MEASURED with exit 3 (check-plugin-teardown-shape --self-test: shallow clone; check:dual-build-cjs-loads and check:published-readme-exports: full-workspace dist). --ran: 96 accounted, 93 run, 3 NOT-MEASURED, exit 0. check-nul-bytes exit 0. overlap-check VERDICT clean exit 0 (origin/main 15f8357a, 0 PR heads sharing files). CI on 945afc35: 73 check-runs, 58 success, 13 skipped, 2 in_progress (PR-body guards, Check Changeset; both re-ran after the body patch), 0 failed.", "flat_distance_grep": "grep 'findClosestMatches(' over packages/spec/src non-test files. rename-guess.ts:177 and :179: the rule itself. shared/error-map.zod.ts:59 findClosestMatches(received, options) and shared/field-type-suggestion.ts:132 findClosestMatches(normalized, FieldType.options) both use the default maxDistance 3, flat; they are value-vocabulary suggesters (enum values, field types), not unknown-key renames; reported, not changed (outside the two files). shared/strict-object.ts:34 is a comment still spelling the lookup as aliases[aliasProbe(key)] ?? findClosestMatches(...), now stale prose; reported, not changed (outside the surface). suggestions.zod.ts:21 is a doc example. No other caller passes a flat distance.", "line_budget": "n/a: no skills/** or ratcheted ledger touched", "deviations": [ "The order names formatUnknownAuthoringKey; the call site is in lintAuthoredRecordKeys (same file, line 272 at 945afc35), and that is the one changed.", "945afc35 was pushed before the overlap-check ran; the check afterwards was clean (exit 0).", "The worktree was recreated from origin/claude/issue-35420-suggester-budget (b8bdbfba) after the previous round's cleanup; no merge of main." ], "mcp_calls": "0", "api_writes": "This round: 1 git push (not REST); relay issue_patch PATCH /repos/objectstack-ai/objectstack/issues/35639 (body), run 44618962781, read-back identical at 11091 bytes; this os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/35420/comments).", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: shared/strict-object.ts:34 comment spells the fallback as findClosestMatches; it is now suggestRename. Prose only." ] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgUZrkMKgGrXXe8zPGq
Delivered · 2026-11-19T22:11Z · PR #35639 merged (f4de1de).
suggestRename/renameBudgetin the new leafpackages/spec/src/shared/rename-guess.ts, now serves every unknown-key suggester inpackages/spec:strictUnknownKeyError,ObjectSchema.create(),defineSeed, and the authoring-key lint behinddefineStackand the CLI (lintAuthoredRecordKeys)./metaPUT door, formdefaultSortanswers422 INVALID_METADATAnaming the upgrade guide, which is that reading. The seat adopted it in 7022901432.packages/spec(formula/src/validate.ts,lint/src/object-graph.ts,cli/src/utils/collect-docs.ts) are listed in the PR body's out-of-scope section, with no card, per the seat's ruling.Nothing remains on this card. It is closed by hand as completed, and
pm:dispatchedis removed.Generated by Claude Code