Repository navigation
Add aps schema self-describing contract endpoint (Closes #32) - #51
Merged
Merged
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
4 tasks
0xLeif
force-pushed
the
kimi/issue-32-aps-schema
branch
from
July 19, 2026 00:38
1628c79 to
7b2902b
Compare
Review (agent:cursor) — tested locallyVerdict: Approve after rebase. Feature looks good; SpecSync ID and merge order need fixing. Tested
Required before merge
Suggested merge order#50 → #53 → #54 → #55 → this PR last (so schema describes the final surface). |
This was referenced Jul 19, 2026
- new aps schema command: one cacheable JSON document with cliVersion, integer schemaVersion, state-root precedence, keys, commands, payload shapes (minimal JSON Schema subset), and the stable error table - static contract only; live state stays in dump (interview decision) - Schema.document() derives keys from DemoKey metadata; cliVersion asserted against aps --version in smoke to guard drift - tests (3 new) + smoke assertions; specs/README in lockstep - SpecSync CHG-0018 accepted; evidence rebound for CHG-0003/0004/0007/ 0011/0012/0013/0014/0015/0016/0017 (audited reopens, actor 0xLeif)
The schema change keeps its CHG-0018 id alongside main's Windows-audit CHG-0018; the collision is recorded in the sequence ledger's acknowledged_collisions instead of renumbering. Evidence rebound for all shared accepted changes after the base move (audited reopens, actor 0xLeif).
After rebasing onto the error/TTY/watch/secret stack: use porcelain JSON for `aps schema`, document secret.enc + secret_unlock_failed + WatchEndEvent, and update smoke/tests for compact schemaVersion 2. Co-authored-by: Leif <leif.algo@pm.me>
cursor
Bot
force-pushed
the
kimi/issue-32-aps-schema
branch
from
July 19, 2026 14:07
7b2902b to
9cd293d
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 #32.
Summary
New
aps schemacommand: the self-describing contract endpoint from design decision 4 and the precondition for dynamic schema (1.0).One cacheable JSON document containing:
cliVersion(asserted equal toaps --versionin smoke) and integerschemaVersion(bumped on any contract change; agents compare equality to detect drift)--state-dir>APS_HOME>~/.aps)keys[]: everyDemoKeywith type, storage, lifetime, and path pattern (incl. the Keychain account forsecret)commands[]: every subcommand with arguments, flags, payload reference, streaming flagpayloads: JSON shapes for KeyValuePayload, KeysPayload, WatchEvent, WatchErrorEvent, ResetPayload, StatsPayload, ErrorEnvelope (minimal JSON Schema subset: type/properties/required/array/items)errors: the stable code -> exit-code -> meaning/hint table (includingcorrupt_state)Static contract only; live state stays in
dump(locked interview decision).Verification (local, worktree)
swift buildclean; 43 tests (3 new: key/command coverage, error-table stability, encoded-document validity), 0 failuressmoke.shgreen incl. new assertions: schemaVersion present, key entries,corrupt_statein the error table,cliVersion==aps --versionspecsync check --force7/7 files 100%,specsync change check17 active valid,fledge lanes run verifygreenaps schemaand documents the drift rule plus--experimental-dump-helpSpecSync
Merge note
This branch and #50 both bump the aps-cli spec to v18 and both carry a CHG-0018 id (created on different branches from the same ledger). Whichever merges second should rebase, bump the spec to v19, and renumber its change to CHG-0019 via the ceremony. Happy to do that pass on this PR if #50 lands first.