Repository navigation
fix(core,evaluator): qualified relatesTo/conflictsWith are inert in lint; cross-repo supersession is an error everywhere (#299) - #307
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Same-log-qualified supersededBy references remain incorrectly dangling in the evaluator.
1 open finding
What changed in this PR
Aligns lint and evaluator handling of qualified ADR references under ADR-0059.
Changes:
- Reports qualified
relatesTo/conflictsWithas informational. - Rejects cross-log supersession in the evaluator.
- Updates tests, documentation, and Action bundles.
Repository ADR MCP context was unavailable, so marker-aware decision compliance could not be verified.
| File | Description |
|---|---|
CHANGELOG.md |
Documents behavior changes. |
docs/RELEASING.md |
Records amended compatibility policy. |
docs/adr/0059-aggregate-decision-corpora-across-an-organization-s-repositories-as-a-pinned-rea.md |
Marks implementation action complete. |
packages/core/src/validate/corpus-invariants.ts |
Classifies qualified references. |
packages/core/test/corpus-invariants.test.ts |
Tests core classifications. |
packages/cli/test/lint.test.ts |
Tests lint output and exits. |
packages/evaluator/src/rules/no-orphan-refs.ts |
Rejects cross-log supersession. |
packages/evaluator/src/rules/supersession-consistent.ts |
Improves qualified successor diagnostics. |
packages/evaluator/test/no-orphan-refs.test.ts |
Tests supersession handling. |
packages/evaluator/test/supersession-consistent.test.ts |
Tests qualified supersededBy. |
packages/ci/dist/index.js |
Regenerates governing Action bundle. |
packages/ci/dist/queue-action.js |
Regenerates queue Action bundle. |
packages/ci/dist/portal-action.js |
Regenerates portal Action bundle. |
🧠 Review effort: Balanced
Decisions governing this change11 accepted decisions govern this change · 1 historical record Show all 11 governing decisions and why each applies
Historical records that once covered this change (1)These no longer bind this change, and are listed for context only: Links point at |
This was referenced Oct 10, 2026
Merged
mbeacom
force-pushed
the
fix/lint-qualified-refs
branch
from
October 10, 2026 22:16
69166fc to
a103faf
Compare
…nert in lint, and cross-repository supersession as an error everywhere (#299) The schema accepts `<log>:<id>` references, but `adr lint` failed a qualified `relatesTo` as `dangling-relatesTo` (error) while the evaluator, the marker resolver, and MCP all treated it as inert. Under ADR-0059 clause 5 (which amends ADR-0031 clause 5 for this case), lint now reports a qualified `relatesTo` or `conflictsWith` as `federated-ref-unresolved` at `info`. Only the `relatesTo` case lowers an exit code; a dangling `conflictsWith` was already `warn`. A qualified reference never resolves to a local record with the same bare id. ADR-0059 clause 4 keeps cross-repository supersession a dangling-* error everywhere. Lint already failed it and now says why. `adr evaluate` treated a qualified `supersedes` as inert (or passing, with a snapshot) and now fails it as `no-orphan-refs.dangling-supersedes`, naming the clause; a reference qualified with the evaluator's own resolution log still counts as local. packages/ci/dist is rebuilt under linux/amd64 Bun 1.4.2 for the core change. Every new test was observed failing first (ADR-0016). ADR-0059 action item 2 is ticked. Signed-off-by: Mark Beacom <m@beacom.dev>
… every check Copilot found that a supersededBy qualified with the evaluator's own resolution log (here:0002 under resolutionLog here) was still dangling: supersession-consistent compared the raw ref against bare ids before the cross-log test mattered, and the reciprocity, pair, and cycle checks compared raw refs too. Refs qualified with the resolution log are now normalized to their bare id once, up front, so every check agrees with no-orphan-refs; a ref naming another log (or any qualified ref with no resolution log) stays raw and keeps the ADR-0059 clause 4 failure. Four new tests failed before the fix (ADR-0016). Signed-off-by: Mark Beacom <m@beacom.dev>
mbeacom
force-pushed
the
fix/lint-qualified-refs
branch
from
October 10, 2026 22:33
a103faf to
36eff01
Compare
mbeacom
added a commit
that referenced
this pull request
Oct 10, 2026
…est the portal bundle's datetime as-of packages/ci/dist rebuilt under linux/amd64 Bun 1.4.2 on top of main (after #307, #308, #314). The portal bundle now takes the SDK's --as-of grammar: a new bundle test resolves 2026-01-08T23:30:00-05:00 to 2026-01-09, and the usage-error test uses a timezone-less datetime with core's message. Both failed against main's bundle (ADR-0016). Signed-off-by: Mark Beacom <m@beacom.dev>
mbeacom
added a commit
that referenced
this pull request
Oct 10, 2026
…ut publishing it (#295) (#312) * feat(core,cli,sdk): close the SDK's remaining publication gates without publishing it (#295) - ADR-0031 item 8 / ADR-0053 item 3: core exports todayUtcDate, the absent-input `--as-of` default, and replaces every inline copy: adr queue, the queue Action (bundle regenerated), adr new's scaffold, and the SDK's queue(). The portal now takes the SDK's echoed default (queue().asOf) instead of computing its own. Tests ban the inline expression in all of them. - ADR-0031 item 4 / ADR-0053 item 8: `adr explain`, `adr lint`, and `adr new --json` now come from core formatters (packages/core/src/ report). Old and new CLIs produced byte-identical stdout and exit codes on 53 command lines over this corpus and the SDK fixtures; committed goldens hold it. - ADR-0031 item 6 / ADR-0053 item 5: a conformance fixture under packages/core/test/conformance/golden: the CLI must reproduce its queue and check goldens byte for byte, and the SDK must agree with them. - ADR-0031 item 5: docs/RELEASING.md documents the SDK and CLI JSON consumer contracts. Nothing is published: RELEASE_PACKAGES, exports, files, and the no-release assertions are untouched. packages/ci/dist rebuilt under linux/amd64 Bun 1.4.2. Every new test was observed failing first (ADR-0016). Ticked: ADR-0031 items 4, 5, 6, 8 and ADR-0053 items 3, 5, 8. Signed-off-by: Mark Beacom <m@beacom.dev> * fix(sdk,portal): accept the CLI's --as-of grammar in queue(), so the portal takes ISO datetimes Review on #312 found three gaps: - #295 promised the portal would accept ISO datetimes once the default moved to core, but it still refused them. The SDK's queue({ asOf }) now resolves a supplied value through core's resolveAsOf, the grammar `adr queue --as-of` uses (a bare date, or an ISO datetime with an explicit zone), and echoes the resolved UTC date in QueueView.asOf; anything else throws RangeError. The portal passes the caller's asOf to queue() and builds from view.asOf, so it accepts datetimes while importing only the SDK. No new SDK symbol; the doc no longer tells callers to reach into core. - The portal's default-date test could fail across UTC midnight; it now brackets both readings and compares only when no midnight passed. - docs/sdk-surface.md and the ADR-0031 item 8 note still described the portal's removed copy and bare-date rule. New tests were observed failing first (ADR-0016), including SDK/CLI equivalence for a datetime asOf on all four corpora. Signed-off-by: Mark Beacom <m@beacom.dev> * build(ci): rebuild the Action bundles after rebasing onto main, and test the portal bundle's datetime as-of packages/ci/dist rebuilt under linux/amd64 Bun 1.4.2 on top of main (after #307, #308, #314). The portal bundle now takes the SDK's --as-of grammar: a new bundle test resolves 2026-01-08T23:30:00-05:00 to 2026-01-09, and the usage-error test uses a timezone-less datetime with core's message. Both failed against main's bundle (ADR-0016). Signed-off-by: Mark Beacom <m@beacom.dev> --------- Signed-off-by: Mark Beacom <m@beacom.dev>
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.

Closes #299.
What and why
The schema accepts
<log>:<id>references, but the surfaces disagreed about them:adr lintfailed a qualifiedrelatesTowith exit 1.supersedesas inert (or passing, given a snapshot), while lint failed it.This PR implements the accepted ADR-0059:
relatesToorconflictsWithasfederated-ref-unresolvedatinfoinstead ofdangling-relatesTo(error) ordangling-conflictsWith(warn). This is the amendment to ADR-0031 clause 5 that ADR-0059 declares, and only therelatesTocase lowers an exit code. Measured on a fixture,adr lintandadr explaingo from 1 to 0, whilecheckandqueuewere already 0. A qualified reference never resolves to a local record that shares its bare id.supersedes/supersededByis adangling-*error everywhere.adr evaluatenow fails it asno-orphan-refs.dangling-supersedes, even when a snapshot lists the id.relatesTo, which now agrees with lint.Checklist
@adrkit/corechanged, sopackages/ci/distis regenerated under linux/amd64 Bun 1.4.2. The bundles gainparseAdrRefand this change, and nothing else.bun test: 4345 pass.typecheck,lint,check:deps,check:stale-refs,check:changelog, andadr lint(59 records, clean) also pass.Notes for reviewers
docs/RELEASING.mdnames the amendment in its SemVer paragraph.specs/005-…/contracts/pass-0-evaluation.mdstill describes the old evaluator behavior. I left it alone becausespecs/records history.