Repository navigation
fix(lint): liveness author warnings and the status census read ledger rows at every depth - #26379
Conversation
…f ledger children Claude-Session: https://claude.ai/code/session_01WGufzhxSxc27ChPLkDSKEa Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhxSxc27ChPLkDSKEa Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check4 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 4 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 804ebf15bfbd22b8e93bcc70a27af9b1d81e9590 && git checkout 804ebf15bfbd22b8e93bcc70a27af9b1d81e9590
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 61c079862ac726a1e16fcd73a04122567f475c4a bec9f0584657401fbc1542f4bfab1b0ea34b3475 && git checkout -B drift-repro 61c079862ac726a1e16fcd73a04122567f475c4a && git merge --no-ff bec9f0584657401fbc1542f4bfab1b0ea34b3475
node scripts/docs-audit/affected-docs.mjs --json 61c079862ac726a1e16fcd73a04122567f475c4a |
席位核对 · ACCEPT ·
|
Requested by Yibo Wang · project thread
Fixes #26146
Clause-②: no
Metadata-protocol: none
维护者速读
os lint)与状态词普查,原来只读台账顶层加一层children,现在读到任意深度。dead行或新状态词会悄悄漏过。widgets[].chartConfig的 5 个已退役键(schema 本就拒收);回滚即 revert 本 PR。packages/lint/src/lint-liveness-properties.ts的ledgerRows(两处遍历共用它),再看测试文件末尾的 lint: liveness-properties flattens one level ofchildren, but 40 grandchild ledger rows carry a status (e.g.dashboard/widgets.chartConfig.*), so they are never graded #26146 块。pnpm --filter @objectstack/lint exec vitest run src/lint-liveness-properties.test.ts,预期 106 个用例全绿。What changes
packages/lint/src/lint-liveness-properties.ts: one walk,ledgerRows, yields every ledger row at every depth ofchildrenas a dotted path, descendants before the row (the order the warn map was always filled in, so finding order at depth 0 and 1 is unchanged).loadWarnMapand the status census both read it, so they cannot disagree about depth again.ledgerStatusesIn(dir)(module export only, the same posture aslintLivenessPropertiesFromLedgerDir);shippedLedgerStatuses()is that census over the shipped directory.:303-306count read "423 top-level and 285 child rows carry a status, zero grandchildren do". Onorigin/main6390fe52it is 528 top-level, 419 child, 41 grandchild, 2 great-grandchild. TheWarnMap,loadWarnMapandauthorWarnedPropertiesdocblocks now say every depth.@objectstack/lintpatch.Tests
lint-liveness-properties.test.ts:widgets.chartConfig.type/.xAxis/.yAxis/.series(dead, two levels down) are inauthorWarnedProperties('dashboard')and gradedliveness-dead-propertyon an unparsed stack, through the array fan-out (the second widget authors them). The livechartConfig.titlein the same call stays silent.dead+authorWarnrow two levels down warns; aplanned+authorWarnrow three levels down warns, while itsplannedsibling without the opt-in stays silent (so the opt-in itself reaches depth 3, not only the verdict).ledgerStatusesIn; the shipped census equalsledgerStatusesIn(shippedLedgerDir())and carries neither word.#16094hint pins'shippedRows()/itemAuthoringnow walk every depth, so the newly warned deep rows are held to the same "never the note, no tracker id" rule.Test runs (head bec9f05)
pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/lint-liveness-properties.test.ts: Test Files 1 passed, Tests 106 passed.pnpm --filter @objectstack/lint typecheck && pnpm --filter @objectstack/lint test: exit 0, Test Files 165 passed, Tests 7383 passed, 5 skipped.scripts/ablation-replace.mjs, mutation landed: anchor 1 to 0, blob60014c1e09edtod39fa40b0098):ledgerRowslimited to onechildrenlevel reds exactly the three new tests (3 failed, 103 passed). Restored: blob back to60014c1e09ed, equal to theHEADblob,git diff HEADempty.Acceptance notes
6390fe52: status rows by depth 528 / 419 / 41 / 2;authorWarnat depth 2 or deeper: 0; the card's one-liner readspropertieswhere the ledgers keyprops.deadwarns without an opt-in (lint:liveness-dead-propertyandliveness-live-elsewhere-propertycannot fire on 17.3.0 — 90dead+ 1live-elsewhereledger rows and not one setsauthorWarn#16094), so the 5 dead rows two levels down now warn:dashboardwidgets.chartConfig.type,.xAxis,.yAxis,.series,.aria. Each is a retired key the schema already refuses, so only an unparsed stack (os lint) reaches the warning. No other deep row warns. Per triage 6417914269, no ledger row is regraded here.app.json/dashboard.json. Text-disjoint from the hunks here except that its new comment in thedashboard silencepin says thechartConfig.*rows "sit two down and were never graded", which this PR makes false; its assertions do not depend on that. Whoever lands second mergesmainand re-measures the counts above.authorWarnedProperties('translation'); the translation ledger has no warned row below the child level, so that set is unchanged.Verification
Dispatch gates (head bec9f05)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 64 commands; 3 paths, 206 changed lines.check-plugin-teardown-shape --self-teston the shallow clone;check:docs-transcript-driftandcheck:lean-entry-closurewithout builtlint/objectql); aftergit fetch --unshallowandpnpm --filter '@objectstack/lint...' --filter '@objectstack/objectql...' buildeach re-ran exit 0.check:dual-build-cjs-loads, reason: it needs every package'sdist(a fullpnpm build, 88 packages absent); CI'sLint & Repo Gatesruns it.--ranreconciliation: exit 0, "64 derived famil(ies) accounted for — 63 run, 1 NOT-MEASURED".Generated by Claude Code