Repository navigation
feat(spec)!: unexport normalizeVisibleWhen and VISIBILITY_ALIAS_KEYS from @objectstack/spec/shared; read visibleWhen directly - #24004
Conversation
…from @objectstack/spec/shared (WIP: baselines pending) Claude-Session: https://claude.ai/code/session_01T2YHPgcuCRcypzyAuxvAap Co-authored-by: Claude <noreply@anthropic.com>
…elines; add the BREAKING changeset Claude-Session: https://claude.ai/code/session_01T2YHPgcuCRcypzyAuxvAap Co-authored-by: Claude <noreply@anthropic.com>
…sibility-fold-unexported
…'s 'stay exported' Claude-Session: https://claude.ai/code/session_01T2YHPgcuCRcypzyAuxvAap Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 12 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 10 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 142 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 916130d4e432f1abcbd5da55b0157335ec5ad760 && git checkout 916130d4e432f1abcbd5da55b0157335ec5ad760
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 19955fb73fe58d7971a1f0f1fc9c473f2dfdf179 ca04d47854bbde1abaf80803e85fc07aeb158e7d && git checkout -B drift-repro 19955fb73fe58d7971a1f0f1fc9c473f2dfdf179 && git merge --no-ff ca04d47854bbde1abaf80803e85fc07aeb158e7d
node scripts/docs-audit/affected-docs.mjs --json 19955fb73fe58d7971a1f0f1fc9c473f2dfdf179
|
Contract reviewServed-tier: Read-only: the net diff is ① Derived judgments
② Semver levelThe changeset declares ③ Boundary flags
Verdict reason: the diff publishes exactly the narrowing the card and the F4 ruling's item 4 leave room for — two zero-pull exports gone from Implemented-by: VERDICT: PASS Generated by Claude Code |
…rate the ESM and CommonJS failure modes Claude-Session: https://claude.ai/code/session_01T2YHPgcuCRcypzyAuxvAap Co-authored-by: Claude <noreply@anthropic.com>
席位核对 · ACCEPT · PR #24004 @
|
Fixes #23877
Clause-②: yes
What
@objectstack/spec/sharedstops exportingnormalizeVisibleWhenandVISIBILITY_ALIAS_KEYS. They were the ADR-0089 fold of the retiredvisibleOn/visibilitykeys ontovisibleWhen, and the list of those two keys. Since the two keys becameretiredKey()tombstones at 18, no schema called the fold. The replacement is to readvisibleWhendirectly.packages/spec/src/shared/visibility.tsis deleted. The two exports were all it held (plus the privateWithVisibilityAliasestype and the docblocks that describe them), so theexport * from './visibility'line leaves thesharedbarrel too.api-surface/shared.jsonandexport-origins/shared.jsonwere regenerated withgen:api-surface/gen:export-origins. Each loses exactly the two rows.api-surface-signatures.jsonanddeclaration-map/never listed either name, so they did not move.check:authorable-surfacedid not move either, because no schema key changed.visibility-alias-fold-unexportedfollows the shape ofvisibility-strict-options-unexported, with noconversionIds(a TS surface, never stored). That older entry'sreplacementsaid the two "stay exported". It now points at the new entry.kernel/public-auth-features.ts(therequiresFeaturelowering) andui/view.zod.ts(thegroups→sectionsfold).shared/visibility-fold-unexported.test.ts: thesharedbarrel's runtime namespace does not carry either name. A surviving export (lazySchema) is the lit control.minoron@objectstack/specwithClause-②: yes (narrowing), a FROM → TO table and the markerregistered visibility-alias-fold-unexported. It also says it supersedes the pending F4 note's "stay exported" sentence (see Acceptance notes).Not touched: the stored-row conversions
view-visibleOn-to-visibleWhenandpage-component-visibility-to-visibleWhen, any schema's accept set, and objectui.Zero pull, measured
2e1562091c(git grepover the whole tree, CHANGELOGs anddistexcluded): there are no call sites. The only hits were the definition, the two baselines, the two precedent comments, the D3 entry18.visibility-strict-options-unexported.ts:16-17, and one sentence of the pending F4 changeset (see Acceptance notes)..objectui-shapinf8267df93a: there is one hit, a comment (packages/core/src/utils/normalize-list-view.ts:374), and no call. The positive controlvisibleWhenhits in the same tree.Ablation
The fix was committed first. The mutation went through
scripts/ablation-replace.mjswith atraprestore. It re-addsexport const VISIBILITY_ALIAS_KEYS = …toshared/index.ts. Result: the anchor went 1 → 0, the blob wente2d66ff65e0b→eee4d0b060de, andno longer exports VISIBILITY_ALIAS_KEYSwent red (AssertionError: expected true to be false, 1 failed | 2 passed). After the restore, the blob equals HEAD andgit diff HEADis empty. The first attempt was a no-op because its replacement still contained the anchor; the tool refused it before running anything. The pin imports./indexfrom source, so no rebuild applies.Verification (head
9d59f55e, after mergingorigin/main; the final head5626f603adds two changeset lines on top of it)pnpm --filter @objectstack/spec buildpasses.check:generatedreports all 14 artifacts up to date (before regeneration it flagged exactlyapi-surface/andexport-origins/,./shared− the two names).pnpm --filter @objectstack/spec typecheckexits 0.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2: 755 files, 22018 passed, 1 todo.node scripts/check-adr-0087-registration.mjspasses:[BREAKING+bang+clause-②-narrowing] registered visibility-alias-fold-unexported (new here).node scripts/check-platform-checklist.mjs --changed-from origin/mainreports OK: 24 anchors judged, 0 lost.dispatch-gates --commandsderived 88 families, all run, with exit codes captured before any pipe. 87 exited 0. One was NOT MEASURED (check-plugin-teardown-shape --self-test, exit 3: its fixture commit is beyond this shallow clone).--ranreconciled 88/88.5626f603for the changeset text:check-adr-0087-registration,check-changeset-no-major,check-empty-changeset,check:doc-authoring,check:issue-citations,check:nul-bytes,check:pm-changeset-deadline-census,check:objectui-changeset,check:published-files. All exited 0.Acceptance notes
packages/spec/src/data/field.zod.ts:10had a comment sayingeditability-boundary's only runtime import wasshared/visibility.ts. In fact it isshared/visibility-strict-options.ts, and the deleted file would have left the comment pointing nowhere. The comment was re-pointed in place (one line, comment only). That file is outside the claim's listed surface, which is why this note exists.pre.json) changeset.changeset/23543-f4-visibility-alias-keys-retired.md:42saysnormalizeVisibleWhenandVISIBILITY_ALIAS_KEYS"stay exported", which this PR makes false for the same release. Correcting it in place makescheck-empty-changesetred by design (it classes this as a deliberate correction to another PR's release note, which needs a person to confirm), and the file is outside this claim's surface. So this PR leaves it as authored, and its own changeset says it supersedes that sentence. If the seat wants it corrected in place, the one-line rewrite is: drop the first clause, and say the two leave@objectstack/spec/sharedin a separate change of the same release (D3 entryvisibility-alias-fold-unexported).packages/spec/scripts/build-skill-references.ts:274mentionsvisibility.tsin a historical note about leaked transitive imports. It names no symbol and stays as is.Generated by Claude Code