fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable - #14440

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse
Sep 2, 2026
Merged

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable#14440
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse

Conversation

@baozhoutao

@baozhoutaobaozhoutao commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes#14393

What changed

bump-objectui.sh reached its degraded emitter (BUMP="${CONSOLE_BUMP:-patch}")
in two states after #14178: the initial pin (no previous SHA — stays permitted,
unchanged here) and a range that walks completely but whose changeset
derivation (objectui-changeset-digest.mjs) throws anyway — the reachable
trigger is a changeset blob unreadable at both to and the commit that added
it. State 2 declared a bump level (patch) nobody actually declared, published
into @objectstack/console's CHANGELOG and the curated release notes, exactly
the shape the #14178 triage ruling forbade ("a patch that reads like a
declaration and silently skips the ADR-0087 disposition prompt is worse than no
record"). This PR makes state 2 refuse instead, matching the #14178
disposition for the unwalkable-range case — RANGE_OK is the discriminator: a
walkable range means a level was derivable in principle, so a failed
derivation there is an error to surface, not a guess to publish.

Placement, per the card's zone 2 item 2

The changeset derivation (node .../objectui-changeset-digest.mjs --out "$CS_FILE") used to run after the .objectui-sha pin write, so a refusal
there alone would have left the pin moved with no record — the exact
half-applied state #10797 exists to prevent, one input further in. This PR
moves the derivation call above the pin write and refuses there on failure.

It writes straight into CS_FILE rather than a temp path moved into place
afterward: reading objectui-changeset-digest.mjs's main(), the --out file
is only written (writeFileSync(out, file)) once the whole digest has built
successfully — a readAt failure throws insidebuildDigest, before that
write is ever reached, so a failing derivation leaves CS_FILE unwritten on
its own. There is no partial-write case left for a temp file to guard against
(confirmed by inspection of objectui-changeset-digest.mjs:763-788 and
:1184-1245 — read-only per the card's file-surface constraint, not modified).

Reproduction (the deliverable per zone 1 / zone 3)

Built a throwaway objectui repo: commit A (previous pin), commit B adding
a .changeset/widget-refresh.md file declaring "@object-ui/core": minor. The range A..B
walks completely (--check-walkable exits 0). Deleted only the changeset
blob object added in B (not the commit) and re-confirmed the walk still
answers 0 — the walk is over commits/trees, --check-walkable never touches
blobs.

Before (unmodified scripts/bump-objectui.sh at origin/main96b627d13),
bump-objectui.sh --no-commit (with commit B as the argument):

✓ objectui-changeset-digest: 51903a2f9b7f..35367ff71983 walks completely in .../objectui.
→ objectui pin: 51903a2f9b7f → 35367ff71983 (on origin/main)
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
at `to` (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
at the commit that added it (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
[node stack trace / Error: Command failed — exit 128]
→ wrote changeset console-35367ff71983.md (@objectstack/console: patch)
→ --no-commit: leaving files unstaged.

Exit 0. .objectui-shamoved. A changeset landed declaring patch with a
"Degraded list" body — exactly the silent-patch defect this card describes.

After (this PR's scripts/bump-objectui.sh), same fixture, same command:

✓ objectui-changeset-digest: 71d868c3b3e9..c3c844b4a73d walks completely in .../objectui.
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
[same two git diagnostics]
✗ REFUSING to bump: the objectui range 71d868c3b3e9...c3c844b4a73d walks
completely in .../objectui, but deriving the @objectstack/console changeset
from it failed — its diagnostic is in this run's output, above.
A level was derivable in principle here; the derivation just failed reading a
changeset blob. This bump used to emit a degraded entry carrying the default
level instead (`patch`) as if it were a declaration nobody made, publishing
into @objectstack/console's CHANGELOG and the curated release notes. No record
beats a wrong one (objectstack#14178 triage ruling), so this refuses instead.
NOTHING WAS WRITTEN — .objectui-sha is untouched and still holds the old pin.
Repair the objectui object store and re-run this bump, or move the pin without
a release record at all: scripts/bump-objectui.sh --no-changeset
(the pin moves, nothing is derived, and nothing is claimed about the range).

Exit 1. .objectui-shabyte-identical to before the run. No changeset
file written.

This exact fixture is case_5 in scripts/bump-objectui.selftest.sh (new),
mirroring the same ok/bad idiom as cases 1-4. It also asserts the fixture
is real — the blob is confirmed gone (git cat-file -e fails) and
--check-walkable is re-asserted green on the broken tree before the bump is
even run, so the case cannot pass over a fixture that never reached this state.

Ablation

Reverted only the refusal commit (git checkout pointed at the fixture-only
commit, for the path scripts/bump-objectui.sh, restoring the pre-fix bytes
while the fixture commit stayed), reran bash scripts/bump-objectui.selftest.sh:

✗ expected a non-zero exit, got 0 — the bump did not refuse
✗ .objectui-sha CHANGED — half-applied state: (the new sha)
✗ no 'REFUSING to bump' in the output; got: → wrote changeset console-....md (@objectstack/console: patch)|...
✓ the refusal says the range WALKS (the discriminator from the unwalkable-range refusal)
✗ the refusal does not tell the operator the tree is clean
✗ a changeset was emitted for a range whose derivation failed
✗ bump-objectui self-test FAILED — 5 assertion(s) failed, 15 passed.

Restored (git checkout HEAD -- scripts/bump-objectui.sh, safe — the fix was
already committed at that point) → bash scripts/bump-objectui.selftest.sh
✓ bump-objectui self-test PASSED — 20 assertions across 5 cases.

check:declared-population-live

Adding case_5 initially introduced ONE bare quoted path literal
(.changeset/widget-refresh.md inside the break_changeset_blob call), which
check:declared-population-live correctly read as a declared population for
the check:objectui-bump family that reaches nothing in this tree (it names a
path inside a disposable mktemp -d checkout, never a tracked file). Fixed by
building the path from a CHANGESET_NAME variable via interpolation
everywhere it's used instead of spelling it as one bare token, plus a
dispatch-gates: no-path-population marker documenting why. Verified with a
direct extractWatchHints call — zero hints now, and check:declared-population-live
is green (157 of 201 families declare a population, all reaching the tree).

Header / self-test-pointer comment sync

Per zone 2 item 5: the header's refusal-states description (bump-objectui.sh:17-52)
and the self-test pointer comment (:90-105) are updated to describe the new
refusal and that case 5 needs node (unlike cases 1-4, which stay offline/no-node).

Changeset

None added. scripts/bump-objectui.sh and scripts/bump-objectui.selftest.sh
publish nothing from any package. Following this repo's own convention for
scripts/**-only changes: PR #14391 (c0eed5648, the direct #14178 precedent —
same two-file surface, a considerably larger change) shipped with no
.changeset/*.md file. This PR's file surface is outside the closed list
os-dev.md lets a dev self-apply skip-changeset for (scripts/pm/**, not
scripts/bump-objectui*), so the label — needed for Check Changeset to pass
— is the PM's call per the card and os-dev.md.

Gates

All commands node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/bump-objectui.sh scripts/bump-objectui.selftest.sh derived
(16 total), run under scripts/pm/os-verify-lock.sh, at final head 85fd2d22e:

commandresult
node scripts/check-ci-filter-parity.mjsRAN-PASS
node scripts/check-cross-package-test-inputs.mjsRAN-PASS
node scripts/check-shard-attestation.mjsRAN-PASS
node scripts/check-test-completeness.mjsNOT MEASURED — PREREQUISITE NOT MET (grades a saved turbo run test log; CI tees it, this branch is unreachable there)
node scripts/pm/bare-root-worklist.mjs --self-testRAN-PASS
pnpm check:agent-test-spellingRAN-PASS
pnpm check:bash32-floorRAN-PASS (153 self-test cases; 26 tracked shell files, 0 findings)
pnpm check:cli-command-idsRAN-PASS
pnpm check:cross-package-test-inputsRAN-PASS
pnpm check:entry-guardRAN-PASS
pnpm check:objectui-bumpRAN-PASS — 20 assertions across 5 cases
pnpm check:objectui-changesetRAN-PASS — digest + range self-tests green (READ-ONLY file, unmodified)
pnpm check:parse-guardRAN-PASS
pnpm check:pm-dispatch-gatesRAN-PASS — dispatch-gates self-test: 1232 cases pass (held the verify-lock 780s/13m under shared-box contention)
pnpm check:pnpm-filter-targetsRAN-PASS
pnpm check:watch-hint-literalRAN-PASS

Also run per zone 3 (not in the derived 16, explicitly named in the dispatch):
pnpm check:ratchet-remedy-authority — RAN-PASS; pnpm check:declared-population-live
— red once (see above), fixed, RAN-PASS after fix. shellcheck on both bash
files: not run — the binary is absent from this container and no workflow
under .github/ runs shellcheck.

All 16 derived local gates are green (check:test-completeness NOT
MEASURED — prerequisite is a CI-only turbo test log). node scripts/check-nul-bytes.mjs
also green.

Generated by Claude Code

…ob is unreadable
Builds a throwaway objectui repo with a real changeset commit, deletes only
the changeset's blob object (not the commit), and asserts --check-walkable
still exits 0 on the broken tree before driving bump-objectui.sh through it.
Red against the unmodified script: it still emits a degraded patch changeset
and exits 0. Adds the objectui-changeset-digest.mjs + invoked-as.mjs copies
the case needs, mirroring the digest script's own self-test fixtures.
…set blob is unreadable
RANGE_OK=1 but objectui-changeset-digest.mjs still fails (a changeset blob
unreadable at both `to` and the commit that added it) used to fall into the
same degraded-patch path as the initial pin, publishing a level nobody
declared into @objectstack/console's CHANGELOG. The range walked, so a level
WAS derivable in principle -- this state now refuses, matching the #14178
disposition for the unwalkable-range case.
Moves the changeset derivation above the pin write so a refused run leaves
.objectui-sha byte-identical and no changeset file, preserving the #10797
write-ordering invariant one input further in: the digest CLI only writes
its --out file once the whole digest has built successfully, so a failing
derivation leaves CS_FILE unwritten on its own -- no temp-file indirection
needed. The initial pin (no previous SHA, no range) is unaffected and keeps
its degraded entry.
Updates the header's refusal-states description and the self-test pointer
comment to describe the new case.
… literal
check:declared-population-live read the quoted '.changeset/widget-refresh.md'
in break_changeset_blob's call as a declared population for check:objectui-bump
-- the whole family's only path-shaped literal, and it reaches no tracked file
since it names a path inside a disposable throwaway checkout. Builds the path
from CHANGESET_NAME by interpolation everywhere it is used instead, and adds
a no-path-population marker documenting why (case 5's fixture paths live only
under mktemp -d).
The block above the pin write no longer opens with the first working-tree
mutation on the success path -- the digest's --out write (CS_FILE) now lands
first, the pin second, since the changeset derivation moved above the pin
write. Reword the comment to state what actually holds: the digest only
writes CS_FILE once the whole digest has built, so a refusal never leaves it
behind; the invariant #10797 needs is that no read of objectui happens below
this point, not that this line is literally the first write.
No behaviour change.
@baozhoutaoClaude

Copy link
Copy Markdown
ContributorAuthor

Reworded the pin-write comment per review: it no longer claims to be "the first mutation" (the digest's --out write to CS_FILE is first on the success path now, the pin second — both land in that order or neither does, since the digest only writes once the whole digest has built). States the actual invariant instead: no read of objectui (git or the digest) happens below this point. Comment-only, no behaviour change.

bash scripts/bump-objectui.selftest.sh — exit 0, 20 assertions across 5 cases, PASSED.
pnpm check:declared-population-live — exit 0, green (157/201 families).

New head: d68f71657

Generated by Claude Code


Generated by Claude Code

@baozhoutaobaozhoutao added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026 — with Claude
@baozhoutao
baozhoutao marked this pull request as ready for review September 2, 2026 08:12
@baozhoutao
baozhoutao added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit d99832aSep 2, 2026
35 of 36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14393-bump-walkable-digest-refuse branch September 2, 2026 08:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump-objectui.sh still emits a default-level patch changeset when the digest fails on a WALKABLE range

2 participants

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable - #14440

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse
Sep 2, 2026
Merged

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable#14440
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse

Conversation

@baozhoutao

@baozhoutaobaozhoutao commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes#14393

What changed

bump-objectui.sh reached its degraded emitter (BUMP="${CONSOLE_BUMP:-patch}")
in two states after #14178: the initial pin (no previous SHA — stays permitted,
unchanged here) and a range that walks completely but whose changeset
derivation (objectui-changeset-digest.mjs) throws anyway — the reachable
trigger is a changeset blob unreadable at both to and the commit that added
it. State 2 declared a bump level (patch) nobody actually declared, published
into @objectstack/console's CHANGELOG and the curated release notes, exactly
the shape the #14178 triage ruling forbade ("a patch that reads like a
declaration and silently skips the ADR-0087 disposition prompt is worse than no
record"). This PR makes state 2 refuse instead, matching the #14178
disposition for the unwalkable-range case — RANGE_OK is the discriminator: a
walkable range means a level was derivable in principle, so a failed
derivation there is an error to surface, not a guess to publish.

Placement, per the card's zone 2 item 2

The changeset derivation (node .../objectui-changeset-digest.mjs --out "$CS_FILE") used to run after the .objectui-sha pin write, so a refusal
there alone would have left the pin moved with no record — the exact
half-applied state #10797 exists to prevent, one input further in. This PR
moves the derivation call above the pin write and refuses there on failure.

It writes straight into CS_FILE rather than a temp path moved into place
afterward: reading objectui-changeset-digest.mjs's main(), the --out file
is only written (writeFileSync(out, file)) once the whole digest has built
successfully — a readAt failure throws insidebuildDigest, before that
write is ever reached, so a failing derivation leaves CS_FILE unwritten on
its own. There is no partial-write case left for a temp file to guard against
(confirmed by inspection of objectui-changeset-digest.mjs:763-788 and
:1184-1245 — read-only per the card's file-surface constraint, not modified).

Reproduction (the deliverable per zone 1 / zone 3)

Built a throwaway objectui repo: commit A (previous pin), commit B adding
a .changeset/widget-refresh.md file declaring "@object-ui/core": minor. The range A..B
walks completely (--check-walkable exits 0). Deleted only the changeset
blob object added in B (not the commit) and re-confirmed the walk still
answers 0 — the walk is over commits/trees, --check-walkable never touches
blobs.

Before (unmodified scripts/bump-objectui.sh at origin/main96b627d13),
bump-objectui.sh --no-commit (with commit B as the argument):

✓ objectui-changeset-digest: 51903a2f9b7f..35367ff71983 walks completely in .../objectui.
→ objectui pin: 51903a2f9b7f → 35367ff71983 (on origin/main)
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
at `to` (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
at the commit that added it (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
[node stack trace / Error: Command failed — exit 128]
→ wrote changeset console-35367ff71983.md (@objectstack/console: patch)
→ --no-commit: leaving files unstaged.

Exit 0. .objectui-shamoved. A changeset landed declaring patch with a
"Degraded list" body — exactly the silent-patch defect this card describes.

After (this PR's scripts/bump-objectui.sh), same fixture, same command:

✓ objectui-changeset-digest: 71d868c3b3e9..c3c844b4a73d walks completely in .../objectui.
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
[same two git diagnostics]
✗ REFUSING to bump: the objectui range 71d868c3b3e9...c3c844b4a73d walks
completely in .../objectui, but deriving the @objectstack/console changeset
from it failed — its diagnostic is in this run's output, above.
A level was derivable in principle here; the derivation just failed reading a
changeset blob. This bump used to emit a degraded entry carrying the default
level instead (`patch`) as if it were a declaration nobody made, publishing
into @objectstack/console's CHANGELOG and the curated release notes. No record
beats a wrong one (objectstack#14178 triage ruling), so this refuses instead.
NOTHING WAS WRITTEN — .objectui-sha is untouched and still holds the old pin.
Repair the objectui object store and re-run this bump, or move the pin without
a release record at all: scripts/bump-objectui.sh --no-changeset
(the pin moves, nothing is derived, and nothing is claimed about the range).

Exit 1. .objectui-shabyte-identical to before the run. No changeset
file written.

This exact fixture is case_5 in scripts/bump-objectui.selftest.sh (new),
mirroring the same ok/bad idiom as cases 1-4. It also asserts the fixture
is real — the blob is confirmed gone (git cat-file -e fails) and
--check-walkable is re-asserted green on the broken tree before the bump is
even run, so the case cannot pass over a fixture that never reached this state.

Ablation

Reverted only the refusal commit (git checkout pointed at the fixture-only
commit, for the path scripts/bump-objectui.sh, restoring the pre-fix bytes
while the fixture commit stayed), reran bash scripts/bump-objectui.selftest.sh:

✗ expected a non-zero exit, got 0 — the bump did not refuse
✗ .objectui-sha CHANGED — half-applied state: (the new sha)
✗ no 'REFUSING to bump' in the output; got: → wrote changeset console-....md (@objectstack/console: patch)|...
✓ the refusal says the range WALKS (the discriminator from the unwalkable-range refusal)
✗ the refusal does not tell the operator the tree is clean
✗ a changeset was emitted for a range whose derivation failed
✗ bump-objectui self-test FAILED — 5 assertion(s) failed, 15 passed.

Restored (git checkout HEAD -- scripts/bump-objectui.sh, safe — the fix was
already committed at that point) → bash scripts/bump-objectui.selftest.sh
✓ bump-objectui self-test PASSED — 20 assertions across 5 cases.

check:declared-population-live

Adding case_5 initially introduced ONE bare quoted path literal
(.changeset/widget-refresh.md inside the break_changeset_blob call), which
check:declared-population-live correctly read as a declared population for
the check:objectui-bump family that reaches nothing in this tree (it names a
path inside a disposable mktemp -d checkout, never a tracked file). Fixed by
building the path from a CHANGESET_NAME variable via interpolation
everywhere it's used instead of spelling it as one bare token, plus a
dispatch-gates: no-path-population marker documenting why. Verified with a
direct extractWatchHints call — zero hints now, and check:declared-population-live
is green (157 of 201 families declare a population, all reaching the tree).

Header / self-test-pointer comment sync

Per zone 2 item 5: the header's refusal-states description (bump-objectui.sh:17-52)
and the self-test pointer comment (:90-105) are updated to describe the new
refusal and that case 5 needs node (unlike cases 1-4, which stay offline/no-node).

Changeset

None added. scripts/bump-objectui.sh and scripts/bump-objectui.selftest.sh
publish nothing from any package. Following this repo's own convention for
scripts/**-only changes: PR #14391 (c0eed5648, the direct #14178 precedent —
same two-file surface, a considerably larger change) shipped with no
.changeset/*.md file. This PR's file surface is outside the closed list
os-dev.md lets a dev self-apply skip-changeset for (scripts/pm/**, not
scripts/bump-objectui*), so the label — needed for Check Changeset to pass
— is the PM's call per the card and os-dev.md.

Gates

All commands node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/bump-objectui.sh scripts/bump-objectui.selftest.sh derived
(16 total), run under scripts/pm/os-verify-lock.sh, at final head 85fd2d22e:

commandresult
node scripts/check-ci-filter-parity.mjsRAN-PASS
node scripts/check-cross-package-test-inputs.mjsRAN-PASS
node scripts/check-shard-attestation.mjsRAN-PASS
node scripts/check-test-completeness.mjsNOT MEASURED — PREREQUISITE NOT MET (grades a saved turbo run test log; CI tees it, this branch is unreachable there)
node scripts/pm/bare-root-worklist.mjs --self-testRAN-PASS
pnpm check:agent-test-spellingRAN-PASS
pnpm check:bash32-floorRAN-PASS (153 self-test cases; 26 tracked shell files, 0 findings)
pnpm check:cli-command-idsRAN-PASS
pnpm check:cross-package-test-inputsRAN-PASS
pnpm check:entry-guardRAN-PASS
pnpm check:objectui-bumpRAN-PASS — 20 assertions across 5 cases
pnpm check:objectui-changesetRAN-PASS — digest + range self-tests green (READ-ONLY file, unmodified)
pnpm check:parse-guardRAN-PASS
pnpm check:pm-dispatch-gatesRAN-PASS — dispatch-gates self-test: 1232 cases pass (held the verify-lock 780s/13m under shared-box contention)
pnpm check:pnpm-filter-targetsRAN-PASS
pnpm check:watch-hint-literalRAN-PASS

Also run per zone 3 (not in the derived 16, explicitly named in the dispatch):
pnpm check:ratchet-remedy-authority — RAN-PASS; pnpm check:declared-population-live
— red once (see above), fixed, RAN-PASS after fix. shellcheck on both bash
files: not run — the binary is absent from this container and no workflow
under .github/ runs shellcheck.

All 16 derived local gates are green (check:test-completeness NOT
MEASURED — prerequisite is a CI-only turbo test log). node scripts/check-nul-bytes.mjs
also green.

Generated by Claude Code

…ob is unreadable
Builds a throwaway objectui repo with a real changeset commit, deletes only
the changeset's blob object (not the commit), and asserts --check-walkable
still exits 0 on the broken tree before driving bump-objectui.sh through it.
Red against the unmodified script: it still emits a degraded patch changeset
and exits 0. Adds the objectui-changeset-digest.mjs + invoked-as.mjs copies
the case needs, mirroring the digest script's own self-test fixtures.
…set blob is unreadable
RANGE_OK=1 but objectui-changeset-digest.mjs still fails (a changeset blob
unreadable at both `to` and the commit that added it) used to fall into the
same degraded-patch path as the initial pin, publishing a level nobody
declared into @objectstack/console's CHANGELOG. The range walked, so a level
WAS derivable in principle -- this state now refuses, matching the #14178
disposition for the unwalkable-range case.
Moves the changeset derivation above the pin write so a refused run leaves
.objectui-sha byte-identical and no changeset file, preserving the #10797
write-ordering invariant one input further in: the digest CLI only writes
its --out file once the whole digest has built successfully, so a failing
derivation leaves CS_FILE unwritten on its own -- no temp-file indirection
needed. The initial pin (no previous SHA, no range) is unaffected and keeps
its degraded entry.
Updates the header's refusal-states description and the self-test pointer
comment to describe the new case.
… literal
check:declared-population-live read the quoted '.changeset/widget-refresh.md'
in break_changeset_blob's call as a declared population for check:objectui-bump
-- the whole family's only path-shaped literal, and it reaches no tracked file
since it names a path inside a disposable throwaway checkout. Builds the path
from CHANGESET_NAME by interpolation everywhere it is used instead, and adds
a no-path-population marker documenting why (case 5's fixture paths live only
under mktemp -d).
The block above the pin write no longer opens with the first working-tree
mutation on the success path -- the digest's --out write (CS_FILE) now lands
first, the pin second, since the changeset derivation moved above the pin
write. Reword the comment to state what actually holds: the digest only
writes CS_FILE once the whole digest has built, so a refusal never leaves it
behind; the invariant #10797 needs is that no read of objectui happens below
this point, not that this line is literally the first write.
No behaviour change.
@baozhoutaoClaude

Copy link
Copy Markdown
ContributorAuthor

Reworded the pin-write comment per review: it no longer claims to be "the first mutation" (the digest's --out write to CS_FILE is first on the success path now, the pin second — both land in that order or neither does, since the digest only writes once the whole digest has built). States the actual invariant instead: no read of objectui (git or the digest) happens below this point. Comment-only, no behaviour change.

bash scripts/bump-objectui.selftest.sh — exit 0, 20 assertions across 5 cases, PASSED.
pnpm check:declared-population-live — exit 0, green (157/201 families).

New head: d68f71657

Generated by Claude Code


Generated by Claude Code

@baozhoutaobaozhoutao added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026 — with Claude
@baozhoutao
baozhoutao marked this pull request as ready for review September 2, 2026 08:12
@baozhoutao
baozhoutao added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit d99832aSep 2, 2026
35 of 36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14393-bump-walkable-digest-refuse branch September 2, 2026 08:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump-objectui.sh still emits a default-level patch changeset when the digest fails on a WALKABLE range

2 participants

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable - #14440

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse
Sep 2, 2026
Merged

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable#14440
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse

Conversation

@baozhoutao

@baozhoutaobaozhoutao commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes#14393

What changed

bump-objectui.sh reached its degraded emitter (BUMP="${CONSOLE_BUMP:-patch}")
in two states after #14178: the initial pin (no previous SHA — stays permitted,
unchanged here) and a range that walks completely but whose changeset
derivation (objectui-changeset-digest.mjs) throws anyway — the reachable
trigger is a changeset blob unreadable at both to and the commit that added
it. State 2 declared a bump level (patch) nobody actually declared, published
into @objectstack/console's CHANGELOG and the curated release notes, exactly
the shape the #14178 triage ruling forbade ("a patch that reads like a
declaration and silently skips the ADR-0087 disposition prompt is worse than no
record"). This PR makes state 2 refuse instead, matching the #14178
disposition for the unwalkable-range case — RANGE_OK is the discriminator: a
walkable range means a level was derivable in principle, so a failed
derivation there is an error to surface, not a guess to publish.

Placement, per the card's zone 2 item 2

The changeset derivation (node .../objectui-changeset-digest.mjs --out "$CS_FILE") used to run after the .objectui-sha pin write, so a refusal
there alone would have left the pin moved with no record — the exact
half-applied state #10797 exists to prevent, one input further in. This PR
moves the derivation call above the pin write and refuses there on failure.

It writes straight into CS_FILE rather than a temp path moved into place
afterward: reading objectui-changeset-digest.mjs's main(), the --out file
is only written (writeFileSync(out, file)) once the whole digest has built
successfully — a readAt failure throws insidebuildDigest, before that
write is ever reached, so a failing derivation leaves CS_FILE unwritten on
its own. There is no partial-write case left for a temp file to guard against
(confirmed by inspection of objectui-changeset-digest.mjs:763-788 and
:1184-1245 — read-only per the card's file-surface constraint, not modified).

Reproduction (the deliverable per zone 1 / zone 3)

Built a throwaway objectui repo: commit A (previous pin), commit B adding
a .changeset/widget-refresh.md file declaring "@object-ui/core": minor. The range A..B
walks completely (--check-walkable exits 0). Deleted only the changeset
blob object added in B (not the commit) and re-confirmed the walk still
answers 0 — the walk is over commits/trees, --check-walkable never touches
blobs.

Before (unmodified scripts/bump-objectui.sh at origin/main96b627d13),
bump-objectui.sh --no-commit (with commit B as the argument):

✓ objectui-changeset-digest: 51903a2f9b7f..35367ff71983 walks completely in .../objectui.
→ objectui pin: 51903a2f9b7f → 35367ff71983 (on origin/main)
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
at `to` (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
at the commit that added it (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
[node stack trace / Error: Command failed — exit 128]
→ wrote changeset console-35367ff71983.md (@objectstack/console: patch)
→ --no-commit: leaving files unstaged.

Exit 0. .objectui-shamoved. A changeset landed declaring patch with a
"Degraded list" body — exactly the silent-patch defect this card describes.

After (this PR's scripts/bump-objectui.sh), same fixture, same command:

✓ objectui-changeset-digest: 71d868c3b3e9..c3c844b4a73d walks completely in .../objectui.
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
[same two git diagnostics]
✗ REFUSING to bump: the objectui range 71d868c3b3e9...c3c844b4a73d walks
completely in .../objectui, but deriving the @objectstack/console changeset
from it failed — its diagnostic is in this run's output, above.
A level was derivable in principle here; the derivation just failed reading a
changeset blob. This bump used to emit a degraded entry carrying the default
level instead (`patch`) as if it were a declaration nobody made, publishing
into @objectstack/console's CHANGELOG and the curated release notes. No record
beats a wrong one (objectstack#14178 triage ruling), so this refuses instead.
NOTHING WAS WRITTEN — .objectui-sha is untouched and still holds the old pin.
Repair the objectui object store and re-run this bump, or move the pin without
a release record at all: scripts/bump-objectui.sh --no-changeset
(the pin moves, nothing is derived, and nothing is claimed about the range).

Exit 1. .objectui-shabyte-identical to before the run. No changeset
file written.

This exact fixture is case_5 in scripts/bump-objectui.selftest.sh (new),
mirroring the same ok/bad idiom as cases 1-4. It also asserts the fixture
is real — the blob is confirmed gone (git cat-file -e fails) and
--check-walkable is re-asserted green on the broken tree before the bump is
even run, so the case cannot pass over a fixture that never reached this state.

Ablation

Reverted only the refusal commit (git checkout pointed at the fixture-only
commit, for the path scripts/bump-objectui.sh, restoring the pre-fix bytes
while the fixture commit stayed), reran bash scripts/bump-objectui.selftest.sh:

✗ expected a non-zero exit, got 0 — the bump did not refuse
✗ .objectui-sha CHANGED — half-applied state: (the new sha)
✗ no 'REFUSING to bump' in the output; got: → wrote changeset console-....md (@objectstack/console: patch)|...
✓ the refusal says the range WALKS (the discriminator from the unwalkable-range refusal)
✗ the refusal does not tell the operator the tree is clean
✗ a changeset was emitted for a range whose derivation failed
✗ bump-objectui self-test FAILED — 5 assertion(s) failed, 15 passed.

Restored (git checkout HEAD -- scripts/bump-objectui.sh, safe — the fix was
already committed at that point) → bash scripts/bump-objectui.selftest.sh
✓ bump-objectui self-test PASSED — 20 assertions across 5 cases.

check:declared-population-live

Adding case_5 initially introduced ONE bare quoted path literal
(.changeset/widget-refresh.md inside the break_changeset_blob call), which
check:declared-population-live correctly read as a declared population for
the check:objectui-bump family that reaches nothing in this tree (it names a
path inside a disposable mktemp -d checkout, never a tracked file). Fixed by
building the path from a CHANGESET_NAME variable via interpolation
everywhere it's used instead of spelling it as one bare token, plus a
dispatch-gates: no-path-population marker documenting why. Verified with a
direct extractWatchHints call — zero hints now, and check:declared-population-live
is green (157 of 201 families declare a population, all reaching the tree).

Header / self-test-pointer comment sync

Per zone 2 item 5: the header's refusal-states description (bump-objectui.sh:17-52)
and the self-test pointer comment (:90-105) are updated to describe the new
refusal and that case 5 needs node (unlike cases 1-4, which stay offline/no-node).

Changeset

None added. scripts/bump-objectui.sh and scripts/bump-objectui.selftest.sh
publish nothing from any package. Following this repo's own convention for
scripts/**-only changes: PR #14391 (c0eed5648, the direct #14178 precedent —
same two-file surface, a considerably larger change) shipped with no
.changeset/*.md file. This PR's file surface is outside the closed list
os-dev.md lets a dev self-apply skip-changeset for (scripts/pm/**, not
scripts/bump-objectui*), so the label — needed for Check Changeset to pass
— is the PM's call per the card and os-dev.md.

Gates

All commands node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/bump-objectui.sh scripts/bump-objectui.selftest.sh derived
(16 total), run under scripts/pm/os-verify-lock.sh, at final head 85fd2d22e:

commandresult
node scripts/check-ci-filter-parity.mjsRAN-PASS
node scripts/check-cross-package-test-inputs.mjsRAN-PASS
node scripts/check-shard-attestation.mjsRAN-PASS
node scripts/check-test-completeness.mjsNOT MEASURED — PREREQUISITE NOT MET (grades a saved turbo run test log; CI tees it, this branch is unreachable there)
node scripts/pm/bare-root-worklist.mjs --self-testRAN-PASS
pnpm check:agent-test-spellingRAN-PASS
pnpm check:bash32-floorRAN-PASS (153 self-test cases; 26 tracked shell files, 0 findings)
pnpm check:cli-command-idsRAN-PASS
pnpm check:cross-package-test-inputsRAN-PASS
pnpm check:entry-guardRAN-PASS
pnpm check:objectui-bumpRAN-PASS — 20 assertions across 5 cases
pnpm check:objectui-changesetRAN-PASS — digest + range self-tests green (READ-ONLY file, unmodified)
pnpm check:parse-guardRAN-PASS
pnpm check:pm-dispatch-gatesRAN-PASS — dispatch-gates self-test: 1232 cases pass (held the verify-lock 780s/13m under shared-box contention)
pnpm check:pnpm-filter-targetsRAN-PASS
pnpm check:watch-hint-literalRAN-PASS

Also run per zone 3 (not in the derived 16, explicitly named in the dispatch):
pnpm check:ratchet-remedy-authority — RAN-PASS; pnpm check:declared-population-live
— red once (see above), fixed, RAN-PASS after fix. shellcheck on both bash
files: not run — the binary is absent from this container and no workflow
under .github/ runs shellcheck.

All 16 derived local gates are green (check:test-completeness NOT
MEASURED — prerequisite is a CI-only turbo test log). node scripts/check-nul-bytes.mjs
also green.

Generated by Claude Code

…ob is unreadable
Builds a throwaway objectui repo with a real changeset commit, deletes only
the changeset's blob object (not the commit), and asserts --check-walkable
still exits 0 on the broken tree before driving bump-objectui.sh through it.
Red against the unmodified script: it still emits a degraded patch changeset
and exits 0. Adds the objectui-changeset-digest.mjs + invoked-as.mjs copies
the case needs, mirroring the digest script's own self-test fixtures.
…set blob is unreadable
RANGE_OK=1 but objectui-changeset-digest.mjs still fails (a changeset blob
unreadable at both `to` and the commit that added it) used to fall into the
same degraded-patch path as the initial pin, publishing a level nobody
declared into @objectstack/console's CHANGELOG. The range walked, so a level
WAS derivable in principle -- this state now refuses, matching the #14178
disposition for the unwalkable-range case.
Moves the changeset derivation above the pin write so a refused run leaves
.objectui-sha byte-identical and no changeset file, preserving the #10797
write-ordering invariant one input further in: the digest CLI only writes
its --out file once the whole digest has built successfully, so a failing
derivation leaves CS_FILE unwritten on its own -- no temp-file indirection
needed. The initial pin (no previous SHA, no range) is unaffected and keeps
its degraded entry.
Updates the header's refusal-states description and the self-test pointer
comment to describe the new case.
… literal
check:declared-population-live read the quoted '.changeset/widget-refresh.md'
in break_changeset_blob's call as a declared population for check:objectui-bump
-- the whole family's only path-shaped literal, and it reaches no tracked file
since it names a path inside a disposable throwaway checkout. Builds the path
from CHANGESET_NAME by interpolation everywhere it is used instead, and adds
a no-path-population marker documenting why (case 5's fixture paths live only
under mktemp -d).
The block above the pin write no longer opens with the first working-tree
mutation on the success path -- the digest's --out write (CS_FILE) now lands
first, the pin second, since the changeset derivation moved above the pin
write. Reword the comment to state what actually holds: the digest only
writes CS_FILE once the whole digest has built, so a refusal never leaves it
behind; the invariant #10797 needs is that no read of objectui happens below
this point, not that this line is literally the first write.
No behaviour change.
@baozhoutaoClaude

Copy link
Copy Markdown
ContributorAuthor

Reworded the pin-write comment per review: it no longer claims to be "the first mutation" (the digest's --out write to CS_FILE is first on the success path now, the pin second — both land in that order or neither does, since the digest only writes once the whole digest has built). States the actual invariant instead: no read of objectui (git or the digest) happens below this point. Comment-only, no behaviour change.

bash scripts/bump-objectui.selftest.sh — exit 0, 20 assertions across 5 cases, PASSED.
pnpm check:declared-population-live — exit 0, green (157/201 families).

New head: d68f71657

Generated by Claude Code


Generated by Claude Code

@baozhoutaobaozhoutao added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026 — with Claude
@baozhoutao
baozhoutao marked this pull request as ready for review September 2, 2026 08:12
@baozhoutao
baozhoutao added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit d99832aSep 2, 2026
35 of 36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14393-bump-walkable-digest-refuse branch September 2, 2026 08:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump-objectui.sh still emits a default-level patch changeset when the digest fails on a WALKABLE range

2 participants

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable - #14440

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse
Sep 2, 2026
Merged

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable#14440
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse

Conversation

@baozhoutao

@baozhoutaobaozhoutao commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes#14393

What changed

bump-objectui.sh reached its degraded emitter (BUMP="${CONSOLE_BUMP:-patch}")
in two states after #14178: the initial pin (no previous SHA — stays permitted,
unchanged here) and a range that walks completely but whose changeset
derivation (objectui-changeset-digest.mjs) throws anyway — the reachable
trigger is a changeset blob unreadable at both to and the commit that added
it. State 2 declared a bump level (patch) nobody actually declared, published
into @objectstack/console's CHANGELOG and the curated release notes, exactly
the shape the #14178 triage ruling forbade ("a patch that reads like a
declaration and silently skips the ADR-0087 disposition prompt is worse than no
record"). This PR makes state 2 refuse instead, matching the #14178
disposition for the unwalkable-range case — RANGE_OK is the discriminator: a
walkable range means a level was derivable in principle, so a failed
derivation there is an error to surface, not a guess to publish.

Placement, per the card's zone 2 item 2

The changeset derivation (node .../objectui-changeset-digest.mjs --out "$CS_FILE") used to run after the .objectui-sha pin write, so a refusal
there alone would have left the pin moved with no record — the exact
half-applied state #10797 exists to prevent, one input further in. This PR
moves the derivation call above the pin write and refuses there on failure.

It writes straight into CS_FILE rather than a temp path moved into place
afterward: reading objectui-changeset-digest.mjs's main(), the --out file
is only written (writeFileSync(out, file)) once the whole digest has built
successfully — a readAt failure throws insidebuildDigest, before that
write is ever reached, so a failing derivation leaves CS_FILE unwritten on
its own. There is no partial-write case left for a temp file to guard against
(confirmed by inspection of objectui-changeset-digest.mjs:763-788 and
:1184-1245 — read-only per the card's file-surface constraint, not modified).

Reproduction (the deliverable per zone 1 / zone 3)

Built a throwaway objectui repo: commit A (previous pin), commit B adding
a .changeset/widget-refresh.md file declaring "@object-ui/core": minor. The range A..B
walks completely (--check-walkable exits 0). Deleted only the changeset
blob object added in B (not the commit) and re-confirmed the walk still
answers 0 — the walk is over commits/trees, --check-walkable never touches
blobs.

Before (unmodified scripts/bump-objectui.sh at origin/main96b627d13),
bump-objectui.sh --no-commit (with commit B as the argument):

✓ objectui-changeset-digest: 51903a2f9b7f..35367ff71983 walks completely in .../objectui.
→ objectui pin: 51903a2f9b7f → 35367ff71983 (on origin/main)
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
at `to` (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
at the commit that added it (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
[node stack trace / Error: Command failed — exit 128]
→ wrote changeset console-35367ff71983.md (@objectstack/console: patch)
→ --no-commit: leaving files unstaged.

Exit 0. .objectui-shamoved. A changeset landed declaring patch with a
"Degraded list" body — exactly the silent-patch defect this card describes.

After (this PR's scripts/bump-objectui.sh), same fixture, same command:

✓ objectui-changeset-digest: 71d868c3b3e9..c3c844b4a73d walks completely in .../objectui.
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
[same two git diagnostics]
✗ REFUSING to bump: the objectui range 71d868c3b3e9...c3c844b4a73d walks
completely in .../objectui, but deriving the @objectstack/console changeset
from it failed — its diagnostic is in this run's output, above.
A level was derivable in principle here; the derivation just failed reading a
changeset blob. This bump used to emit a degraded entry carrying the default
level instead (`patch`) as if it were a declaration nobody made, publishing
into @objectstack/console's CHANGELOG and the curated release notes. No record
beats a wrong one (objectstack#14178 triage ruling), so this refuses instead.
NOTHING WAS WRITTEN — .objectui-sha is untouched and still holds the old pin.
Repair the objectui object store and re-run this bump, or move the pin without
a release record at all: scripts/bump-objectui.sh --no-changeset
(the pin moves, nothing is derived, and nothing is claimed about the range).

Exit 1. .objectui-shabyte-identical to before the run. No changeset
file written.

This exact fixture is case_5 in scripts/bump-objectui.selftest.sh (new),
mirroring the same ok/bad idiom as cases 1-4. It also asserts the fixture
is real — the blob is confirmed gone (git cat-file -e fails) and
--check-walkable is re-asserted green on the broken tree before the bump is
even run, so the case cannot pass over a fixture that never reached this state.

Ablation

Reverted only the refusal commit (git checkout pointed at the fixture-only
commit, for the path scripts/bump-objectui.sh, restoring the pre-fix bytes
while the fixture commit stayed), reran bash scripts/bump-objectui.selftest.sh:

✗ expected a non-zero exit, got 0 — the bump did not refuse
✗ .objectui-sha CHANGED — half-applied state: (the new sha)
✗ no 'REFUSING to bump' in the output; got: → wrote changeset console-....md (@objectstack/console: patch)|...
✓ the refusal says the range WALKS (the discriminator from the unwalkable-range refusal)
✗ the refusal does not tell the operator the tree is clean
✗ a changeset was emitted for a range whose derivation failed
✗ bump-objectui self-test FAILED — 5 assertion(s) failed, 15 passed.

Restored (git checkout HEAD -- scripts/bump-objectui.sh, safe — the fix was
already committed at that point) → bash scripts/bump-objectui.selftest.sh
✓ bump-objectui self-test PASSED — 20 assertions across 5 cases.

check:declared-population-live

Adding case_5 initially introduced ONE bare quoted path literal
(.changeset/widget-refresh.md inside the break_changeset_blob call), which
check:declared-population-live correctly read as a declared population for
the check:objectui-bump family that reaches nothing in this tree (it names a
path inside a disposable mktemp -d checkout, never a tracked file). Fixed by
building the path from a CHANGESET_NAME variable via interpolation
everywhere it's used instead of spelling it as one bare token, plus a
dispatch-gates: no-path-population marker documenting why. Verified with a
direct extractWatchHints call — zero hints now, and check:declared-population-live
is green (157 of 201 families declare a population, all reaching the tree).

Header / self-test-pointer comment sync

Per zone 2 item 5: the header's refusal-states description (bump-objectui.sh:17-52)
and the self-test pointer comment (:90-105) are updated to describe the new
refusal and that case 5 needs node (unlike cases 1-4, which stay offline/no-node).

Changeset

None added. scripts/bump-objectui.sh and scripts/bump-objectui.selftest.sh
publish nothing from any package. Following this repo's own convention for
scripts/**-only changes: PR #14391 (c0eed5648, the direct #14178 precedent —
same two-file surface, a considerably larger change) shipped with no
.changeset/*.md file. This PR's file surface is outside the closed list
os-dev.md lets a dev self-apply skip-changeset for (scripts/pm/**, not
scripts/bump-objectui*), so the label — needed for Check Changeset to pass
— is the PM's call per the card and os-dev.md.

Gates

All commands node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/bump-objectui.sh scripts/bump-objectui.selftest.sh derived
(16 total), run under scripts/pm/os-verify-lock.sh, at final head 85fd2d22e:

commandresult
node scripts/check-ci-filter-parity.mjsRAN-PASS
node scripts/check-cross-package-test-inputs.mjsRAN-PASS
node scripts/check-shard-attestation.mjsRAN-PASS
node scripts/check-test-completeness.mjsNOT MEASURED — PREREQUISITE NOT MET (grades a saved turbo run test log; CI tees it, this branch is unreachable there)
node scripts/pm/bare-root-worklist.mjs --self-testRAN-PASS
pnpm check:agent-test-spellingRAN-PASS
pnpm check:bash32-floorRAN-PASS (153 self-test cases; 26 tracked shell files, 0 findings)
pnpm check:cli-command-idsRAN-PASS
pnpm check:cross-package-test-inputsRAN-PASS
pnpm check:entry-guardRAN-PASS
pnpm check:objectui-bumpRAN-PASS — 20 assertions across 5 cases
pnpm check:objectui-changesetRAN-PASS — digest + range self-tests green (READ-ONLY file, unmodified)
pnpm check:parse-guardRAN-PASS
pnpm check:pm-dispatch-gatesRAN-PASS — dispatch-gates self-test: 1232 cases pass (held the verify-lock 780s/13m under shared-box contention)
pnpm check:pnpm-filter-targetsRAN-PASS
pnpm check:watch-hint-literalRAN-PASS

Also run per zone 3 (not in the derived 16, explicitly named in the dispatch):
pnpm check:ratchet-remedy-authority — RAN-PASS; pnpm check:declared-population-live
— red once (see above), fixed, RAN-PASS after fix. shellcheck on both bash
files: not run — the binary is absent from this container and no workflow
under .github/ runs shellcheck.

All 16 derived local gates are green (check:test-completeness NOT
MEASURED — prerequisite is a CI-only turbo test log). node scripts/check-nul-bytes.mjs
also green.

Generated by Claude Code

…ob is unreadable
Builds a throwaway objectui repo with a real changeset commit, deletes only
the changeset's blob object (not the commit), and asserts --check-walkable
still exits 0 on the broken tree before driving bump-objectui.sh through it.
Red against the unmodified script: it still emits a degraded patch changeset
and exits 0. Adds the objectui-changeset-digest.mjs + invoked-as.mjs copies
the case needs, mirroring the digest script's own self-test fixtures.
…set blob is unreadable
RANGE_OK=1 but objectui-changeset-digest.mjs still fails (a changeset blob
unreadable at both `to` and the commit that added it) used to fall into the
same degraded-patch path as the initial pin, publishing a level nobody
declared into @objectstack/console's CHANGELOG. The range walked, so a level
WAS derivable in principle -- this state now refuses, matching the #14178
disposition for the unwalkable-range case.
Moves the changeset derivation above the pin write so a refused run leaves
.objectui-sha byte-identical and no changeset file, preserving the #10797
write-ordering invariant one input further in: the digest CLI only writes
its --out file once the whole digest has built successfully, so a failing
derivation leaves CS_FILE unwritten on its own -- no temp-file indirection
needed. The initial pin (no previous SHA, no range) is unaffected and keeps
its degraded entry.
Updates the header's refusal-states description and the self-test pointer
comment to describe the new case.
… literal
check:declared-population-live read the quoted '.changeset/widget-refresh.md'
in break_changeset_blob's call as a declared population for check:objectui-bump
-- the whole family's only path-shaped literal, and it reaches no tracked file
since it names a path inside a disposable throwaway checkout. Builds the path
from CHANGESET_NAME by interpolation everywhere it is used instead, and adds
a no-path-population marker documenting why (case 5's fixture paths live only
under mktemp -d).
The block above the pin write no longer opens with the first working-tree
mutation on the success path -- the digest's --out write (CS_FILE) now lands
first, the pin second, since the changeset derivation moved above the pin
write. Reword the comment to state what actually holds: the digest only
writes CS_FILE once the whole digest has built, so a refusal never leaves it
behind; the invariant #10797 needs is that no read of objectui happens below
this point, not that this line is literally the first write.
No behaviour change.
@baozhoutaoClaude

Copy link
Copy Markdown
ContributorAuthor

Reworded the pin-write comment per review: it no longer claims to be "the first mutation" (the digest's --out write to CS_FILE is first on the success path now, the pin second — both land in that order or neither does, since the digest only writes once the whole digest has built). States the actual invariant instead: no read of objectui (git or the digest) happens below this point. Comment-only, no behaviour change.

bash scripts/bump-objectui.selftest.sh — exit 0, 20 assertions across 5 cases, PASSED.
pnpm check:declared-population-live — exit 0, green (157/201 families).

New head: d68f71657

Generated by Claude Code


Generated by Claude Code

@baozhoutaobaozhoutao added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026 — with Claude
@baozhoutao
baozhoutao marked this pull request as ready for review September 2, 2026 08:12
@baozhoutao
baozhoutao added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit d99832aSep 2, 2026
35 of 36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14393-bump-walkable-digest-refuse branch September 2, 2026 08:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump-objectui.sh still emits a default-level patch changeset when the digest fails on a WALKABLE range

2 participants

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable - #14440

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse
Sep 2, 2026
Merged

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable#14440
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse

Conversation

@baozhoutao

@baozhoutaobaozhoutao commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes#14393

What changed

bump-objectui.sh reached its degraded emitter (BUMP="${CONSOLE_BUMP:-patch}")
in two states after #14178: the initial pin (no previous SHA — stays permitted,
unchanged here) and a range that walks completely but whose changeset
derivation (objectui-changeset-digest.mjs) throws anyway — the reachable
trigger is a changeset blob unreadable at both to and the commit that added
it. State 2 declared a bump level (patch) nobody actually declared, published
into @objectstack/console's CHANGELOG and the curated release notes, exactly
the shape the #14178 triage ruling forbade ("a patch that reads like a
declaration and silently skips the ADR-0087 disposition prompt is worse than no
record"). This PR makes state 2 refuse instead, matching the #14178
disposition for the unwalkable-range case — RANGE_OK is the discriminator: a
walkable range means a level was derivable in principle, so a failed
derivation there is an error to surface, not a guess to publish.

Placement, per the card's zone 2 item 2

The changeset derivation (node .../objectui-changeset-digest.mjs --out "$CS_FILE") used to run after the .objectui-sha pin write, so a refusal
there alone would have left the pin moved with no record — the exact
half-applied state #10797 exists to prevent, one input further in. This PR
moves the derivation call above the pin write and refuses there on failure.

It writes straight into CS_FILE rather than a temp path moved into place
afterward: reading objectui-changeset-digest.mjs's main(), the --out file
is only written (writeFileSync(out, file)) once the whole digest has built
successfully — a readAt failure throws insidebuildDigest, before that
write is ever reached, so a failing derivation leaves CS_FILE unwritten on
its own. There is no partial-write case left for a temp file to guard against
(confirmed by inspection of objectui-changeset-digest.mjs:763-788 and
:1184-1245 — read-only per the card's file-surface constraint, not modified).

Reproduction (the deliverable per zone 1 / zone 3)

Built a throwaway objectui repo: commit A (previous pin), commit B adding
a .changeset/widget-refresh.md file declaring "@object-ui/core": minor. The range A..B
walks completely (--check-walkable exits 0). Deleted only the changeset
blob object added in B (not the commit) and re-confirmed the walk still
answers 0 — the walk is over commits/trees, --check-walkable never touches
blobs.

Before (unmodified scripts/bump-objectui.sh at origin/main96b627d13),
bump-objectui.sh --no-commit (with commit B as the argument):

✓ objectui-changeset-digest: 51903a2f9b7f..35367ff71983 walks completely in .../objectui.
→ objectui pin: 51903a2f9b7f → 35367ff71983 (on origin/main)
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
at `to` (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
at the commit that added it (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
[node stack trace / Error: Command failed — exit 128]
→ wrote changeset console-35367ff71983.md (@objectstack/console: patch)
→ --no-commit: leaving files unstaged.

Exit 0. .objectui-shamoved. A changeset landed declaring patch with a
"Degraded list" body — exactly the silent-patch defect this card describes.

After (this PR's scripts/bump-objectui.sh), same fixture, same command:

✓ objectui-changeset-digest: 71d868c3b3e9..c3c844b4a73d walks completely in .../objectui.
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
[same two git diagnostics]
✗ REFUSING to bump: the objectui range 71d868c3b3e9...c3c844b4a73d walks
completely in .../objectui, but deriving the @objectstack/console changeset
from it failed — its diagnostic is in this run's output, above.
A level was derivable in principle here; the derivation just failed reading a
changeset blob. This bump used to emit a degraded entry carrying the default
level instead (`patch`) as if it were a declaration nobody made, publishing
into @objectstack/console's CHANGELOG and the curated release notes. No record
beats a wrong one (objectstack#14178 triage ruling), so this refuses instead.
NOTHING WAS WRITTEN — .objectui-sha is untouched and still holds the old pin.
Repair the objectui object store and re-run this bump, or move the pin without
a release record at all: scripts/bump-objectui.sh --no-changeset
(the pin moves, nothing is derived, and nothing is claimed about the range).

Exit 1. .objectui-shabyte-identical to before the run. No changeset
file written.

This exact fixture is case_5 in scripts/bump-objectui.selftest.sh (new),
mirroring the same ok/bad idiom as cases 1-4. It also asserts the fixture
is real — the blob is confirmed gone (git cat-file -e fails) and
--check-walkable is re-asserted green on the broken tree before the bump is
even run, so the case cannot pass over a fixture that never reached this state.

Ablation

Reverted only the refusal commit (git checkout pointed at the fixture-only
commit, for the path scripts/bump-objectui.sh, restoring the pre-fix bytes
while the fixture commit stayed), reran bash scripts/bump-objectui.selftest.sh:

✗ expected a non-zero exit, got 0 — the bump did not refuse
✗ .objectui-sha CHANGED — half-applied state: (the new sha)
✗ no 'REFUSING to bump' in the output; got: → wrote changeset console-....md (@objectstack/console: patch)|...
✓ the refusal says the range WALKS (the discriminator from the unwalkable-range refusal)
✗ the refusal does not tell the operator the tree is clean
✗ a changeset was emitted for a range whose derivation failed
✗ bump-objectui self-test FAILED — 5 assertion(s) failed, 15 passed.

Restored (git checkout HEAD -- scripts/bump-objectui.sh, safe — the fix was
already committed at that point) → bash scripts/bump-objectui.selftest.sh
✓ bump-objectui self-test PASSED — 20 assertions across 5 cases.

check:declared-population-live

Adding case_5 initially introduced ONE bare quoted path literal
(.changeset/widget-refresh.md inside the break_changeset_blob call), which
check:declared-population-live correctly read as a declared population for
the check:objectui-bump family that reaches nothing in this tree (it names a
path inside a disposable mktemp -d checkout, never a tracked file). Fixed by
building the path from a CHANGESET_NAME variable via interpolation
everywhere it's used instead of spelling it as one bare token, plus a
dispatch-gates: no-path-population marker documenting why. Verified with a
direct extractWatchHints call — zero hints now, and check:declared-population-live
is green (157 of 201 families declare a population, all reaching the tree).

Header / self-test-pointer comment sync

Per zone 2 item 5: the header's refusal-states description (bump-objectui.sh:17-52)
and the self-test pointer comment (:90-105) are updated to describe the new
refusal and that case 5 needs node (unlike cases 1-4, which stay offline/no-node).

Changeset

None added. scripts/bump-objectui.sh and scripts/bump-objectui.selftest.sh
publish nothing from any package. Following this repo's own convention for
scripts/**-only changes: PR #14391 (c0eed5648, the direct #14178 precedent —
same two-file surface, a considerably larger change) shipped with no
.changeset/*.md file. This PR's file surface is outside the closed list
os-dev.md lets a dev self-apply skip-changeset for (scripts/pm/**, not
scripts/bump-objectui*), so the label — needed for Check Changeset to pass
— is the PM's call per the card and os-dev.md.

Gates

All commands node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/bump-objectui.sh scripts/bump-objectui.selftest.sh derived
(16 total), run under scripts/pm/os-verify-lock.sh, at final head 85fd2d22e:

commandresult
node scripts/check-ci-filter-parity.mjsRAN-PASS
node scripts/check-cross-package-test-inputs.mjsRAN-PASS
node scripts/check-shard-attestation.mjsRAN-PASS
node scripts/check-test-completeness.mjsNOT MEASURED — PREREQUISITE NOT MET (grades a saved turbo run test log; CI tees it, this branch is unreachable there)
node scripts/pm/bare-root-worklist.mjs --self-testRAN-PASS
pnpm check:agent-test-spellingRAN-PASS
pnpm check:bash32-floorRAN-PASS (153 self-test cases; 26 tracked shell files, 0 findings)
pnpm check:cli-command-idsRAN-PASS
pnpm check:cross-package-test-inputsRAN-PASS
pnpm check:entry-guardRAN-PASS
pnpm check:objectui-bumpRAN-PASS — 20 assertions across 5 cases
pnpm check:objectui-changesetRAN-PASS — digest + range self-tests green (READ-ONLY file, unmodified)
pnpm check:parse-guardRAN-PASS
pnpm check:pm-dispatch-gatesRAN-PASS — dispatch-gates self-test: 1232 cases pass (held the verify-lock 780s/13m under shared-box contention)
pnpm check:pnpm-filter-targetsRAN-PASS
pnpm check:watch-hint-literalRAN-PASS

Also run per zone 3 (not in the derived 16, explicitly named in the dispatch):
pnpm check:ratchet-remedy-authority — RAN-PASS; pnpm check:declared-population-live
— red once (see above), fixed, RAN-PASS after fix. shellcheck on both bash
files: not run — the binary is absent from this container and no workflow
under .github/ runs shellcheck.

All 16 derived local gates are green (check:test-completeness NOT
MEASURED — prerequisite is a CI-only turbo test log). node scripts/check-nul-bytes.mjs
also green.

Generated by Claude Code

…ob is unreadable
Builds a throwaway objectui repo with a real changeset commit, deletes only
the changeset's blob object (not the commit), and asserts --check-walkable
still exits 0 on the broken tree before driving bump-objectui.sh through it.
Red against the unmodified script: it still emits a degraded patch changeset
and exits 0. Adds the objectui-changeset-digest.mjs + invoked-as.mjs copies
the case needs, mirroring the digest script's own self-test fixtures.
…set blob is unreadable
RANGE_OK=1 but objectui-changeset-digest.mjs still fails (a changeset blob
unreadable at both `to` and the commit that added it) used to fall into the
same degraded-patch path as the initial pin, publishing a level nobody
declared into @objectstack/console's CHANGELOG. The range walked, so a level
WAS derivable in principle -- this state now refuses, matching the #14178
disposition for the unwalkable-range case.
Moves the changeset derivation above the pin write so a refused run leaves
.objectui-sha byte-identical and no changeset file, preserving the #10797
write-ordering invariant one input further in: the digest CLI only writes
its --out file once the whole digest has built successfully, so a failing
derivation leaves CS_FILE unwritten on its own -- no temp-file indirection
needed. The initial pin (no previous SHA, no range) is unaffected and keeps
its degraded entry.
Updates the header's refusal-states description and the self-test pointer
comment to describe the new case.
… literal
check:declared-population-live read the quoted '.changeset/widget-refresh.md'
in break_changeset_blob's call as a declared population for check:objectui-bump
-- the whole family's only path-shaped literal, and it reaches no tracked file
since it names a path inside a disposable throwaway checkout. Builds the path
from CHANGESET_NAME by interpolation everywhere it is used instead, and adds
a no-path-population marker documenting why (case 5's fixture paths live only
under mktemp -d).
The block above the pin write no longer opens with the first working-tree
mutation on the success path -- the digest's --out write (CS_FILE) now lands
first, the pin second, since the changeset derivation moved above the pin
write. Reword the comment to state what actually holds: the digest only
writes CS_FILE once the whole digest has built, so a refusal never leaves it
behind; the invariant #10797 needs is that no read of objectui happens below
this point, not that this line is literally the first write.
No behaviour change.
@baozhoutaoClaude

Copy link
Copy Markdown
ContributorAuthor

Reworded the pin-write comment per review: it no longer claims to be "the first mutation" (the digest's --out write to CS_FILE is first on the success path now, the pin second — both land in that order or neither does, since the digest only writes once the whole digest has built). States the actual invariant instead: no read of objectui (git or the digest) happens below this point. Comment-only, no behaviour change.

bash scripts/bump-objectui.selftest.sh — exit 0, 20 assertions across 5 cases, PASSED.
pnpm check:declared-population-live — exit 0, green (157/201 families).

New head: d68f71657

Generated by Claude Code


Generated by Claude Code

@baozhoutaobaozhoutao added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026 — with Claude
@baozhoutao
baozhoutao marked this pull request as ready for review September 2, 2026 08:12
@baozhoutao
baozhoutao added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit d99832aSep 2, 2026
35 of 36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14393-bump-walkable-digest-refuse branch September 2, 2026 08:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump-objectui.sh still emits a default-level patch changeset when the digest fails on a WALKABLE range

2 participants

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable - #14440

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse
Sep 2, 2026
Merged

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable#14440
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse

Conversation

@baozhoutao

@baozhoutaobaozhoutao commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes#14393

What changed

bump-objectui.sh reached its degraded emitter (BUMP="${CONSOLE_BUMP:-patch}")
in two states after #14178: the initial pin (no previous SHA — stays permitted,
unchanged here) and a range that walks completely but whose changeset
derivation (objectui-changeset-digest.mjs) throws anyway — the reachable
trigger is a changeset blob unreadable at both to and the commit that added
it. State 2 declared a bump level (patch) nobody actually declared, published
into @objectstack/console's CHANGELOG and the curated release notes, exactly
the shape the #14178 triage ruling forbade ("a patch that reads like a
declaration and silently skips the ADR-0087 disposition prompt is worse than no
record"). This PR makes state 2 refuse instead, matching the #14178
disposition for the unwalkable-range case — RANGE_OK is the discriminator: a
walkable range means a level was derivable in principle, so a failed
derivation there is an error to surface, not a guess to publish.

Placement, per the card's zone 2 item 2

The changeset derivation (node .../objectui-changeset-digest.mjs --out "$CS_FILE") used to run after the .objectui-sha pin write, so a refusal
there alone would have left the pin moved with no record — the exact
half-applied state #10797 exists to prevent, one input further in. This PR
moves the derivation call above the pin write and refuses there on failure.

It writes straight into CS_FILE rather than a temp path moved into place
afterward: reading objectui-changeset-digest.mjs's main(), the --out file
is only written (writeFileSync(out, file)) once the whole digest has built
successfully — a readAt failure throws insidebuildDigest, before that
write is ever reached, so a failing derivation leaves CS_FILE unwritten on
its own. There is no partial-write case left for a temp file to guard against
(confirmed by inspection of objectui-changeset-digest.mjs:763-788 and
:1184-1245 — read-only per the card's file-surface constraint, not modified).

Reproduction (the deliverable per zone 1 / zone 3)

Built a throwaway objectui repo: commit A (previous pin), commit B adding
a .changeset/widget-refresh.md file declaring "@object-ui/core": minor. The range A..B
walks completely (--check-walkable exits 0). Deleted only the changeset
blob object added in B (not the commit) and re-confirmed the walk still
answers 0 — the walk is over commits/trees, --check-walkable never touches
blobs.

Before (unmodified scripts/bump-objectui.sh at origin/main96b627d13),
bump-objectui.sh --no-commit (with commit B as the argument):

✓ objectui-changeset-digest: 51903a2f9b7f..35367ff71983 walks completely in .../objectui.
→ objectui pin: 51903a2f9b7f → 35367ff71983 (on origin/main)
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
at `to` (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
at the commit that added it (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
[node stack trace / Error: Command failed — exit 128]
→ wrote changeset console-35367ff71983.md (@objectstack/console: patch)
→ --no-commit: leaving files unstaged.

Exit 0. .objectui-shamoved. A changeset landed declaring patch with a
"Degraded list" body — exactly the silent-patch defect this card describes.

After (this PR's scripts/bump-objectui.sh), same fixture, same command:

✓ objectui-changeset-digest: 71d868c3b3e9..c3c844b4a73d walks completely in .../objectui.
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
[same two git diagnostics]
✗ REFUSING to bump: the objectui range 71d868c3b3e9...c3c844b4a73d walks
completely in .../objectui, but deriving the @objectstack/console changeset
from it failed — its diagnostic is in this run's output, above.
A level was derivable in principle here; the derivation just failed reading a
changeset blob. This bump used to emit a degraded entry carrying the default
level instead (`patch`) as if it were a declaration nobody made, publishing
into @objectstack/console's CHANGELOG and the curated release notes. No record
beats a wrong one (objectstack#14178 triage ruling), so this refuses instead.
NOTHING WAS WRITTEN — .objectui-sha is untouched and still holds the old pin.
Repair the objectui object store and re-run this bump, or move the pin without
a release record at all: scripts/bump-objectui.sh --no-changeset
(the pin moves, nothing is derived, and nothing is claimed about the range).

Exit 1. .objectui-shabyte-identical to before the run. No changeset
file written.

This exact fixture is case_5 in scripts/bump-objectui.selftest.sh (new),
mirroring the same ok/bad idiom as cases 1-4. It also asserts the fixture
is real — the blob is confirmed gone (git cat-file -e fails) and
--check-walkable is re-asserted green on the broken tree before the bump is
even run, so the case cannot pass over a fixture that never reached this state.

Ablation

Reverted only the refusal commit (git checkout pointed at the fixture-only
commit, for the path scripts/bump-objectui.sh, restoring the pre-fix bytes
while the fixture commit stayed), reran bash scripts/bump-objectui.selftest.sh:

✗ expected a non-zero exit, got 0 — the bump did not refuse
✗ .objectui-sha CHANGED — half-applied state: (the new sha)
✗ no 'REFUSING to bump' in the output; got: → wrote changeset console-....md (@objectstack/console: patch)|...
✓ the refusal says the range WALKS (the discriminator from the unwalkable-range refusal)
✗ the refusal does not tell the operator the tree is clean
✗ a changeset was emitted for a range whose derivation failed
✗ bump-objectui self-test FAILED — 5 assertion(s) failed, 15 passed.

Restored (git checkout HEAD -- scripts/bump-objectui.sh, safe — the fix was
already committed at that point) → bash scripts/bump-objectui.selftest.sh
✓ bump-objectui self-test PASSED — 20 assertions across 5 cases.

check:declared-population-live

Adding case_5 initially introduced ONE bare quoted path literal
(.changeset/widget-refresh.md inside the break_changeset_blob call), which
check:declared-population-live correctly read as a declared population for
the check:objectui-bump family that reaches nothing in this tree (it names a
path inside a disposable mktemp -d checkout, never a tracked file). Fixed by
building the path from a CHANGESET_NAME variable via interpolation
everywhere it's used instead of spelling it as one bare token, plus a
dispatch-gates: no-path-population marker documenting why. Verified with a
direct extractWatchHints call — zero hints now, and check:declared-population-live
is green (157 of 201 families declare a population, all reaching the tree).

Header / self-test-pointer comment sync

Per zone 2 item 5: the header's refusal-states description (bump-objectui.sh:17-52)
and the self-test pointer comment (:90-105) are updated to describe the new
refusal and that case 5 needs node (unlike cases 1-4, which stay offline/no-node).

Changeset

None added. scripts/bump-objectui.sh and scripts/bump-objectui.selftest.sh
publish nothing from any package. Following this repo's own convention for
scripts/**-only changes: PR #14391 (c0eed5648, the direct #14178 precedent —
same two-file surface, a considerably larger change) shipped with no
.changeset/*.md file. This PR's file surface is outside the closed list
os-dev.md lets a dev self-apply skip-changeset for (scripts/pm/**, not
scripts/bump-objectui*), so the label — needed for Check Changeset to pass
— is the PM's call per the card and os-dev.md.

Gates

All commands node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/bump-objectui.sh scripts/bump-objectui.selftest.sh derived
(16 total), run under scripts/pm/os-verify-lock.sh, at final head 85fd2d22e:

commandresult
node scripts/check-ci-filter-parity.mjsRAN-PASS
node scripts/check-cross-package-test-inputs.mjsRAN-PASS
node scripts/check-shard-attestation.mjsRAN-PASS
node scripts/check-test-completeness.mjsNOT MEASURED — PREREQUISITE NOT MET (grades a saved turbo run test log; CI tees it, this branch is unreachable there)
node scripts/pm/bare-root-worklist.mjs --self-testRAN-PASS
pnpm check:agent-test-spellingRAN-PASS
pnpm check:bash32-floorRAN-PASS (153 self-test cases; 26 tracked shell files, 0 findings)
pnpm check:cli-command-idsRAN-PASS
pnpm check:cross-package-test-inputsRAN-PASS
pnpm check:entry-guardRAN-PASS
pnpm check:objectui-bumpRAN-PASS — 20 assertions across 5 cases
pnpm check:objectui-changesetRAN-PASS — digest + range self-tests green (READ-ONLY file, unmodified)
pnpm check:parse-guardRAN-PASS
pnpm check:pm-dispatch-gatesRAN-PASS — dispatch-gates self-test: 1232 cases pass (held the verify-lock 780s/13m under shared-box contention)
pnpm check:pnpm-filter-targetsRAN-PASS
pnpm check:watch-hint-literalRAN-PASS

Also run per zone 3 (not in the derived 16, explicitly named in the dispatch):
pnpm check:ratchet-remedy-authority — RAN-PASS; pnpm check:declared-population-live
— red once (see above), fixed, RAN-PASS after fix. shellcheck on both bash
files: not run — the binary is absent from this container and no workflow
under .github/ runs shellcheck.

All 16 derived local gates are green (check:test-completeness NOT
MEASURED — prerequisite is a CI-only turbo test log). node scripts/check-nul-bytes.mjs
also green.

Generated by Claude Code

…ob is unreadable
Builds a throwaway objectui repo with a real changeset commit, deletes only
the changeset's blob object (not the commit), and asserts --check-walkable
still exits 0 on the broken tree before driving bump-objectui.sh through it.
Red against the unmodified script: it still emits a degraded patch changeset
and exits 0. Adds the objectui-changeset-digest.mjs + invoked-as.mjs copies
the case needs, mirroring the digest script's own self-test fixtures.
…set blob is unreadable
RANGE_OK=1 but objectui-changeset-digest.mjs still fails (a changeset blob
unreadable at both `to` and the commit that added it) used to fall into the
same degraded-patch path as the initial pin, publishing a level nobody
declared into @objectstack/console's CHANGELOG. The range walked, so a level
WAS derivable in principle -- this state now refuses, matching the #14178
disposition for the unwalkable-range case.
Moves the changeset derivation above the pin write so a refused run leaves
.objectui-sha byte-identical and no changeset file, preserving the #10797
write-ordering invariant one input further in: the digest CLI only writes
its --out file once the whole digest has built successfully, so a failing
derivation leaves CS_FILE unwritten on its own -- no temp-file indirection
needed. The initial pin (no previous SHA, no range) is unaffected and keeps
its degraded entry.
Updates the header's refusal-states description and the self-test pointer
comment to describe the new case.
… literal
check:declared-population-live read the quoted '.changeset/widget-refresh.md'
in break_changeset_blob's call as a declared population for check:objectui-bump
-- the whole family's only path-shaped literal, and it reaches no tracked file
since it names a path inside a disposable throwaway checkout. Builds the path
from CHANGESET_NAME by interpolation everywhere it is used instead, and adds
a no-path-population marker documenting why (case 5's fixture paths live only
under mktemp -d).
The block above the pin write no longer opens with the first working-tree
mutation on the success path -- the digest's --out write (CS_FILE) now lands
first, the pin second, since the changeset derivation moved above the pin
write. Reword the comment to state what actually holds: the digest only
writes CS_FILE once the whole digest has built, so a refusal never leaves it
behind; the invariant #10797 needs is that no read of objectui happens below
this point, not that this line is literally the first write.
No behaviour change.
@baozhoutaoClaude

Copy link
Copy Markdown
ContributorAuthor

Reworded the pin-write comment per review: it no longer claims to be "the first mutation" (the digest's --out write to CS_FILE is first on the success path now, the pin second — both land in that order or neither does, since the digest only writes once the whole digest has built). States the actual invariant instead: no read of objectui (git or the digest) happens below this point. Comment-only, no behaviour change.

bash scripts/bump-objectui.selftest.sh — exit 0, 20 assertions across 5 cases, PASSED.
pnpm check:declared-population-live — exit 0, green (157/201 families).

New head: d68f71657

Generated by Claude Code


Generated by Claude Code

@baozhoutaobaozhoutao added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026 — with Claude
@baozhoutao
baozhoutao marked this pull request as ready for review September 2, 2026 08:12
@baozhoutao
baozhoutao added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit d99832aSep 2, 2026
35 of 36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14393-bump-walkable-digest-refuse branch September 2, 2026 08:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump-objectui.sh still emits a default-level patch changeset when the digest fails on a WALKABLE range

2 participants

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable - #14440

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse
Sep 2, 2026
Merged

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable#14440
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse

Conversation

@baozhoutao

@baozhoutaobaozhoutao commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes#14393

What changed

bump-objectui.sh reached its degraded emitter (BUMP="${CONSOLE_BUMP:-patch}")
in two states after #14178: the initial pin (no previous SHA — stays permitted,
unchanged here) and a range that walks completely but whose changeset
derivation (objectui-changeset-digest.mjs) throws anyway — the reachable
trigger is a changeset blob unreadable at both to and the commit that added
it. State 2 declared a bump level (patch) nobody actually declared, published
into @objectstack/console's CHANGELOG and the curated release notes, exactly
the shape the #14178 triage ruling forbade ("a patch that reads like a
declaration and silently skips the ADR-0087 disposition prompt is worse than no
record"). This PR makes state 2 refuse instead, matching the #14178
disposition for the unwalkable-range case — RANGE_OK is the discriminator: a
walkable range means a level was derivable in principle, so a failed
derivation there is an error to surface, not a guess to publish.

Placement, per the card's zone 2 item 2

The changeset derivation (node .../objectui-changeset-digest.mjs --out "$CS_FILE") used to run after the .objectui-sha pin write, so a refusal
there alone would have left the pin moved with no record — the exact
half-applied state #10797 exists to prevent, one input further in. This PR
moves the derivation call above the pin write and refuses there on failure.

It writes straight into CS_FILE rather than a temp path moved into place
afterward: reading objectui-changeset-digest.mjs's main(), the --out file
is only written (writeFileSync(out, file)) once the whole digest has built
successfully — a readAt failure throws insidebuildDigest, before that
write is ever reached, so a failing derivation leaves CS_FILE unwritten on
its own. There is no partial-write case left for a temp file to guard against
(confirmed by inspection of objectui-changeset-digest.mjs:763-788 and
:1184-1245 — read-only per the card's file-surface constraint, not modified).

Reproduction (the deliverable per zone 1 / zone 3)

Built a throwaway objectui repo: commit A (previous pin), commit B adding
a .changeset/widget-refresh.md file declaring "@object-ui/core": minor. The range A..B
walks completely (--check-walkable exits 0). Deleted only the changeset
blob object added in B (not the commit) and re-confirmed the walk still
answers 0 — the walk is over commits/trees, --check-walkable never touches
blobs.

Before (unmodified scripts/bump-objectui.sh at origin/main96b627d13),
bump-objectui.sh --no-commit (with commit B as the argument):

✓ objectui-changeset-digest: 51903a2f9b7f..35367ff71983 walks completely in .../objectui.
→ objectui pin: 51903a2f9b7f → 35367ff71983 (on origin/main)
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
at `to` (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
at the commit that added it (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
[node stack trace / Error: Command failed — exit 128]
→ wrote changeset console-35367ff71983.md (@objectstack/console: patch)
→ --no-commit: leaving files unstaged.

Exit 0. .objectui-shamoved. A changeset landed declaring patch with a
"Degraded list" body — exactly the silent-patch defect this card describes.

After (this PR's scripts/bump-objectui.sh), same fixture, same command:

✓ objectui-changeset-digest: 71d868c3b3e9..c3c844b4a73d walks completely in .../objectui.
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
[same two git diagnostics]
✗ REFUSING to bump: the objectui range 71d868c3b3e9...c3c844b4a73d walks
completely in .../objectui, but deriving the @objectstack/console changeset
from it failed — its diagnostic is in this run's output, above.
A level was derivable in principle here; the derivation just failed reading a
changeset blob. This bump used to emit a degraded entry carrying the default
level instead (`patch`) as if it were a declaration nobody made, publishing
into @objectstack/console's CHANGELOG and the curated release notes. No record
beats a wrong one (objectstack#14178 triage ruling), so this refuses instead.
NOTHING WAS WRITTEN — .objectui-sha is untouched and still holds the old pin.
Repair the objectui object store and re-run this bump, or move the pin without
a release record at all: scripts/bump-objectui.sh --no-changeset
(the pin moves, nothing is derived, and nothing is claimed about the range).

Exit 1. .objectui-shabyte-identical to before the run. No changeset
file written.

This exact fixture is case_5 in scripts/bump-objectui.selftest.sh (new),
mirroring the same ok/bad idiom as cases 1-4. It also asserts the fixture
is real — the blob is confirmed gone (git cat-file -e fails) and
--check-walkable is re-asserted green on the broken tree before the bump is
even run, so the case cannot pass over a fixture that never reached this state.

Ablation

Reverted only the refusal commit (git checkout pointed at the fixture-only
commit, for the path scripts/bump-objectui.sh, restoring the pre-fix bytes
while the fixture commit stayed), reran bash scripts/bump-objectui.selftest.sh:

✗ expected a non-zero exit, got 0 — the bump did not refuse
✗ .objectui-sha CHANGED — half-applied state: (the new sha)
✗ no 'REFUSING to bump' in the output; got: → wrote changeset console-....md (@objectstack/console: patch)|...
✓ the refusal says the range WALKS (the discriminator from the unwalkable-range refusal)
✗ the refusal does not tell the operator the tree is clean
✗ a changeset was emitted for a range whose derivation failed
✗ bump-objectui self-test FAILED — 5 assertion(s) failed, 15 passed.

Restored (git checkout HEAD -- scripts/bump-objectui.sh, safe — the fix was
already committed at that point) → bash scripts/bump-objectui.selftest.sh
✓ bump-objectui self-test PASSED — 20 assertions across 5 cases.

check:declared-population-live

Adding case_5 initially introduced ONE bare quoted path literal
(.changeset/widget-refresh.md inside the break_changeset_blob call), which
check:declared-population-live correctly read as a declared population for
the check:objectui-bump family that reaches nothing in this tree (it names a
path inside a disposable mktemp -d checkout, never a tracked file). Fixed by
building the path from a CHANGESET_NAME variable via interpolation
everywhere it's used instead of spelling it as one bare token, plus a
dispatch-gates: no-path-population marker documenting why. Verified with a
direct extractWatchHints call — zero hints now, and check:declared-population-live
is green (157 of 201 families declare a population, all reaching the tree).

Header / self-test-pointer comment sync

Per zone 2 item 5: the header's refusal-states description (bump-objectui.sh:17-52)
and the self-test pointer comment (:90-105) are updated to describe the new
refusal and that case 5 needs node (unlike cases 1-4, which stay offline/no-node).

Changeset

None added. scripts/bump-objectui.sh and scripts/bump-objectui.selftest.sh
publish nothing from any package. Following this repo's own convention for
scripts/**-only changes: PR #14391 (c0eed5648, the direct #14178 precedent —
same two-file surface, a considerably larger change) shipped with no
.changeset/*.md file. This PR's file surface is outside the closed list
os-dev.md lets a dev self-apply skip-changeset for (scripts/pm/**, not
scripts/bump-objectui*), so the label — needed for Check Changeset to pass
— is the PM's call per the card and os-dev.md.

Gates

All commands node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/bump-objectui.sh scripts/bump-objectui.selftest.sh derived
(16 total), run under scripts/pm/os-verify-lock.sh, at final head 85fd2d22e:

commandresult
node scripts/check-ci-filter-parity.mjsRAN-PASS
node scripts/check-cross-package-test-inputs.mjsRAN-PASS
node scripts/check-shard-attestation.mjsRAN-PASS
node scripts/check-test-completeness.mjsNOT MEASURED — PREREQUISITE NOT MET (grades a saved turbo run test log; CI tees it, this branch is unreachable there)
node scripts/pm/bare-root-worklist.mjs --self-testRAN-PASS
pnpm check:agent-test-spellingRAN-PASS
pnpm check:bash32-floorRAN-PASS (153 self-test cases; 26 tracked shell files, 0 findings)
pnpm check:cli-command-idsRAN-PASS
pnpm check:cross-package-test-inputsRAN-PASS
pnpm check:entry-guardRAN-PASS
pnpm check:objectui-bumpRAN-PASS — 20 assertions across 5 cases
pnpm check:objectui-changesetRAN-PASS — digest + range self-tests green (READ-ONLY file, unmodified)
pnpm check:parse-guardRAN-PASS
pnpm check:pm-dispatch-gatesRAN-PASS — dispatch-gates self-test: 1232 cases pass (held the verify-lock 780s/13m under shared-box contention)
pnpm check:pnpm-filter-targetsRAN-PASS
pnpm check:watch-hint-literalRAN-PASS

Also run per zone 3 (not in the derived 16, explicitly named in the dispatch):
pnpm check:ratchet-remedy-authority — RAN-PASS; pnpm check:declared-population-live
— red once (see above), fixed, RAN-PASS after fix. shellcheck on both bash
files: not run — the binary is absent from this container and no workflow
under .github/ runs shellcheck.

All 16 derived local gates are green (check:test-completeness NOT
MEASURED — prerequisite is a CI-only turbo test log). node scripts/check-nul-bytes.mjs
also green.

Generated by Claude Code

…ob is unreadable
Builds a throwaway objectui repo with a real changeset commit, deletes only
the changeset's blob object (not the commit), and asserts --check-walkable
still exits 0 on the broken tree before driving bump-objectui.sh through it.
Red against the unmodified script: it still emits a degraded patch changeset
and exits 0. Adds the objectui-changeset-digest.mjs + invoked-as.mjs copies
the case needs, mirroring the digest script's own self-test fixtures.
…set blob is unreadable
RANGE_OK=1 but objectui-changeset-digest.mjs still fails (a changeset blob
unreadable at both `to` and the commit that added it) used to fall into the
same degraded-patch path as the initial pin, publishing a level nobody
declared into @objectstack/console's CHANGELOG. The range walked, so a level
WAS derivable in principle -- this state now refuses, matching the #14178
disposition for the unwalkable-range case.
Moves the changeset derivation above the pin write so a refused run leaves
.objectui-sha byte-identical and no changeset file, preserving the #10797
write-ordering invariant one input further in: the digest CLI only writes
its --out file once the whole digest has built successfully, so a failing
derivation leaves CS_FILE unwritten on its own -- no temp-file indirection
needed. The initial pin (no previous SHA, no range) is unaffected and keeps
its degraded entry.
Updates the header's refusal-states description and the self-test pointer
comment to describe the new case.
… literal
check:declared-population-live read the quoted '.changeset/widget-refresh.md'
in break_changeset_blob's call as a declared population for check:objectui-bump
-- the whole family's only path-shaped literal, and it reaches no tracked file
since it names a path inside a disposable throwaway checkout. Builds the path
from CHANGESET_NAME by interpolation everywhere it is used instead, and adds
a no-path-population marker documenting why (case 5's fixture paths live only
under mktemp -d).
The block above the pin write no longer opens with the first working-tree
mutation on the success path -- the digest's --out write (CS_FILE) now lands
first, the pin second, since the changeset derivation moved above the pin
write. Reword the comment to state what actually holds: the digest only
writes CS_FILE once the whole digest has built, so a refusal never leaves it
behind; the invariant #10797 needs is that no read of objectui happens below
this point, not that this line is literally the first write.
No behaviour change.
@baozhoutaoClaude

Copy link
Copy Markdown
ContributorAuthor

Reworded the pin-write comment per review: it no longer claims to be "the first mutation" (the digest's --out write to CS_FILE is first on the success path now, the pin second — both land in that order or neither does, since the digest only writes once the whole digest has built). States the actual invariant instead: no read of objectui (git or the digest) happens below this point. Comment-only, no behaviour change.

bash scripts/bump-objectui.selftest.sh — exit 0, 20 assertions across 5 cases, PASSED.
pnpm check:declared-population-live — exit 0, green (157/201 families).

New head: d68f71657

Generated by Claude Code


Generated by Claude Code

@baozhoutaobaozhoutao added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026 — with Claude
@baozhoutao
baozhoutao marked this pull request as ready for review September 2, 2026 08:12
@baozhoutao
baozhoutao added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit d99832aSep 2, 2026
35 of 36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14393-bump-walkable-digest-refuse branch September 2, 2026 08:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump-objectui.sh still emits a default-level patch changeset when the digest fails on a WALKABLE range

2 participants

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable - #14440

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse
Sep 2, 2026
Merged

fix(devx): refuse instead of degrading when a walkable range's changeset blob is unreadable#14440
baozhoutao merged 4 commits into
mainfrom
claude/issue-14393-bump-walkable-digest-refuse

Conversation

@baozhoutao

@baozhoutaobaozhoutao commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes#14393

What changed

bump-objectui.sh reached its degraded emitter (BUMP="${CONSOLE_BUMP:-patch}")
in two states after #14178: the initial pin (no previous SHA — stays permitted,
unchanged here) and a range that walks completely but whose changeset
derivation (objectui-changeset-digest.mjs) throws anyway — the reachable
trigger is a changeset blob unreadable at both to and the commit that added
it. State 2 declared a bump level (patch) nobody actually declared, published
into @objectstack/console's CHANGELOG and the curated release notes, exactly
the shape the #14178 triage ruling forbade ("a patch that reads like a
declaration and silently skips the ADR-0087 disposition prompt is worse than no
record"). This PR makes state 2 refuse instead, matching the #14178
disposition for the unwalkable-range case — RANGE_OK is the discriminator: a
walkable range means a level was derivable in principle, so a failed
derivation there is an error to surface, not a guess to publish.

Placement, per the card's zone 2 item 2

The changeset derivation (node .../objectui-changeset-digest.mjs --out "$CS_FILE") used to run after the .objectui-sha pin write, so a refusal
there alone would have left the pin moved with no record — the exact
half-applied state #10797 exists to prevent, one input further in. This PR
moves the derivation call above the pin write and refuses there on failure.

It writes straight into CS_FILE rather than a temp path moved into place
afterward: reading objectui-changeset-digest.mjs's main(), the --out file
is only written (writeFileSync(out, file)) once the whole digest has built
successfully — a readAt failure throws insidebuildDigest, before that
write is ever reached, so a failing derivation leaves CS_FILE unwritten on
its own. There is no partial-write case left for a temp file to guard against
(confirmed by inspection of objectui-changeset-digest.mjs:763-788 and
:1184-1245 — read-only per the card's file-surface constraint, not modified).

Reproduction (the deliverable per zone 1 / zone 3)

Built a throwaway objectui repo: commit A (previous pin), commit B adding
a .changeset/widget-refresh.md file declaring "@object-ui/core": minor. The range A..B
walks completely (--check-walkable exits 0). Deleted only the changeset
blob object added in B (not the commit) and re-confirmed the walk still
answers 0 — the walk is over commits/trees, --check-walkable never touches
blobs.

Before (unmodified scripts/bump-objectui.sh at origin/main96b627d13),
bump-objectui.sh --no-commit (with commit B as the argument):

✓ objectui-changeset-digest: 51903a2f9b7f..35367ff71983 walks completely in .../objectui.
→ objectui pin: 51903a2f9b7f → 35367ff71983 (on origin/main)
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
at `to` (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
at the commit that added it (35367ff71983...):
fatal: bad object 35367ff71983...:.changeset/widget-refresh.md
[node stack trace / Error: Command failed — exit 128]
→ wrote changeset console-35367ff71983.md (@objectstack/console: patch)
→ --no-commit: leaving files unstaged.

Exit 0. .objectui-shamoved. A changeset landed declaring patch with a
"Degraded list" body — exactly the silent-patch defect this card describes.

After (this PR's scripts/bump-objectui.sh), same fixture, same command:

✓ objectui-changeset-digest: 71d868c3b3e9..c3c844b4a73d walks completely in .../objectui.
✗ objectui-changeset-digest: cannot read .changeset/widget-refresh.md — neither at `to` nor at the commit that added it.
[same two git diagnostics]
✗ REFUSING to bump: the objectui range 71d868c3b3e9...c3c844b4a73d walks
completely in .../objectui, but deriving the @objectstack/console changeset
from it failed — its diagnostic is in this run's output, above.
A level was derivable in principle here; the derivation just failed reading a
changeset blob. This bump used to emit a degraded entry carrying the default
level instead (`patch`) as if it were a declaration nobody made, publishing
into @objectstack/console's CHANGELOG and the curated release notes. No record
beats a wrong one (objectstack#14178 triage ruling), so this refuses instead.
NOTHING WAS WRITTEN — .objectui-sha is untouched and still holds the old pin.
Repair the objectui object store and re-run this bump, or move the pin without
a release record at all: scripts/bump-objectui.sh --no-changeset
(the pin moves, nothing is derived, and nothing is claimed about the range).

Exit 1. .objectui-shabyte-identical to before the run. No changeset
file written.

This exact fixture is case_5 in scripts/bump-objectui.selftest.sh (new),
mirroring the same ok/bad idiom as cases 1-4. It also asserts the fixture
is real — the blob is confirmed gone (git cat-file -e fails) and
--check-walkable is re-asserted green on the broken tree before the bump is
even run, so the case cannot pass over a fixture that never reached this state.

Ablation

Reverted only the refusal commit (git checkout pointed at the fixture-only
commit, for the path scripts/bump-objectui.sh, restoring the pre-fix bytes
while the fixture commit stayed), reran bash scripts/bump-objectui.selftest.sh:

✗ expected a non-zero exit, got 0 — the bump did not refuse
✗ .objectui-sha CHANGED — half-applied state: (the new sha)
✗ no 'REFUSING to bump' in the output; got: → wrote changeset console-....md (@objectstack/console: patch)|...
✓ the refusal says the range WALKS (the discriminator from the unwalkable-range refusal)
✗ the refusal does not tell the operator the tree is clean
✗ a changeset was emitted for a range whose derivation failed
✗ bump-objectui self-test FAILED — 5 assertion(s) failed, 15 passed.

Restored (git checkout HEAD -- scripts/bump-objectui.sh, safe — the fix was
already committed at that point) → bash scripts/bump-objectui.selftest.sh
✓ bump-objectui self-test PASSED — 20 assertions across 5 cases.

check:declared-population-live

Adding case_5 initially introduced ONE bare quoted path literal
(.changeset/widget-refresh.md inside the break_changeset_blob call), which
check:declared-population-live correctly read as a declared population for
the check:objectui-bump family that reaches nothing in this tree (it names a
path inside a disposable mktemp -d checkout, never a tracked file). Fixed by
building the path from a CHANGESET_NAME variable via interpolation
everywhere it's used instead of spelling it as one bare token, plus a
dispatch-gates: no-path-population marker documenting why. Verified with a
direct extractWatchHints call — zero hints now, and check:declared-population-live
is green (157 of 201 families declare a population, all reaching the tree).

Header / self-test-pointer comment sync

Per zone 2 item 5: the header's refusal-states description (bump-objectui.sh:17-52)
and the self-test pointer comment (:90-105) are updated to describe the new
refusal and that case 5 needs node (unlike cases 1-4, which stay offline/no-node).

Changeset

None added. scripts/bump-objectui.sh and scripts/bump-objectui.selftest.sh
publish nothing from any package. Following this repo's own convention for
scripts/**-only changes: PR #14391 (c0eed5648, the direct #14178 precedent —
same two-file surface, a considerably larger change) shipped with no
.changeset/*.md file. This PR's file surface is outside the closed list
os-dev.md lets a dev self-apply skip-changeset for (scripts/pm/**, not
scripts/bump-objectui*), so the label — needed for Check Changeset to pass
— is the PM's call per the card and os-dev.md.

Gates

All commands node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands scripts/bump-objectui.sh scripts/bump-objectui.selftest.sh derived
(16 total), run under scripts/pm/os-verify-lock.sh, at final head 85fd2d22e:

commandresult
node scripts/check-ci-filter-parity.mjsRAN-PASS
node scripts/check-cross-package-test-inputs.mjsRAN-PASS
node scripts/check-shard-attestation.mjsRAN-PASS
node scripts/check-test-completeness.mjsNOT MEASURED — PREREQUISITE NOT MET (grades a saved turbo run test log; CI tees it, this branch is unreachable there)
node scripts/pm/bare-root-worklist.mjs --self-testRAN-PASS
pnpm check:agent-test-spellingRAN-PASS
pnpm check:bash32-floorRAN-PASS (153 self-test cases; 26 tracked shell files, 0 findings)
pnpm check:cli-command-idsRAN-PASS
pnpm check:cross-package-test-inputsRAN-PASS
pnpm check:entry-guardRAN-PASS
pnpm check:objectui-bumpRAN-PASS — 20 assertions across 5 cases
pnpm check:objectui-changesetRAN-PASS — digest + range self-tests green (READ-ONLY file, unmodified)
pnpm check:parse-guardRAN-PASS
pnpm check:pm-dispatch-gatesRAN-PASS — dispatch-gates self-test: 1232 cases pass (held the verify-lock 780s/13m under shared-box contention)
pnpm check:pnpm-filter-targetsRAN-PASS
pnpm check:watch-hint-literalRAN-PASS

Also run per zone 3 (not in the derived 16, explicitly named in the dispatch):
pnpm check:ratchet-remedy-authority — RAN-PASS; pnpm check:declared-population-live
— red once (see above), fixed, RAN-PASS after fix. shellcheck on both bash
files: not run — the binary is absent from this container and no workflow
under .github/ runs shellcheck.

All 16 derived local gates are green (check:test-completeness NOT
MEASURED — prerequisite is a CI-only turbo test log). node scripts/check-nul-bytes.mjs
also green.

Generated by Claude Code

…ob is unreadable
Builds a throwaway objectui repo with a real changeset commit, deletes only
the changeset's blob object (not the commit), and asserts --check-walkable
still exits 0 on the broken tree before driving bump-objectui.sh through it.
Red against the unmodified script: it still emits a degraded patch changeset
and exits 0. Adds the objectui-changeset-digest.mjs + invoked-as.mjs copies
the case needs, mirroring the digest script's own self-test fixtures.
…set blob is unreadable
RANGE_OK=1 but objectui-changeset-digest.mjs still fails (a changeset blob
unreadable at both `to` and the commit that added it) used to fall into the
same degraded-patch path as the initial pin, publishing a level nobody
declared into @objectstack/console's CHANGELOG. The range walked, so a level
WAS derivable in principle -- this state now refuses, matching the #14178
disposition for the unwalkable-range case.
Moves the changeset derivation above the pin write so a refused run leaves
.objectui-sha byte-identical and no changeset file, preserving the #10797
write-ordering invariant one input further in: the digest CLI only writes
its --out file once the whole digest has built successfully, so a failing
derivation leaves CS_FILE unwritten on its own -- no temp-file indirection
needed. The initial pin (no previous SHA, no range) is unaffected and keeps
its degraded entry.
Updates the header's refusal-states description and the self-test pointer
comment to describe the new case.
… literal
check:declared-population-live read the quoted '.changeset/widget-refresh.md'
in break_changeset_blob's call as a declared population for check:objectui-bump
-- the whole family's only path-shaped literal, and it reaches no tracked file
since it names a path inside a disposable throwaway checkout. Builds the path
from CHANGESET_NAME by interpolation everywhere it is used instead, and adds
a no-path-population marker documenting why (case 5's fixture paths live only
under mktemp -d).
The block above the pin write no longer opens with the first working-tree
mutation on the success path -- the digest's --out write (CS_FILE) now lands
first, the pin second, since the changeset derivation moved above the pin
write. Reword the comment to state what actually holds: the digest only
writes CS_FILE once the whole digest has built, so a refusal never leaves it
behind; the invariant #10797 needs is that no read of objectui happens below
this point, not that this line is literally the first write.
No behaviour change.
@baozhoutaoClaude

Copy link
Copy Markdown
ContributorAuthor

Reworded the pin-write comment per review: it no longer claims to be "the first mutation" (the digest's --out write to CS_FILE is first on the success path now, the pin second — both land in that order or neither does, since the digest only writes once the whole digest has built). States the actual invariant instead: no read of objectui (git or the digest) happens below this point. Comment-only, no behaviour change.

bash scripts/bump-objectui.selftest.sh — exit 0, 20 assertions across 5 cases, PASSED.
pnpm check:declared-population-live — exit 0, green (157/201 families).

New head: d68f71657

Generated by Claude Code


Generated by Claude Code

@baozhoutaobaozhoutao added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026 — with Claude
@baozhoutao
baozhoutao marked this pull request as ready for review September 2, 2026 08:12
@baozhoutao
baozhoutao added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit d99832aSep 2, 2026
35 of 36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14393-bump-walkable-digest-refuse branch September 2, 2026 08:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump-objectui.sh still emits a default-level patch changeset when the digest fails on a WALKABLE range

2 participants

@baozhoutao@claude