Repository navigation
Blob re-hash, status override symmetry, C# parity + the cache_protocol contract - #97
Merged
Merged
Conversation
added 2 commits
August 31, 2026 19:14
- remote: RemoteStore.get_blob re-hashes returned content against the requested hash and treats a mismatch as a miss, so a buggy or compromised shared cache can never serve wrong weft. - api/server: status takes the same python toolchain override verify does, threaded into the reported interpreter and every toolchain identity, and serve --python reaches the status closure — status never calls dirty (or refuses on config) what verify just greened. Contract updated first; verify --radius status green. - langs/csharp: examples/csharp-invoices — the C# example (11 contracts, the java-payroll three-layer shape; full sweep 3.8x in docs/benchmarks.md). Live NUnit and xunit-v3 (Microsoft.Testing. Platform) e2e coverage joins the xUnit one. run_tests passes -p:TestingPlatformShowTestsFailure=true (no-op for VSTest) and _parse_test reads MTP's MSBuild-error failure lines, so MTP failures are real fail verdicts with per-test summaries instead of tests_failed_to_run; parameterized ([Theory]/[TestCase]) display names parse too. Caveat documented: dotnet test ignores --filter for MTP projects, so those verifies run the whole suite — conservative, never a wrong green.
The v0.5 hosted-store theme shipping made the wire a compatibility surface (0.5.0 already promised 'wire protocol unchanged; clients need no update'), so it gets a contract: routes and the structured error envelope, publish/read auth scoping, greens-only publishes, first-writer-wins verdicts, key-addressed revocation (name sweeps over existing keys, premarked, key-addressed restore, first-reason-wins audit), sha256 content-addressed blobs with client re-hash, and additive evolution. Spec-only — no impl to verify; the nine test_remote_store node ids pin it. Drafted status: inferred, reviewed and confirmed. The module interiors (remote.py, cache_server.py, shared.py) deliberately stay uncontracted; CLAUDE.md's seam list and interior rule updated.
This was referenced Aug 31, 2026
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.
Three deferred hardenings from ISSUES.md, plus the wire-protocol contract that fell out of the follow-up spec audit.
ISSUES.md 19 —
RemoteStore.get_blobre-hashesThe client re-hashes returned blob content against the requested hash and treats a mismatch as a miss, so a buggy or compromised shared cache can never serve wrong weft. Pinned by a tampered-blob test over the real transport.
ISSUES.md 22 —
serve --pythonverify/status symmetryapi.statustakes the same toolchain overrideapi.verifydoes — threaded into the reported interpreter and every toolchain identity — andserve --pythonnow reaches the status closure, so status never calls dirty (or refuses on a bad config interpreter) what verify just greened. Thestatuscontract gained the signature + invariant first;verify --radius statusgreen. Pinned at the api layer and through the realbuild_serverclosures.ISSUES.md 23 — C# parity
examples/csharp-invoices: the C# example (11 contracts, java-payroll's three-layer shape) — records hashed whole, an[InlineData]bracket table, a nested test class withOuter+Innernode ids. Full sweep 3.8× (docs/benchmarks.md).-p:TestingPlatformShowTestsFailure=true(a no-op for VSTest projects) and parses MTP's MSBuild-error failure lines: MTP failures are now realfailverdicts with per-test summaries instead oftests_failed_to_run.[Theory]/[TestCase]) display names —Name(arg: value, ...)— now parse as failures for all VSTest frameworks.dotnet testignores--filterfor MTP projects, so those verifies run the whole suite — conservative, never a wrong green.contracts:
cache_protocol(spec-only, confirmed)The v0.5 theme shipping made the cache server's wire a compatibility surface (0.5.0 already promised “wire protocol unchanged; clients need no update”), so it is now a contracted seam: routes + structured error envelope, publish/read auth scoping, greens-only publishes, first-writer-wins verdicts, key-addressed revocation semantics, sha256 content addressing with client re-hash, and additive evolution. The module interiors (
remote.py,cache_server.py,shared.py) deliberately stay uncontracted; CLAUDE.md's seam list and interior rule updated to match.Verification
uv run pytest: 294 passed (was 286)uv run python bench/benchmark.py: 5.4× (gate ≥5×)hashloom status: 14 contracts,dirty: [], review queue emptyverify --radiusgreen onstatusandLanguageAdapter; the example's loop proven end to end (pass → cached-pass → one-unit fail with the[Theory]case named → revert → cached-pass)