Skip to content

docs(adr-0070): package-less create — action key and publish-mode draft (#38174) - #39443

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-38174-adr-marks
Dec 4, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/issue-38174-adr-marks

Conversation

@os-bill

@os-bill os-bill commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Bill · project thread

Refs #38174

维护者速读

What changes

Verification

ADR text only. No code, no changeset.


https://claude.ai/code/session_01Utp6CasbvyQnz4st6s79P9


Generated by Claude Code

…ft (#38174)

Fable contract review 7396202327 (M1, M2) on PR #39386: an action is keyed
by its object (ADR-0150 D4), so an action whose holders all bind other
objects is the environment's new item and a package-less save of it is a
create; and a package's draft holds a name only for a draft-mode save — a
publish-mode save reads active rows and is refused.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CasbvyQnz4st6s79P9
@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract-review-hold: session_016WV4cxiJF5PkqquFk98Bh7 · head 53a1b92 · this ADR text lands with PR #39386, whose delta contract review on head b83303a is running now · until that delta record is posted; this seat then reviews this PR and #39397 against the code head it describes

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract-review-claim: session_016WV4cxiJF5PkqquFk98Bh7 · head 53a1b92 · 2026-12-04T00:51Z
Hold released: PR #39386 delta record 7397144210 is PASS on head b83303a; this ADR text is now reviewed against that code head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract-review-claim: session_016WV4cxiJF5PkqquFk98Bh7 · head 53a1b92 · 2026-12-04T00:49Z
Hold released: PR #39386 delta record 7397144210 is PASS on head b83303a; this ADR text is now reviewed against that code head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 53a1b920fc8488989c383a745a5c4b2f571fba15
Local-runs: none
Scope: docs/adr/0070-package-first-authoring.md + none (the diff holds no implementing file) + read, never reviewed, at PR #39386 head b83303a912cdeff9ab2973b0c173d931a6054401: packages/metadata-protocol/src/protocol-packageless-create.ts, packages/metadata-protocol/src/protocol-save.ts (the publish-mode address, the draft address and the call site of the judgment), packages/metadata-protocol/src/sys-metadata-repository.ts (unboundItemDraftAddress, actionHeldOnlyOnOtherObjects, resolveWriteHead), packages/metadata-protocol/src/protocol-environment-rows.ts (packagelessAddress), packages/cli/src/utils/organization-ownership-apply.ts; and at this head docs/adr/0084-application-builder-information-architecture.md and docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md (the D4 note of 2026-11-16)
Security-touching: yes
Rule-change-verified: none

PR #39443, card #38174, base main, one commit, one file, +2 −2: the bullets "What is refused" and "What stays open" of ADR-0070's D1 note of 2026-12-03, which PR #39397 put on main. Read-only: the card with every comment, the PR body, the file list, the net diff, ADR-0070 and ADR-0084 whole at the head, the code of PR #39386 at b83303a9 as the text's first consumer, and the head's check-runs. Nothing was built or run. No path is under .claude/**. Security-touching: yes because the rewritten line of "What is refused" carries the permission-set clone door's refusal in the same hunk; its words did not change, and the changed words teach an authoring refusal, not a grant. The PR is Tier H as an ADR either way.

① Derived judgments

The PR changes no behaviour. Each changed sentence was read against the judgment it describes (packagelessCreateRefusal, b83303a9).

  1. "is a create when no package-less row or draft of the name is stored": the code returns "not a create" on active.unbound || drafts.unbound, by name, ahead of every other test. Right.
  2. "no package's active row holds it": the code returns "not a create" on active.candidates.length > 0, where packagelessAddress reads stored active rows. Right. An item a package ships in code with no stored row never reaches the judgment (its intent is override-artifact), which D1's own preamble and the first exemption cover.
  3. "an action is keyed by its object, ADR-0150 D4, so an action whose holders all bind other objects is the environment's new item": the action branch asks actionHeldOnlyOnOtherObjects over the name's active rows and refuses. Right, and the citation holds: ADR-0150 line 328 is the note of 2026-11-16 with ruling 6902014292, and it says the row "is the environment's own bucket-4 item on that object".
  4. "for a draft-mode save only, no package's draft holds the name (a publish-mode save is not bound by a draft ...)": the code keeps the bound-draft clause under mode === 'draft', and resolveWriteHead binds from draft rows only under state === 'draft'. Right for every type but one cell of action (S1).
  5. "What stays open", the action sentence: "a holder at the body's object makes the save a customization, and a holder only on other objects does not ... which is new when no package-less row of the name is stored". Right; this is the sentence that states the action rule without the draft clause, and it agrees with the code in the cell of S1.
  6. "A name whose only stored row is a draft that a package holds is not new to a draft-mode save ... a publish-mode save of it is a create and is refused": right. In draft mode unboundItemDraftAddress answers the one package's draft (or ambiguous, refused 409), so "the draft address judges it as before" holds; in publish mode the judgment falls through to the refusal. The symbol the sentence cites exists at the cited path.
  7. The sentences this PR leaves, read against the same head: five exemptions in the note and five in the judgment's docblock and code (intent override-artifact; writeFace: 'external-import'; source set; packagelessCreateProvenance: 'organization-ownership-ceremony'; platform registration off the path). package-duplicate has no skip. The ceremony's two creates pass LEFT_LOOSE and its report names POST /api/v1/packages/:id/move-in. ADR-0084's bullet still reads "Four writers keep a named exemption, and no other", and its second note of 2026-12-03 tells the reader to read it as five and adds "no sixth". No sentence of ADR-0070 or ADR-0084 at this head gives a count the code contradicts.

② Semver level

None. The diff publishes nothing from any package: one file under docs/adr/**. The PR carries the skip-changeset label, Check Changeset is skipped, and the body says "ADR text only. No code, no changeset." It carries no Clause-②: line and owes none: AGENTS.md asks for the two declarations where a changeset is owed. The narrowing itself is declared on PR #39386 (Clause-②: no (narrowing), Metadata-protocol: narrowed), which is where it publishes.

③ Boundary flags

④ Design judgment

Against its first consumer (the #39386 judgment at b83303a9) and its execution plan (card What 7: "a dated note that the kernel refuses the package-less create, naming the ... exemptions and the in-place rule"; ruling 7380917604 point 4): the two rewritten bullets now say what the code does in the two cells review 7396202327 found (M1, the publish-mode save over a package's draft; M2, the action held only on other objects). The text main carries today ("when no package holds the name, as an item or as a draft") is wrong in both, so this PR is the place those sentences are fixed, and it fixes them. One cell of the new sentence is still stated the wrong way round.

S1 (should-fix) — "What is refused" reads as open one cell the kernel refuses. The sentence makes a save a create only when ALL of three hold, the third being "for a draft-mode save only, no package's draft holds the name". Take an action whose holders' active rows all bind other objects, with no loose row or draft of the name, and a package's draft of the name stored (on any object). A draft-mode save naming no package then fails the third conjunct, so the sentence says it is no create. The code refuses it 422: the action branch returns the refusal ahead of the bound-draft clause, with the comment "neither the holders' active rows nor their drafts make the save a customization", and that is the consistent answer, because resolveWriteHead sets targetPackageId = null for that body and would mint a loose draft beside the package's. "What stays open" gets the same cell right ("new when no package-less row of the name is stored", no draft exception), so the note's two bullets disagree with each other there. Fix in the one sentence: bound the draft clause to a name no package's active row holds at all, or add to the action parenthesis that a package's draft does not bind that save either. Narrow, and in the safe direction (the text says open, the kernel is closed), so it does not fail the record; it is governed text whose whole job is these cells, so it should not land as written if the head is pushed again for any reason.

N1 (nit) — "which is new when no package-less row of the name is stored" in "What stays open": the code also reads a package-less DRAFT (drafts.unbound), and "What is refused" says "row or draft". Say "row or draft" in both.

N2 (nit) — "(the contract review of PR #39386, comment 7396202327, M1)" cites a review finding where the note's other parentheses cite rulings, and with no link where they carry one. The authority for refusing that save is ruling 7184753035 with the card's What 1; the review is where the gap was found. Link the comment and say "found by", or cite the ruling.

N3 (nit) — "an action is keyed by its object" shortens D4's key; an object-less action is its own key (global, ADR-0150's note of 2026-11-16), and the code refuses an object-less body beside holders on objects. "What stays open" gives the full key, so the short form misleads no one who reads both.

Independence: the diff was produced on the branch below by the card's ADR thread; this record is rendered by an isolated reader of this seat, given the card, the PR, the consumer's code and the check-runs, and none of the dispatching seat's conclusions.

Implemented-by: claude/issue-38174-adr-marks
Reviewed-by: session_016WV4cxiJF5PkqquFk98Bh7

VERDICT: PASS

…draft (#38174)

Contract review 7397406026 on PR #39443: S1 (a package's draft does not bind
a package-less save of an action held only on other objects), N1, N2.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CasbvyQnz4st6s79P9
@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: aadf1f19b95c362247b6560c9a68c5fba6e829c7
Local-runs: none
Scope: the delta 53a1b920..aadf1f19, one commit, one file (+2 −2): docs/adr/0070-package-first-authoring.md + none (the delta holds no implementing file) + read, never reviewed, at PR #39386 head bb318a34255887ff0a70cee1dd41a077c1c3a54b: packages/metadata-protocol/src/protocol-packageless-create.ts and packages/metadata-protocol/src/sys-metadata-repository.ts (resolveWriteHead, unboundItemDraftAddress, actionHeldOnlyOnOtherObjects), both byte-identical to b83303a9
Security-touching: yes
Rule-change-verified: none

Delta review. The previous record is the PASS on 53a1b920fc8488989c383a745a5c4b2f571fba15 (comment 7397406026: S1 should-fix, N1 to N3 nits). Its judgments stand for every sentence this delta does not touch. Inputs: the delta read from the fetched objects, the two rewritten bullets read whole at the new head, the consumer's judgment at bb318a34, and the check-runs on the new head. Nothing was built or run. No path is under .claude/**. Security-touching: yes for the reason the previous record gives: the rewritten line of "What is refused" carries the permission-set clone door's refusal in the same hunk, its words unchanged.

① Derived judgments

The delta changes no behaviour. Three text edits, each read against packagelessCreateRefusal.

  1. "What is refused", the action parenthesis gains "and a package's draft does not bind that save either". Right: the action branch returns the refusal ahead of the bound-draft clause, in both modes, and resolveWriteHead gives that body targetPackageId = null whatever drafts are stored.
  2. "What is refused", "for a draft-mode save only" becomes "for a draft-mode save of a name no package's active row holds". Right, cell by cell: with no active row bound to a package, a draft-mode save is no create when a package's draft holds the name (the code's mode === 'draft' clause, reached only after active.candidates.length > 0 has declined), and a publish-mode save stays a create; with a holder's active row, the clause no longer speaks, and the earlier conjuncts decide (a customization, or for an action held only on other objects, a create).
  3. "What stays open": "no package-less row of the name" becomes "row or draft", and the M1 parenthesis now cites ruling 7184753035 and the card's What 1 as the authority, with the review named as where the gap was found and linked to its comment. Right: the code reads active.unbound || drafts.unbound, and the link's anchor is the comment's id on PR feat(metadata-protocol)!: refuse a package-less create; retire POST /automation; notify-channel judge on /meta flow saves #39386.

② Semver level

None, unchanged: one file under docs/adr/**, the skip-changeset label still on the PR, no changeset and no Clause-②: line owed.

③ Boundary flags

  • Author: the PR's user.login is os-bill, not objectstack-fleet[bot].
  • Check-runs on this head, read after the push: 25 runs: 17 in progress, 8 skipped, 0 failed, 0 success yet. In progress: Governed Surface Queue Guard, Check Documentation Links, PR-body guards, Check PR Size, filter, the four Type Check groups and eight Lint groups. A run in progress is no verdict. This record judges the text of the delta; the seat re-reads the check-runs on this head before it lands, and a red run there overrides the verdict below.
  • Carried from the previous record, unchanged by this delta: the PR lands together with PR feat(metadata-protocol)!: refuse a package-less create; retire POST /automation; notify-channel judge on /meta flow saves #39386 or after it, never before (the consumer is open at bb318a34; its judgment files are byte-identical to the head its PASS record 7397144210 names). The rollbackMetaItem question stays unruled and the seat's to escalate; if it proves a second open door, the note's "One open door outside the kernel save" bullet and the status line owe a mark.
  • SQL push-down (Prime Directive 5): no code in the delta. No finding.

④ Design judgment

S1: closed
N1: closed
N2: closed
N3: stands as recorded (the short form "keyed by its object" in "What is refused"; "What stays open" gives the full key)

Checked against the code each edit cites. S1: the cell the previous record named (an action whose holders' active rows all bind other objects, no loose row or draft, a package's draft of the name, a draft-mode save) now reads as a create in "What is refused" by both edits, the parenthesis saying it outright and the draft clause no longer reaching a name a package's active row holds; "What stays open" says the same, so the note's two bullets agree, and both agree with the 422 the judgment answers. The rewritten draft clause was re-read for the cells it could have broken: a non-action name whose only row is a package's draft (draft mode no create, publish mode a create) and an action with no active row at all and a package's draft (the same) both still match the code.

No must-fix, no should-fix.

Implemented-by: claude/issue-38174-adr-marks
Reviewed-by: session_016WV4cxiJF5PkqquFk98Bh7

VERDICT: PASS

@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 4, 2026 01:14
@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 4, 2026
@os-zhuang
os-zhuang enabled auto-merge December 4, 2026 01:19
@os-zhuang
os-zhuang added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit aef4b28 Dec 4, 2026
53 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-38174-adr-marks branch December 4, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants