Skip to content

feat(proof): commit MCP tool schema and BlobStore witnesses - #459

Merged
Sinity merged 1 commit into
masterfrom
feature/feat/witnesses-mcp-blob
Apr 26, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/feat/witnesses-mcp-blob

Conversation

@Sinity

@Sinity Sinity commented Apr 26, 2026

Copy link
Copy Markdown
Owner

Summary

Ref #448. Lands the first two committed witnesses identified by the
proof-coverage-audit (swarm 2026-04-26). Remaining three (TUI mutation,
site publication, browser-extension messaging) are deferred as separate
work — they each need a substantial harness, which the issue notes.

Problem

tests/witnesses/ had exactly one committed witness. The
WitnessMetadata lifecycle infrastructure was built out but underused.
Two surfaces with high regression value were missing snapshots:

  • The MCP tool wire schema — drift here silently invalidates client
    integrations that consume the published JSON Schema.
  • The BlobStore on-disk layout — any change to the addressing scheme
    or directory split silently invalidates every blob ever written.

Solution

  • mcp.tool-schemas — snapshot of build_server()._tool_manager._tools
    reduced to {name, parameters} per tool. Regression test diffs the
    current registration against the committed JSON.
  • storage.blob-store-layout — three synthetic fixtures with their
    base64-encoded content bytes, expected SHA-256, expected size, and
    expected on-disk relative path. Regression test re-writes them into a
    fresh BlobStore and asserts every field.

Both witnesses validate per WitnessMetadata.validation_errors() == ()
and link the test file in their provenance.

Verification

  • devtools verify (full, with pytest): all checks pass.
  • 6 new tests across both surfaces.

Ref #448. First two of the five witnesses identified by the
proof-coverage-audit (swarm 2026-04-26). The remaining three (TUI
mutation, site publication, browser-extension messaging) are deferred
as separate work.

mcp.tool-schemas
  - Snapshot of every registered MCP tool: {name, parameters JSON Schema}.
  - Drift here silently invalidates clients consuming the wire schema.
  - Regression test diffs build_server() output against the witness.

storage.blob-store-layout
  - Synthetic 3-blob fixture with content-bytes, expected SHA-256, and
    expected on-disk relative path.
  - Catches changes to addressing scheme or directory split.
  - Also asserts content-only addressing (same bytes → same path).

Both witnesses validate per WitnessMetadata.validation_errors() == ().

Verification: devtools verify (full) — all checks pass; 6 new tests pass.
@coderabbitai

coderabbitai Bot commented Apr 26, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 16 minutes and 42 seconds.

⌛ 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ca023e2e-3e75-4c0e-a7ac-6ac68134d2fd

📥 Commits

Reviewing files that changed from the base of the PR and between 75ed380 and 1baf3f8.

📒 Files selected for processing (6)
  • tests/data/witnesses/blob-store-layout.json
  • tests/data/witnesses/mcp-tool-schemas.json
  • tests/unit/mcp/test_tool_schema_witness.py
  • tests/unit/storage/test_blob_store_layout_witness.py
  • tests/witnesses/blob-store-layout.witness.json
  • tests/witnesses/mcp-tool-schemas.witness.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/feat/witnesses-mcp-blob

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1baf3f8282

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Sinity
Sinity merged commit 7f52313 into master Apr 26, 2026
13 checks passed
@Sinity
Sinity deleted the feature/feat/witnesses-mcp-blob branch April 26, 2026 16:56
@Sinity

Sinity commented Apr 28, 2026

Copy link
Copy Markdown
Owner Author

🤖 Post-hoc audit note: this PR received bot review feedback verified against current HEAD as part of #544. 1 finding(s) confirmed still present → tracked in #545.

@Sinity
Sinity requested a review from Copilot May 1, 2026 00:44
@Sinity
Sinity requested review from Copilot and removed request for Copilot May 1, 2026 01:05
@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:15
Sinity added a commit that referenced this pull request May 7, 2026
## Summary

Ref #448. Lands the first two committed witnesses identified by the
proof-coverage-audit (swarm 2026-04-26). Remaining three (TUI mutation,
site publication, browser-extension messaging) are deferred as separate
work — they each need a substantial harness, which the issue notes.

## Problem

`tests/witnesses/` had exactly one committed witness. The
`WitnessMetadata` lifecycle infrastructure was built out but underused.
Two surfaces with high regression value were missing snapshots:

- The MCP tool wire schema — drift here silently invalidates client
  integrations that consume the published JSON Schema.
- The BlobStore on-disk layout — any change to the addressing scheme
  or directory split silently invalidates every blob ever written.

## Solution

- ``mcp.tool-schemas`` — snapshot of
``build_server()._tool_manager._tools``
  reduced to ``{name, parameters}`` per tool. Regression test diffs the
  current registration against the committed JSON.
- ``storage.blob-store-layout`` — three synthetic fixtures with their
  base64-encoded content bytes, expected SHA-256, expected size, and
  expected on-disk relative path. Regression test re-writes them into a
  fresh ``BlobStore`` and asserts every field.

Both witnesses validate per ``WitnessMetadata.validation_errors() ==
()``
and link the test file in their provenance.

## Verification

- ``devtools verify`` (full, with pytest): all checks pass.
- 6 new tests across both surfaces.
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

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