Repository navigation
docs(adr,skills): ADR-0163 records the two-tier field write lock; objectstack-data teaches the four locks - #38428
Conversation
…he ui-prefix admission rule Claude-Session: https://claude.ai/code/session_01L6bhgTpyo8gQyqf9Tj9mfz Co-authored-by: Claude <noreply@anthropic.com>
… point the uiReadonly + readonly refusal at ADR-0163 skills/objectstack-data/rules/validation.md gains "Locking a Field": the two-by-two of readonly / readonlyWhen / uiReadonly / uiReadonlyWhen, one checked sales-order example and what each column does at run time. The two readonly bullets of Conditional Field Rules become a pointer at it, and the claim that an import is a system-context write is corrected there. SKILL.md routes to the section; evals gain case 30, a uiReadonly status field. The token ratchet rows follow: SKILL.md 2239 -> 2223 (lowered to the measurement), rules/validation.md 3466 -> 3862 (restatement cut first, the measured remainder raised under ruling record 6513306068; the section is ordered by ruling record 7180466652). packages/spec: the parse refusal for uiReadonly: true beside readonly: true ends with "ADR-0163 (D1, D6)", pinned in field-ui-readonly.test.ts. Claude-Session: https://claude.ai/code/session_01L6bhgTpyo8gQyqf9Tj9mfz Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 11 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 181 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 6e09bfbbcfec190d10c7d84feab944efef6990d7 && git checkout 6e09bfbbcfec190d10c7d84feab944efef6990d7
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d751790ced3d1c8d998cc6dbc3f9e014317778ec 6e397de7845d8b00a51a7c57dc7c97ac00a70788 && git checkout -B drift-repro d751790ced3d1c8d998cc6dbc3f9e014317778ec && git merge --no-ff 6e397de7845d8b00a51a7c57dc7c97ac00a70788
node scripts/docs-audit/affected-docs.mjs --json d751790ced3d1c8d998cc6dbc3f9e014317778ec
|
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Read: card #37405 (body, triage, claim 7247702130, amendment 7247733027, os-dev-report), PR #38428 (body, 10 files, net diff against Security-touching is ① Derived judgments
Gate verdicts on the head at read time, 49 check-runs: success on Check Changeset, PR-body guards, Governed Surface Queue Guard, Spec property liveness, Check Documentation Links, Check PR Size, Flag docs affected, Auto Label, Dogfood Regression Gate, both shard planners and ② Semver level
Clause-②: no — holds. Present on the PR body and in the changeset, with ③ Boundary flags
④ Design judgment
One should-fix (S1), one nit (N1), no must-fix. S1's fix earns a delta review on the new head. Implemented-by: VERDICT: PASS |
…ock table says which row a system write passes Contract review of the previous head, one should-fix and one nit: - skills/objectstack-data/SKILL.md: "a button's action included" was true of a declarative action only; a script action's body runs in a system context and its write to a readonly: true field lands. The clause now reads "a declarative action's included". The ratchet row follows to the measurement, 2224. - skills/objectstack-data/rules/validation.md: the lock table's left column was headed "Every non-system write" over readonlyWhen too, which binds system writes as well. The header is "Every write" and the readonly: true cell carries "(system writes pass)"; the Confirm sentence names a declarative Confirm. 15448 bytes, the row stays 3862. Claude-Session: https://claude.ai/code/session_01L6bhgTpyo8gQyqf9Tj9mfz Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta review of record 7248470779 (head Security-touching stays ① Derived judgments
Gate verdicts on ② Semver levelUnchanged: Clause-②: no — holds; the delta changes no parse behaviour. ③ Boundary flags
④ Design judgmentS1: closed — N1: closed — the table's left column is headed "Every write", the Delta read for new matter, sentence by sentence:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 6e397de · card #37405 · area s2-data · 2026-11-29T01:32ZL1 checklist
Tier: H. Landing: hand-off to the maintainer follows this record. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Tier H hand-off · 2026-11-29T01:33Z · head 6e397de · approver 维护者速读
|
Requested by Sales · project thread
Fixes #37405
Clause-②: no (no accept set or export changes; governed rules text, so one contract-review-tier review before the queue; Tier H)
Metadata-protocol: none
维护者速读
What changes
No key, schema, accepted value, default or runtime behaviour changes. This records the ruling of record on #36806 (ruling record 7180466652, 「按长远模型」) and the two object-level rulings on #37402 (ruling records 7235326611 and 7237772411), whose code landed in #37436, #37888 and #38169.
docs/adr/0163-field-write-locks-two-tiers-two-forms-two-levels-ui-prefix-admission.md(new,Accepted (2026-11-26)on the ruling record; it reachesmainonly by the Tier H approval). D1 two tiers (server lockreadonly/readonlyWhen, hand lockuiReadonly/uiReadonlyWhen), D2 two forms (readonlyWhen: P\true`is the set-once spelling), D3 two levels (the object'suiReadonlyWhen; a field's own declaration wins;uiReadonly: falseis not a declaration), D4 what "by hand" is, D5 the admission rule of theuiprefix (uiVisibleWhen/uiRequiredWhenare not admitted), D6 contradictions, D7 the server lock stays a strip. The record keeps two kinds of statement apart: Decision carries only what the rulings say, quoted; "As built" says whatmaindoes atc610020`, by symbol anchor. A third section, "Ruled and not yet held", lists the three places the ruling covers and the code does not reach yet, each with its open carrier card.docs/adr/README.md: regenerated bynode scripts/adr-index.mjs(164 records).skills/objectstack-data/rules/validation.md: new section## Locking a Field: a two-by-two table of the four keys (who is kept out, and when), one checked sales-order example (the hotcrm#2716 case: astatusonly the Confirm action moves), and five bullets on what each column does at run time.skills/objectstack-data/SKILL.md§ Conditional Field Rules: the first bullet keeps its trap (the value is dropped, the write is not refused, a declarative action's included) and routes to the new section.skills/objectstack-data/evals/objects-fields-relationships.json: case 30, auiReadonlystatus field (must_contain:uiReadonly: true,state_machine).evals/README.mdnames it.packages/spec/src/data/field.zod.ts: the parse refusal foruiReadonly: truebesidereadonly: truekeeps its wording and now endsThe two locks and which one to choose: ADR-0163 (D1, D6).This is the textobjectstack validateprints for the pair. Pinned infield-ui-readonly.test.ts..changeset/37405-field-write-lock-adr-skill.md:@objectstack/specand@objectstack/skills, patch.One sentence of the skill is corrected, not only moved.
rules/validation.mdsaid "Imports and migrations are system-context writes too." An import is not a system-context write. Thereadonlydescribe inFieldSchemasays so ("A normal (non-system) import is NOT system-context and still strips"),importControlOptOutRefusalinpackages/rest/src/import-prepare.tsrefuses the historical-import opt-out to every HTTP caller, and the #36806 measurement found the same. The new section lists an import among the writesreadonly: truedrops, and a migration among the system writers it lets through.Token ratchet (
scripts/check-skills-token-ratchet.mjs), two rows:skills/objectstack-data/SKILL.md2239 → 2224: lowered to the measurement.skills/objectstack-data/rules/validation.md3466 → 3862 (+396). The section is ordered into this skill by the ruling of record on spec: a field a person changes only through actions — read-only on every UI surface, still writable by the API, import and action writes, judged by validations #36806 (ruling record 7180466652: the four spellings, which one to use, the sales-order status example), and the raise follows the standing ruling, verbatim: 「A:先削重复,余额按实测提高」 (ruling record 6513306068). Paid down first in the same file, 1035 bytes cut against 2622 added:readonly/readonlyWhenbullets of § Conditional Field Rules are now one pointer at the new section, which says the same once;enterprise_requires_manager) and the lead-in of the second, whosewhen/then/otherwiserule shows everything the first did.Skills readings (lines / bytes / tokens)
skills/objectstack-data/rules/validation.mdskills/objectstack-data/SKILL.mdskills/objectstack-data/evals/objects-fields-relationships.json(not ratcheted)skills/objectstack-data/evals/README.md(not ratcheted)skills/objectstack-data/**skills/*/SKILL.mdskills/**Round 2 (head 6e397de): the contract review of 0922ab3
The review (comment 7248470779, PASS) left one should-fix and one nit. Both are done in one commit.
SKILL.md: "a button's action included" was true of a declarative action only. A script action's body runs in a system context, so its write to areadonly: truefield lands (ADR-0163, Alternatives, row 3). The clause now reads "a declarative action's included". The ratchet row follows the file to its measurement, 2224 (2223 at the previous head).rules/validation.md: the table's left column was headed "Every non-system write" overreadonlyWhentoo, which binds system writes as well. The header is now "Every write" and thereadonly: truecell carries "(system writes pass)". The right header lost one word to pay for it ("Only a person at the console"), and the Confirm sentence names "a declarative Confirm". The file is 15448 bytes and its row stays 3862.Tests
packages/spec/src/data/field-ui-readonly.test.ts: the existing refusal case also asserts the message ends withADR-0163 (D1, D6).vitest run src/data/field-ui-readonly.test.tsinpackages/spec: 5 of 5 pass.os:checkmarker, socheck:skill-examplestype-checks it against the built@objectstack/specdeclarations. Exit 0: 353 marked examples type-check, this one among them. The example was also parsed byObjectSchemaand read byvalidateStackExpressionsin two scratch vitest files (not committed): it parses, and the expression lint reports no issue forreadonlyWhen: Ptrueor `uiReadonlyWhen: P`false.check:skill-eval-tokens: exit 0; bothmust_containtokens of case 30 are taught by the bundle.Acceptance notes
main": the record's status isAcceptedon the ruling record and it lands by the Tier H approval of this PR. "Skill section in place and its eval exercises auiReadonlystatus field": the section and case 30. "objectstack validate's refusal text foruiReadonly+readonlypoints at the ADR": the message above.mainyet. The ADR says so in "Ruled and not yet held" and names the open carrier of each: uiReadonly hand lock: the in-app assistant acting for a person does not honour it (its writes run in the cloud AI service) #37898 (the assistant is among the hands the ruling names; cloud AI service), console: a person-triggered "Duplicate record" action, whose copy takes hand-locked fields' defaults (the rule ruled on #36806, no surface today) #38202 (console Duplicate carries a hand-locked value), console: a parent record's whole-record hand lock (object uiReadonlyWhen) does not cover its inline master-detail line rows in the edit form #38249 (inline child lines of a hand-locked parent). The skill section teaches only whatmaindoes today.uiVisibleWhen/uiRequiredWhenrefused" (card wording): the ruling's rule is that a key earns auitwin only when an action must write what a person may not, and only read-only meets it. Neither key exists in the schema, so a strict parse answers each as an unknown key. No dedicated refusal is added here; the ADR records the rule (D5) and the skill says there is nouiVisibleWhen.readonlyWhenon the object) is not filed anywhere; it is named so a later reader does not infer it from the hand lock's object level.ADR-0158 U2,ADR-0049).claude/project-thread-bqsxpgis assigned by the harness, not the repo'sclaude/issue-N-…convention.Verification
Two-minute check:
node scripts/check-skills-token-ratchet.mjs, expect exit 0 withskills/objectstack-data/rules/validation.md3862 / 3862 andskills/objectstack-data/SKILL.md2224 / 2224.Read first, by risk:
skills/objectstack-data/rules/validation.md§ Locking a Field (it ships to third parties verbatim): the left-column bullet, where the writersreadonly: truedrops and lets through are listed, and the import correction.docs/adr/0163-…mdD3 and D4 against the ruling records, then "Ruled and not yet held".scripts/check-skills-token-ratchet.mjs: the two rows and their arithmetic.Local gates at 6e397de (only what reads the two changed skill files)
Not the whole list again: the second commit changes two skill files, the ratchet rows and one changeset sentence. Re-run, each exit 0:
check-skills-token-ratchet.mjs(and--self-test),uicheck:skill-eval-tokens,check:skill-links,check:skill-frame-sync,check:skill-identifier-liveness, speccheck:skill-examples(353 examples),check:skill-docs,check:skill-refs,check:skill-served-sections,check-nul-bytes.mjs.Local gates at 0922ab3
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE, each command recorded asCMD :: exit N: 124 derived, 120 run, 4 NOT-MEASURED, 0 UNRUN. Every run family exit 0, among themcheck-skills-token-ratchet.mjs(and--self-test),check:adr-index,check:adr-anchors,check:adr-symbol-anchors,check-adr-links.mjs,check:skill-links,check:skill-frame-sync,check:skill-identifier-liveness, speccheck:docs/check:api-surface/check:authorable-surface/check:skill-docs/check:skill-refs/check:liveness,check-empty-changeset.mjs,check-adr-0087-registration.mjs --base origin/main,check:ratchet-remedy-authority,check:type-check-debt.check-plugin-teardown-shape.mjs --self-test: NOT MEASURED. Its positive control is pinned to a commit this shallow clone cannot reach. The gate itself (without--self-test) ran, exit 0.check:doc-formula-expressions,check:dual-build-cjs-loads,check:lean-entry-closure: exit 3 on the first pass (their build closures were missing). After the closures were built each was run again alone, exit 0. The record keeps both lines, and the tool reads a command with two codes as the worse one, so its count stays 4.check:skill-examples(exit 3 before the@objectstack/client-reactclosure was built, exit 0 after: 353 examples),uicheck:skill-eval-tokens(exit 0),uicheck:skills-paths(exit 0).scripts/pm/overlap-check.mjs: clean againstorigin/main(3579cf1) and the one open PR that shares a file (chore: version packages (next) #38192,skills/objectstack-data/SKILL.md).c610020eplus this diff;mainmoved three commits since (none under this diff's paths), not merged in.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgTpyo8gQyqf9Tj9mfz