Repository navigation
feat(core,cli,sdk): close the SDK's remaining publication gates without publishing it (#295) - #312
Merged
Merged
Conversation
Decisions governing this change19 accepted decisions govern this change · 1 active proposal · 1 historical record Show all 19 governing decisions and why each applies
Active proposals touching this change (1)These are not yet ratified and do not bind this change:
Historical records that once covered this change (1)These no longer bind this change, and are listed for context only: Links point at |
There was a problem hiding this comment.
🟡 Changes recommended
The portal still omits #295’s ISO-datetime support, while its new midnight test is flaky and SDK documentation is stale.
3 open findings
What changed in this PR
Closes most @adrkit/sdk publication gates without publishing the package.
Changes:
- Centralizes UTC-date defaults and core-owned JSON formatters.
- Adds CLI/SDK conformance fixtures and goldens.
- Documents consumer contracts and updates ADR action items.
Marker-aware ADR compliance could not be independently verified because the adrkit MCP tools were unavailable.
| File | Description |
|---|---|
CHANGELOG.md |
Records new contracts and fixture. |
docs/RELEASING.md |
Documents SDK and CLI JSON contracts. |
docs/sdk-surface.md |
Updates SDK status and consumer evidence. |
docs/adr/0031-….md |
Marks publication gates complete. |
docs/adr/0053-….md |
Updates SDK action items. |
packages/core/src/index.ts |
Exports date and report APIs. |
packages/core/src/queue/as-of.ts |
Adds todayUtcDate. |
packages/core/src/report/index.ts |
Adds canonical JSON reports. |
packages/core/src/scaffold/new.ts |
Uses shared UTC-date helper. |
packages/core/test/surface.test.ts |
Pins public exports. |
packages/core/test/report.test.ts |
Tests report contracts. |
packages/core/test/queue/as-of.test.ts |
Tests centralized date behavior. |
packages/core/test/conformance/golden/.gitattributes |
Enforces fixture LF endings. |
packages/core/test/conformance/golden/README.md |
Documents conformance usage. |
packages/core/test/conformance/golden/manifest.json |
Defines fixture commands. |
packages/core/test/conformance/golden/check.json |
Pins check output. |
packages/core/test/conformance/golden/queue.json |
Pins queue output. |
packages/core/test/conformance/golden/repo/docs/adr/0001-use-the-sync-protocol.md |
Adds fixture decision. |
packages/core/test/conformance/golden/repo/docs/adr/0002-retry-on-transient-failure.md |
Adds marker-only decision. |
packages/core/test/conformance/golden/repo/docs/adr/0003-poll-for-changes.md |
Adds superseded decision. |
packages/core/test/conformance/golden/repo/docs/adr/0004-push-changes-over-websockets.md |
Adds successor decision. |
packages/core/test/conformance/golden/repo/docs/adr/0005-batch-sync-writes.md |
Adds reviewed proposal. |
packages/core/test/conformance/golden/repo/docs/adr/0006-adopt-a-queue.md |
Adds unqueued proposal. |
packages/core/test/conformance/golden/repo/docs/adr/0007-sketch-offline-mode.md |
Adds draft decision. |
packages/core/test/conformance/golden/repo/docs/adr/notes/0008-nested-record.md |
Exercises skipped discovery. |
packages/core/test/conformance/golden/repo/src/cache/lru.ts |
Adds ungoverned fixture path. |
packages/core/test/conformance/golden/repo/src/sync/protocol.ts |
Adds pattern-governed path. |
packages/core/test/conformance/golden/repo/src/sync/retry.ts |
Adds live marker path. |
packages/core/test/conformance/golden/repo/src/sync/stale.ts |
Adds stale marker path. |
packages/cli/src/index.ts |
Uses core JSON report builders. |
packages/cli/src/queue.ts |
Uses shared UTC-date helper. |
packages/cli/test/conformance.test.ts |
Verifies fixture outputs. |
packages/cli/test/json-report.test.ts |
Pins JSON compatibility. |
packages/cli/test/fixtures/json-report/.gitattributes |
Enforces golden LF endings. |
packages/cli/test/fixtures/json-report/new.json |
Pins new output. |
packages/cli/test/fixtures/json-report/lint.json |
Pins lint output. |
packages/cli/test/fixtures/json-report/lint-broken.json |
Pins failed lint output. |
packages/cli/test/fixtures/json-report/explain-retry.json |
Pins marker explanation. |
packages/cli/test/fixtures/json-report/explain-protocol.json |
Pins pattern explanation. |
packages/cli/test/fixtures/json-report/explain-stale.json |
Pins stale-marker explanation. |
packages/cli/test/fixtures/json-report/explain-lru.json |
Pins ungoverned explanation. |
packages/cli/test/fixtures/json-report/explain-missing.json |
Pins absent-path explanation. |
packages/cli/test/fixtures/json-report/explain-broken.json |
Pins corpus-error explanation. |
packages/cli/test/fixtures/json-report/explain-broken-as-of.json |
Pins temporal corpus-error output. |
packages/cli/test/fixtures/json-report/explain-as-of-retry.json |
Pins temporal marker output. |
packages/cli/test/fixtures/json-report/explain-as-of-protocol.json |
Pins temporal pattern output. |
packages/cli/test/fixtures/json-report/explain-as-of-stale.json |
Pins temporal stale output. |
packages/cli/test/fixtures/json-report/explain-as-of-lru.json |
Pins temporal ungoverned output. |
packages/cli/test/fixtures/json-report/explain-as-of-missing.json |
Pins temporal absent output. |
packages/sdk/src/index.ts |
Clarifies queue default contract. |
packages/sdk/src/decision-set.ts |
Uses core UTC-date helper. |
packages/sdk/test/conformance.test.ts |
Compares SDK with CLI goldens. |
packages/portal/src/generate.ts |
Sources default date from SDK. |
packages/portal/test/generate.test.ts |
Tests SDK-derived default. |
packages/ci/src/queue-action-entrypoint.ts |
Uses shared UTC-date helper. |
packages/ci/dist/queue-action.js |
Regenerates queue bundle. |
packages/ci/dist/portal-action.js |
Regenerates portal bundle. |
🧠 Review effort: Balanced
…ut 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>
…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>
…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
force-pushed
the
feat/sdk-publication-gates
branch
from
October 10, 2026 23:40
e9f3a63 to
3eab946
Compare
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 #295, except for the publication act itself, which stays a later record's decision.
What and why
This closes everything ADR-0031 and ADR-0053 list before
@adrkit/sdkcan be published. Nothing is published.RELEASE_PACKAGES,exports,files, and the no-release assertions are untouched.todayUtcDateand replaces every inline copy:adr queue, the queue Action (bundle regenerated),adr new's scaffold, and the SDK'squeue().queue().asOf) instead of computing its own.adr explain,adr lint, andadr new --jsonnow come frompackages/core/src/report, alongside the queue and graph formatters that already lived there.--as-of, including a ref) and the SDK fixtures. Committed goldens hold that.packages/core/test/conformance/golden/: a fixed corpus, a manifest of commands and exit codes, and queue and check goldens. The CLI must reproduce them byte for byte, and the SDK must agree field by field.docs/RELEASING.mdgains "Consumer contracts:@adrkit/sdkand the CLI JSON", with the command → core shape → formatter table, the additive-only rule, and the ADR-0059 exception.Checklist
@adrkit/core/packages/ci/srcchanged, sopackages/ci/distis regenerated under linux/amd64 Bun 1.4.2. I rebuilt twice and got identical bytes.bun test: 4370 pass.typecheck,lint,check:deps,check:stale-refs,check:changelog,adr lint(59, clean), andemit:manifestpass.Notes for reviewers
packages/ci/**andscripts/.openDecisionsand five of the six handle members in CI, but only as a build-time consumer.docs/sdk-surface.mdnow says exactly that.QueueOptions.asOfdoc still points callers at core'sresolveAsOf. An SDK date helper would remove that.retry.tsnames 0002 andstale.tsnames 0003. This repo's governing-decisions Action may post advisory context about them on this PR. That's harmless and has no exit-code effect.packages/ci/distand the CHANGELOG. Whichever merges later gets rebased with its dist rebuilt.