Repository navigation
test(cli): move the nightly-tier failure-warnings fixtures off the bare declared-index unique - #22242
Merged
objectstack-fleet[bot] merged 2 commits intoOct 8, 2026
Conversation
…re declared-index unique The two `--json` failure-warnings e2e suites planted their authoring-rule advisory as a bare `unique: true` on a declared index. Protocol 18 refuses that spelling at the schema parse (ADR-0120 D7), so every fixture stopped at the parse exit and the payloads carried none of the fields the tests read. Each fixture now raises `unique/double-declaration` instead: field-level `unique: true` beside a declared index `unique: 'global'` on the same column, the shape the sibling parity suites already moved to. It is a warning-severity author-time rule, so it still rides `ruleAdvisories`. No assertion changes, and no test is skipped, renamed or moved between tiers. Claude-Session: https://claude.ai/code/session_01RWZbGvPFcRKvUqASZtunCU Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWZbGvPFcRKvUqASZtunCU Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
objectstack-fleet
Bot
deleted the
claude/issue-22208-nightly-fixtures-unique-scope
branch
October 8, 2026 09:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #22208
Clause-②: no
Moves the two
@objectstack/clinightly-tier fixtures off the spelling that protocol 18 refuses. The refusal itself (PR #22103,ef1fcb26a2) is correct and is not touched here. Test-only: two files, +23 / -11, no assertion changed, and no test skipped, renamed or moved between tiers.What changed
Both
--jsonfailure-warnings suites plant one advisory of each class and assert that each failure exit carries exactly the classes the run had computed. Their authoring-RULE advisory was a bareunique: trueon a declared index. Since PR #22103 the schema parse refuses that spelling (invalid_unionatobjects.0.indexes.0.unique), so every fixture stopped at the parse exit and the payload carried none of the fields the tests read.7b926f76)build-json-failure-warnings.e2e.test.ts:165(sharedstack())unique: trueunique: 'global'+ fieldtitleunique: truebuild-json-failure-warnings.e2e.test.ts:300(3brulefail)unique: trueunique: 'global'+ fieldtitleunique: truevalidate-json-failure-warnings.e2e.test.ts:192(sharedstack())unique: trueunique: 'global'+ fieldtitleunique: trueThe new advisory is
unique/double-declaration(ADR-0120 D5b): a field-levelunique: true(per organization) beside a single-column declared indexunique: 'global'on the same column. It is the shape PR #22103 already moved the two sibling parity suites to (build-json-advisory-parity,build-json-undeclared-key-parity).Why it is an authoring-RULE advisory and not a structural one: it is produced by the
lintUniqueDeclarationsentry of the author-time rule registry (packages/lint/src/authoring-rules.ts, tieradvisory, commandsvalidate+build). Its finding isseverity: 'warning', sosplitBySeverityputs it inruleAdvisoriesand never in the gating errors. It is a record with a non-docs/ruleand notoken, which is exactly what the suites'ruleAdvisoriesclassifier selects. The structural advisory is a different list (structuralWarnings, a string computed last invalidate.ts).Docblocks: the two fixture docblocks (
build :141,validate :168) name the new advisory and say in one sentence why the old spelling left. The tworulefailcomments (build :291,validate :295) name it too.No assertion named the bare-
uniquerule: every assertion reads the class COUNT (rule: 1), never the rule id. So no assertion line moves (git diff -U0 | grep -c 'expect('= 0).Readings (all on
origin/mainat the time; base7b926f76, then merged witha87d8be2)OS_TEST_TIERS=nightly,integrationproject, the two files only, on7b926f76:Tests 11 failed | 10 passed (21). The total is the same 11 as the card. Per file: build 6 failed / 5 passed (3f, 3e, 3c, 4b, catch-all, 3b red); validate 5 failed / 5 passed (rule errors, capability errors, doc errors, catch-all late, structural control red).`indexes[].unique: true` was retired at protocol 18 (ADR-0120 D1)at pathobjects / 0 / indexes / 0 / unique. A directos build --jsonprobe of the 3b fixture on the base returned{ success: false, errors: [invalid_union at objects.0.indexes.0.unique], warnings: [], conversions }. That payload has noerror, noissuesand no advisory lists, which are the fields the ten other failures read asundefined.error: 'author-time rules failed',issues: ['expression-invalid']andwarnings: [unique/double-declaration (warning)]. The new validate control fixture reachedvalid: truewith the rule record, the key string, the cap record and the structural string ("No apps or plugins defined").*.e2e.test.*,*.live.test.*) on7b926f76have exactly three declared-indexunique: truesites, the three above. The other three code hits are field-levelunique: true(valid under ADR-0120 D1):build-json-advisory-parity:149,build-json-undeclared-key-parity:141and:170. The control spellingunique: 'global'hits 4 sites, so the grep sees. The card's own log names only@objectstack/cli#testred (59 of 60 tasks green). No other site found; nothing else is red for this cause.Proof
e8d64c30(fix) and again on89d4dc47(fix merged withorigin/maina87d8be2):Test Files 2 passed (2)/Tests 21 passed (21). All 21 tests are named in the verbose run, including the 11 that were red and the structural control.vitest list --filesOnlyinpackages/cli: withOS_TEST_TIERSunset and with=queue, 356 files and neither of these two; with=nightly, 80 files (the card's "(80)") and both, in[integration]. The diff touches no tier config, no file name and novitest-tiers.tsinput.scripts/ablation-replace.mjs, wrap mode, plus an outer EXIT/INT/TERM restore trap). The 3brulefailfixture was put back to its base spelling: anchor x1 -> x0, replacement x0 -> x1, blob7dfddae7->bd478edf, in-flight count base-spelling = 1. The build file then readTests 1 failed | 10 passed (11). The one red was 3b,expected undefined to be 'author-time rules failed', the payload missingerroragain. Restore: blob7dfddae7== HEAD blob,git diff HEADempty, index blob equal, porcelain empty. The direction matched the prediction written before the run.Local verification (final head
89d4dc47)pnpm --filter @objectstack/cli typecheck: exit 0.check:test-typecheckOK;tsconfig.test.jsonputs both files in its 1970-file program (--listFiles), and the 28 raw errors are the ledgered 28 in three other files, 0 in these two.pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2:Test Files 263 passed (263),Tests 3874 passed (3874).node scripts/pm/dispatch-gates.mjs --commandsderives for this change set are the same set as the dispatch order's list. 50 of 50 exit 0.check:dual-build-cjs-loadsfirst exited 3 (PREREQUISITE NOT MET: nine packages outside the cli closure had nodist/); after a fullpnpm build(72/72) it exits 0.dispatch-gates --ran:50 derived, 50 run, 0 NOT-MEASURED, 0 UNRUN.pnpm lint(full,eslint . --no-inline-config): exit 0. A JSON run over the two files reports 2 results, 0 errors, 0 warnings, and neither is ignored.files[]moves.skip-changesetis the seat's to apply.integrationproject and the other nightly-tier files. Done for this card is the nextNightly Tiersrun on amainthat contains this change.Acceptance notes
plantDocs", a helper that does not exist in this file (docs are passed throughmake(…, docs)). This is pre-existing wording, kept as is because it is outside this card's surface. Noted, not filed.check-issue-citationsread 0 files for this diff:packages/cli/test/**is outside its declared surface, so it judged nothing about thePR #22103citation added in these docblocks, in either direction.pnpm lintcrashed (exit 2,ENOENTon a transienttsup.config.bundled_*.mjs) because it ran beside my own concurrentpnpm build. That is a local race and not a lint verdict. The re-run after the build finished is the reading above.Generated by Claude Code