Skip to content

spec(amp): address #544 review nits - bind ctx, normalize body_cid, fix input_cids, MD040, paper-12 port count#565

Merged
TSavo merged 1 commit into
mainfrom
ts-amp-spec-nits
May 10, 2026
Merged

spec(amp): address #544 review nits - bind ctx, normalize body_cid, fix input_cids, MD040, paper-12 port count#565
TSavo merged 1 commit into
mainfrom
ts-amp-spec-nits

Conversation

@TSavo
Copy link
Copy Markdown
Owner

@TSavo TSavo commented May 10, 2026

Summary

Applies the still-valid AMP/LSP spec review nits flagged on PR #544 (CodeRabbit + Codex):

  • Bind ctx in the §2 refinement obligation (P1/Major): the formula previously used ctx free, making it an open formula that backends interpret inconsistently. Both the prose form and the IrFormula encoding now quantify (i : LangAST) (ctx : Context), so it is a closed theorem.
  • Define a deterministic B.body_cid normalization rule in §4 (P2): was TBD. Now BLAKE3-512(JCS({ "files": <sorted-by-path array of { "path": repo-relative POSIX path NFC-normalized, "content_cid": "blake3-512:" + lowercase-hex(BLAKE3-512(<raw file bytes>)) } })) -- order-independent, separator-free, byte-reproducible across producers and platforms. §1.3's body_cid field now points at the §4 rule.
  • Make the input_cids rule consistent (Major): §1.3 now matches §4 step 5 -- [<algorithm_cid>, <projection_memento_cid>], must include both the bound algorithm CID and the language projection (P_lang) CID.
  • MD040: tag the bare fenced code blocks in the AMP spec with a language id (text / json).
  • Paper 12: fix the copy-error port count ("five Python ports, five Rust ports, five C ports") to "one Python port, one Rust port, one C port, one Java port, and one Zig port" (five total ports, one per language); also de-em-dashed that line.

Spec/docs only; no code. The remaining em-dashes in the AMP spec's field listings (effects, body_cid, locus) are pre-existing and out of scope here -- a separate em-dash cleanup pass can take them.

Test plan

  • Render-check the AMP spec and paper 12
  • grep -P '[—–]' over the changed lines returns nothing
  • The §2 refinement obligation is now a closed formula (no free ctx)

🤖 Generated with Claude Code

…ix input_cids, MD040, paper-12 port count

Applies the still-valid AMP/LSP spec review nits from PR #544:
- Bind `ctx` in the §2 refinement obligation (both the prose form and the
  IrFormula encoding): the formula now quantifies `(i : LangAST) (ctx :
  Context)` so it is a closed theorem, not an open formula that backends
  interpret inconsistently.
- Define a deterministic `B.body_cid` normalization rule in §4 (was TBD):
  BLAKE3-512(JCS({ "files": <sorted-by-path array of { path: repo-relative
  POSIX path NFC-normalized, content_cid: BLAKE3-512 of the file bytes } }))
  -- order-independent, separator-free, byte-reproducible across producers.
  §1.3's body_cid field now points at the §4 rule.
- Make the `input_cids` rule consistent: §1.3 now matches §4 step 5 --
  [<algorithm_cid>, <projection_memento_cid>], must include both the bound
  algorithm CID and the language projection (P_lang) CID.
- Tag the bare fenced code blocks in the AMP spec with a language id
  (markdownlint MD040).
- Paper 12: fix the copy-error port count ("five Python ports, five Rust
  ports, five C ports") to "one Python port, one Rust port, one C port, one
  Java port, and one Zig port" (five total ports, one per language).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 10, 2026 05:59
@TSavo TSavo merged commit 47b8e8b into main May 10, 2026
4 of 5 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

Warning

Rate limit exceeded

@TSavo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 58 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 66fbad79-955a-42af-8daa-93e9f74135a5

📥 Commits

Reviewing files that changed from the base of the PR and between 24001f8 and f252f87.

📒 Files selected for processing (2)
  • docs/papers/12-after-languages-how-proofir-represents-every-language.md
  • protocol/specs/2026-05-09-algorithm-memento-protocol.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ts-amp-spec-nits

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@TSavo TSavo review requested due to automatic review settings May 10, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant