Repository navigation
fix(metadata-protocol): seed reference probe names the repair a republish reaches, judged once per object - #35506
Conversation
…mes the repair a republish reaches Claude-Session: https://claude.ai/code/session_01L6bhgVmoN7y4S9ywEQ8f4D Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgVmoN7y4S9ywEQ8f4D Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgVmoN7y4S9ywEQ8f4D {
"issue": 35258,
"status": "done",
"branch": "claude/project-thread-xh0fui",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35506",
"session": "session_01L6bhgVmoN7y4S9ywEQ8f4D",
"premise_still_valid": true,
"summary": "seed_reference_unresolved now groups published seeds by object (seedApplied.landed is per object): one finding per object and reference column. Created rows are always judged; matched rows only when every seed of the object declares upsert/update, and only in columns every seed writes back on a matched row (every record carries it, not applyOn create). fix and userMessage (11 locales, new cause param seed|mode|stored, no new catalog key) name the repair a republish reaches: the seed, or the stored rows / declaring upsert. rollup_never_computed: 'of one organization' only on an org-split pass, 'sampled' parents, 'records checked' instead of 'every record' in 11 locales, unreleased changeset corrected, and the 50-row org discovery's reason stated in a comment.",
"tests": "tree 2f2c23e2: pnpm --filter @objectstack/metadata-protocol test -> Test Files 360 passed | 9 skipped (369), Tests 23256 passed | 45 skipped, VERDICT command-exit 0; typecheck VERDICT command-exit 0 (tsconfig includes src/**/*). Targeted: build-probes-landed-data + build-probes-user-message 73/73. Ablations via scripts/ablation-replace.mjs, each restored to HEAD blob with git diff HEAD empty: (1) writing every->some: 1 failed/26; (2) rewritten=writing: 2 failed/73; (3) mode cause -> false: 3 failed/73; (4) org phrase forced on: 1 failed/26 (first attempt was a refused no-op, replacement text already in file; re-run with a distinct replacement). No dist rebuild in path: tests import ./build-probes.js from src.",
"gates": "dispatch-gates --commands at 2f2c23e2: 66 derived; --ran: 66 accounted, 64 run, 2 NOT MEASURED (derived from recorded exit 3). Non-zero: node scripts/check-empty-changeset.mjs --base origin/main :: exit 1; node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 3; pnpm check:dual-build-cjs-loads :: exit 3. check-empty-changeset exit 1 = declared DELIBERATE CORRECTION of .changeset/34776-publish-checks-build-probes.md (stays red by design). check:lean-entry-closure exit 3 then exit 0 after building objectql. NOT MEASURED: check-plugin-teardown-shape --self-test (shallow clone, pinned control unreachable), check:dual-build-cjs-loads (needs every package built). All other 63 exit 0. CI check-runs: in_progress at report time.",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/35506/assignees); post-stamped os-dev-report comment (POST /issues/35506/comments)",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: under ignore a republish that changes nothing still comes back clean (matched rows are not the seed's to judge, per the binding scope); the first receipt's repair is the one that works. Recorded in the PR's Acceptance notes."
]
} |
📓 Docs Drift Check10 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 10 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 f5e52ca7b853293fd57b6ecba52e3963217f5583 && git checkout f5e52ca7b853293fd57b6ecba52e3963217f5583
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 60ed6bd9b570a28b7e4f5133b7b9fcbe08b25155 b9dd931cdf4773ad58f7c8fbb58042c3af791b87 && git checkout -B drift-repro 60ed6bd9b570a28b7e4f5133b7b9fcbe08b25155 && git merge --no-ff b9dd931cdf4773ad58f7c8fbb58042c3af791b87
node scripts/docs-audit/affected-docs.mjs --json 60ed6bd9b570a28b7e4f5133b7b9fcbe08b25155 |
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgVmoN7y4S9ywEQ8f4D Contract reviewServed-tier: Inputs read: card #35258 (body and both comments: the triage first touch and the claim), PR #35506 (body, the six-file list, the net diff against ① Derived judgments
② Semver level
DELIBERATE CORRECTION of Before: " After: " Judged against
The remaining sentences of the note were re-read against this head, since the PR changes the code they describe: " Verdict on the correction: the rewritten sentence is true at this head, on every clause. The correction is confirmed; ③ Boundary flagsThe card carries no
④ Design judgment
Held against the cited code:
S1 (should-fix) — on an object with one N1 (nit) — "of one organization" is still said on one pass that is not split by organization. N2 (nit) — N3 (nit) — the N4 (nit) — with a mixed
One should-fix (S1), no must-fix. S1's fix is a text change in Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgVmoN7y4S9ywEQ8f4D Contract review brief — PR #35506 @
|
…ference repair Claude-Session: https://claude.ai/code/session_01L6bhgVmoN7y4S9ywEQ8f4D Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgVmoN7y4S9ywEQ8f4D {
"issue": 35258,
"status": "done",
"round": "patch round 1 (contract review 7026786132: S1, N1, N3)",
"branch": "claude/project-thread-xh0fui",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35506",
"head": "b9dd931cdf4773ad58f7c8fbb58042c3af791b87",
"previous_head": "2f2c23e2cd96e2ef29bf26abc86788a3643d9585",
"session": "session_01L6bhgVmoN7y4S9ywEQ8f4D",
"premise_still_valid": true,
"summary": "S1: new fourth cause value `mixed` on the existing seed_reference_unresolved entry (no new code or catalog key), chosen when some seeds of the object write the column back on a matched row and some do not (cause `mode` now arises only when every seed is ignore). fix names the writing seed(s), names the others by reason (seedNotRewritingWhy), says to correct the value in every seed and then repair the rows the other seeds leave alone, and makes no claim that a republish leaves every existing row alone; the userMessage has a `mixed` arm in all 11 locales. N1: 'of one organization' only when the child object has a tenant column (organizationColumnOf), so a publishing organization over an untenanted object reads as one unscoped pass. N3: the mode, mixed and stored fix texts add that the next receipt carries no finding for those rows until a repair is done. The 35258 changeset sentence follows (cause list, mixed repair).",
"tests": "head b9dd931c: pnpm --filter @objectstack/metadata-protocol test -> Test Files 360 passed | 9 skipped (369), Tests 23258 passed | 45 skipped, VERDICT command-exit 0; typecheck VERDICT command-exit 0; landed-data + user-message (locale pin, now with a `mixed` CASES row over two seeds) 75/75. Ablations (scripts/ablation-replace.mjs, restored to HEAD blob, git diff HEAD empty): `rewriters.length > 0` -> `< 0`: 2 failed/75 (mixed-seed test, mixed locale case); splitByOrganization without the tenant-column check: 1 failed/75.",
"gates": "dispatch-gates --commands at b9dd931c: 66 derived (same 6-path change set); --ran: 66 accounted, 65 run, 1 NOT-MEASURED. Non-zero: check-empty-changeset --base origin/main :: exit 1 (the declared DELIBERATE CORRECTION, by design); check-plugin-teardown-shape --self-test :: exit 3 (shallow clone). check:dual-build-cjs-loads :: exit 0 and check:lean-entry-closure :: exit 0 this round; the other 62 exit 0.",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "1 — post-stamped os-dev-report delta comment (POST /issues/35506/comments); PR body not edited",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": []
} |
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 维护者速读
席位核对 — delta ACCEPT (L1-a) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgVmoN7y4S9ywEQ8f4D Contract reviewServed-tier: Delta round on record 7026786132 (head ① Derived judgments
② Semver level
DELIBERATE CORRECTION of Before: " After: " Re-judged against the roll-up section at this head, since the delta touched that section: the children read is still ③ Boundary flags
④ Design judgment
S1: closed. The card's two-seed scenario (one
N1: closed. N3: closed. N4: closed by construction. N2 (nit): unchanged, left as an accepted deviation.
S1: closed here too. A N5 (nit) — the PR body still describes three No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob L2 adoption · 2026-11-20T01:23Z · The seat adopts the #35258 card thread's isolated delta record 7027405938 for head The verdict is PASS, with no must-fix and no should-fix items. S1, N1, N3 and N4 are closed. N2 ( The record re-judges the DELIBERATE CORRECTION of unreleased changeset
|
|
repo:objectstack#1 · os-sales · session_01L6bhgVmoN7y4S9ywEQ8f4D Red by design · 2026-11-20T01:26Z · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgVmoN7y4S9ywEQ8f4D Landing · 2026-11-20T01:27Z · head
Records on this head: L2 delta PASS 7027405938 (seat adoption 7027430021), L1-a delta ACCEPT 7027391911 (its condition, Test Core 9/10, is green). Every check green or expected skip except |
Requested by Sales · project thread
Fixes #35258
Clause-②: no
Metadata-protocol: none
Branch note (Duplicate Fix Guard):
claude/project-thread-xh0fuiis the branch this card thread's harness assigns, and the only one it may push, so the repo'sclaude/issue-35258-*spelling is not available here. The claim comment on the card names this branch.维护者速读
What changes
seed_reference_unresolved(build probe,packages/metadata-protocol/src/build-probes.ts):seedApplied.landedis one entry per object for every seed of it (seedAppliedLanded), so the probe now groups the published seeds by object and emits one finding per object and reference column. The finding'sartifactis the object's first published seed;messagenames every seed of the object.landed.inserted): always. Rows a seed key matched (landed.matched): only when every published seed of the object declaresupsertorupdate, and only in a column every one of those seeds writes back onto a matched row: every record carries the column and the seed does not declarecolumns.FIELD.applyOn: 'create'(key fields excepted, as the loader does). Any other column of a matched row is its writer's and is not judged.fix, and a newcauseparam on theuserMessage, all 11 locales):seed: every seed rewrites the column on a matched row, so correcting the seed and republishing works.mixed: some seeds of the object write the column back onto a matched row and some do not, and the receipt cannot tell which seed landed which row: correct the value in every seed, then correct, clear or delete the rows the other seeds leave as they are (or declareupserton them where that alone reaches the column);fixnames the writing seeds and the others by reason.mode: every seed of the object isignore, and declaringupsertwould make the replay write the column: correct, clear or delete the stored rows, or declaremode: 'upsert'and correct the seed.stored: no mode change makes the seed write the column on a row it finds again (applyOn: 'create', or a record that does not carry the column): correct, clear or delete the stored rows;fixnames which seed has which reason.mixed,modeandstoredfixtexts end by saying that until a repair is done the next receipt carries no finding for those rows (a republish that changes nothing reads clean).rollup_never_computednits: themessagesays "of one organization" only when the pass was split by organization, which needs the child object to carry a tenant column (an object with no tenant column is one unscoped pass, also when the publish names an organization), and says "sampled parent row(s)"; theuserMessagein all 11 locales says "the records checked" instead of "every record"; the unreleased changeset's "every parent" is corrected. The organization discovery's 50-row sample keeps its shape and its reason is now stated onprobeOrganizations: the list is a loop bound (two reads per organization on the publish request), and a distinct read pushed down would return every organization of the table.One new changeset (
patch,@objectstack/metadata-protocol). No new finding code, no new catalog key, no new export.Why
Under the default
mode: 'ignore'a republish leaves a row it finds again as it is (seed-loader.tswriteRecord, theignorearm returnsskippedwith the existing id). So the old repair, "correct the seed and republish", changed nothing, and the next receipt came back clean because the probe did not read matched rows underignore. And with two seeds of one object, a row only anignoreseed matched was judged under the other seed's mode, and each seed reported the same value again.Tests
Package suite and typecheck (tree `2f2c23e2`)
The package
tsconfig.jsonincludessrc/**/*, so the typecheck compiles both changed test files.New cases, in the shared landed-data harness (
build-probes-landed-data.test.ts, a new top-leveldescribe, per AGENTS.md's shared-harness rule) and asCASESrows ofbuild-probes-user-message.test.ts(one percause, four values, each rendered in all 11 locales):ignore: the first publish's finding names the stored-row orupsertrepair (cause: 'mode'); a republish underignore(row now matched) is not the seed's to judge; after declaringupsertthe matched row keeps being reported with the seed repair until it resolves, then goes silent;ignoreand oneupsertseed of one object: exactly one finding, over the created row only (the matched row's value is not quoted), with themixedrepair naming theupsertseed as writing the column back;upsertseeds of one object: their matched rows in one finding;applyOn: 'create'and a record without the column: the matched row's column is not judged; the created row is, with the stored-row repair;rollup_never_computedon an object with no tenant column: the message claims no organization, also when the publish names an organization.Ablations (one-off, `scripts/ablation-replace.mjs`, restored to HEAD blob each time)
The tests import
./build-probes.jsfromsrc, so nodistrebuild is in the path.seeds.every(toseeds.some(for the writing-mode test: the mixed-seeds case goes red (1 failed / 25).rewritten = writing(drop the per-column rewrite check): the column-not-written case and thestoreduser-message case go red (2 failed / 73).causemodebranch replaced byfalse: theignorecase, the mixed case and themodeuser-message case go red (3 failed / 73).Every leg ended
ok restored: blob == HEADwithgit diff HEADempty.Acceptance notes
ignorea republish never writes a matched row, and the binding scope reads matched rows only when every seed writes, so a republish underignorewith nothing else changed still comes back clean. What changed is the first receipt: its repair is one that works (fix or delete the stored rows, or declareupsert). Afterupsertthe row keeps being reported until it resolves (pinned).ignoretoo). A matched row is judged only when every seed of the object writes.main.Verification
build-probes.ts(the seed-reference section, where the rows judged are chosen per column, and theseedRewritesOnMatchhelpers), thenbuild-probes.user-text.ts(theSEED_REFERENCE_UNRESOLVEDentry).pnpm --filter @objectstack/metadata-protocol exec vitest run src/build-probes-landed-data.test.ts. Expect 26 passed, including the newseed_reference_unresolved is judged per objectblock.Gates
Derived gate families, run locally at `2f2c23e2` (66 derived, 64 run, 2 NOT MEASURED)
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands, then--ranover this record:66 derived famil(ies) accounted for — 64 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).check-empty-changesetexit 1 is the DELIBERATE CORRECTION below; it stays red by design.check:lean-entry-closurefirst answered exit 3 (objectqldistabsent); re-run afterpnpm --filter @objectstack/objectql build: exit 0.check-plugin-teardown-shape --self-test(its positive control is pinned to a commit this shallow clone cannot reach) andcheck:dual-build-cjs-loads(needs every package built). Both run in CI.DELIBERATE CORRECTION
.changeset/34776-publish-checks-build-probes.mdis an unreleased note this PR corrects, because the behaviour it describes changed here. One sentence changed. Before: "rollup_never_computed(a roll-up blank on every parent that has children)". After: "rollup_never_computed(a roll-up blank on all of the sampled parents that have children, judged inside one organization when the rows carry one)".check-empty-changesetstays red on it, as it should.Human Minimum
packages/specholds no runtime logic. (packages/specnot touched.)pnpm lintpasses. (Left to CI.)main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code