Uh oh!
There was an error while loading. Please reload this page.
fix(objectql): sync IntrospectedColumn.isUnique consumer docblock to the producer's PRIMARY KEY exclusion - #12035
Conversation
…the producer's PRIMARY KEY exclusion (#11826) The consumer-side copy of `IntrospectedColumn.isUnique` in packages/objectql/src/util.ts declares it "must not drift" from the producer's contract sentence (`SqlDriver`'s `IntrospectedColumn.isUnique` in @objectstack/driver-sql). #11654 added a PRIMARY KEY exclusion clause to the producer's sentence; this copy had not been synced. Prose only — introspectedSchemaToObjects/convertIntrospectedSchemaToObjects is unchanged, and the package's own test fixture already modeled a key column as { primaryKey: true } with no isUnique, so the data already agreed with the new convention. Checked the docblock's second "must not drift" copy (IntrospectedForeignKey.referencedSchema) against its producer too — not drifted, no action needed. skip-changeset: no behaviour, no export. Claude-Session: https://claude.ai/code/session_01W6HFzyH98W1YaQXhJUJt6o Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 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 — 14 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 2014b85ec21c93acf5de15dfb8e77e6c41407dc6 && git checkout 2014b85ec21c93acf5de15dfb8e77e6c41407dc6
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1e79aa4f812708d5d097ca33d9b7040e02b958c6 8b58aa7304c5e921ae43d995945cf819ed5435c5 && git checkout -B drift-repro 1e79aa4f812708d5d097ca33d9b7040e02b958c6 && git merge --no-ff 8b58aa7304c5e921ae43d995945cf819ed5435c5
node scripts/docs-audit/affected-docs.mjs --json 1e79aa4f812708d5d097ca33d9b7040e02b958c6 |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#11826
Prose-only sync of the consumer-side
IntrospectedColumn.isUniquedocblock inpackages/objectql/src/util.tsto the producer's current contract sentence inpackages/drivers/driver-sql/src/sql-driver.ts(SqlDriver'sIntrospectedColumn.isUnique). No behaviour change, no export change, no test change.What the producer says now (added by #11654)
What the consumer copy said before (drift)
The consumer copy had no PRIMARY KEY clause at all — it still read as though
isUniquecould include a PK, which is exactly the reading #11654 retired on the producer side:The fix
Appended the producer's PRIMARY KEY paragraph (transfers essentially verbatim —
{@link IntrospectedTable.primaryKeys}resolves to this same file's ownIntrospectedTable.primaryKeysdeclaration, andprimaryKeyis inherited from the same spec contract on both sides) to the consumer'sisUniquedocblock, immediately after the still-accurate composite paragraph. The composite paragraph (#11202) was left untouched — it had not drifted.Deliberately NOT copied: the producer's closing paragraph ("All three dialect arms of
{@link SqlDriver.introspectUniqueConstraints}produce it through one predicate — see{@link singleColumnUniqueColumns}."). That paragraph is producer-internal implementation provenance (its@links nameSqlDriver-only symbols that do not exist in@objectstack/objectql), predates #11654 entirely (confirmed viagit showon the #11654 commit — it was not touched), and was never part of the consumer's mirrored text before. It is not "the contract sentence."Second copy in the same docblock — checked, not touched
IntrospectedForeignKey.referencedSchemaatutil.ts:70-86carries the identical "must not drift" clause, mirroringSqlDriver'sIntrospectedForeignKey.referencedSchema. Compared both sides line by line: not drifted. Both landed together in #11906 and the producer side has had no edit since (git log 0010797373..HEAD -- packages/drivers/driver-sql/src/sql-driver.tsshows one unrelated commit, #11785, touching boolean aggregate casting — noreferencedSchemalines). Negative reading, no action, no card filed.Tests
No behaviour change —
introspectedSchemaToObjects/convertIntrospectedSchemaToObjectsis unmodified, only a TSDoc comment moved. No ablation is owed for a prose-only change; the package suite is the regression check:pnpm --filter '@objectstack/objectql^...' build— dependency closure, exit 0.pnpm --filter @objectstack/objectql test—Test Files 232 passed (232),Tests 4117 passed (4117), exit 0.pnpm --filter @objectstack/objectql typecheck—tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json, exit 0.node scripts/check-nul-bytes.mjs—OK (scanned 6665 text file(s) ... no raw ASCII control bytes), exit 0.Gate union derived from the actual diff (
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack), re-run at the final commit8b58aa7304— same single-path change set both times, same 9 matched families. All 9 run in the foreground, eachEXIT=0captured before any pipe:check:durability-log-level,check:published-files,check:slot-lookup,check:test-source-alias,check:type-source-resolution,check-engine-split-ratio.mjs(report-only, 97.6%),check-plugin-teardown-shape.mjs,docs-audit/check-affected-docs.mjs,docs-audit/check-drift-comment.mjs.skip-changesetper triage grading — no behaviour, no export.check:empty-changeset's own self-tests (GREEN 3) confirm a PR with no changeset and theskip-changesetlabel is exactly what that gate expects to see, so no changeset was written.Generated by Claude Code