docs(protocol): specify File backend format (LAB-430)#42
Conversation
Co-authored-by: multica-agent <github@multica.ai>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 20 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe PR defines a shared File backend format, adds canonical JSON test vectors and a standard-library validator, integrates validation into CI, and updates specification and TypeScript capability documentation. ChangesFile backend format
Sequence Diagram(s)sequenceDiagram
participant VerifyWorkflow
participant FileBackendReference
participant FileBackendVectors
VerifyWorkflow->>FileBackendReference: Runs python3 tools/file-backend-reference.py
FileBackendReference->>FileBackendVectors: Loads canonical JSON vectors
FileBackendVectors-->>FileBackendReference: Supplies expected encoded fields
FileBackendReference-->>VerifyWorkflow: Returns success or validation failure
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…-1784984693 # Conflicts: # sdk-feature-matrix.md
|
Resolved a conflict in |
This comment has been minimized.
This comment has been minimized.
Replace data-validation asserts with explicit ValueError raises so the CI verifier cannot silently pass when asserts are stripped, and give missing/malformed vector files a clear one-line error and exit 1. Addresses kodus-27b review on #42 (LAB-805). Co-authored-by: multica-agent <github@multica.ai>
This comment has been minimized.
This comment has been minimized.
|
@kody start-review |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@spec/file-backend-format.md`:
- Line 36: Update the TTL refresh requirement in the “Entries are written…”
specification so refreshing expiry bytes cannot modify the live file in place.
Require refreshes to write a temporary copy and atomically rename it into place,
or explicitly define an equivalent locking or atomic-write guarantee that every
SDK must provide.
In `@test-vectors/file-backend.json`:
- Around line 28-37: The canonical verification path lacks coverage for
preserved misses with non-zero reserved bytes. In
test-vectors/file-backend.json:28-37, add a vector with a non-zero reserved byte
and reader_action "miss_preserve"; in tools/file-backend-reference.py:40-41,
separate writer reserved-byte validation from reader negotiation so the reader
can verify and preserve the reserved value instead of rejecting the vector
before behavior is checked.
In `@tools/file-backend-reference.py`:
- Around line 43-48: Update the reader-action verification around the
expected_action calculation to incorporate expiry semantics, not just flags. Add
a deterministic reference timestamp for identifying expired entries, then assert
the specified expired-entry action separately from miss_preserve, which remains
the expected action for unknown nonzero flags. Ensure zero-flag entries are only
accepted as return_payload when they are not expired.
- Around line 30-48: Update the vector-file validation flow surrounding the loop
over document["vectors"] to validate the document shape, each vector object,
required fields, and hexadecimal values before indexing, decoding, or unpacking
them. Catch structural and decoding failures including KeyError, TypeError, and
ValueError, and report the promised one-line “invalid vector file” error with
exit code 1 instead of allowing a traceback; preserve the existing validation
checks for well-formed vectors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9b191772-80f7-422e-8016-51857c7ea59e
📒 Files selected for processing (6)
.github/workflows/verify.ymlREADME.mdsdk-feature-matrix.mdspec/file-backend-format.mdtest-vectors/file-backend.jsontools/file-backend-reference.py
…obust verifier - spec: TTL refresh must not expose a torn expiry — atomic-rename path or a single positioned 8-byte write per POSIX.1-2017 2.9.7, with single-read header loads. - vectors (1.1.0): add reserved_nonzero_preserved (fail-closed reserved negotiation) and expired_entry (deterministic reader_now at the >= expiry boundary, reader_action miss_expired). - verifier: reserved byte is reader negotiation, not a writer check; reader_action derived from reserved+flags+expiry with fail-closed precedence; structural/hex errors exit 1 with one-line messages. Addresses coderabbitai review on #42 (LAB-805). Co-authored-by: multica-agent <github@multica.ai>
This comment has been minimized.
This comment has been minimized.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Addresses kodus-27b review on #42 (LAB-805). Co-authored-by: multica-agent <github@multica.ai>
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
@kody start-review |
Defines the shared File backend storage contract and canonical vectors required by LAB-430.\n\nIncludes fail-closed reserved/flag negotiation, a stdlib vector verifier wired into CI, and TypeScript backend/capability matrix updates.
Summary by CodeRabbit
New Features
Documentation
Tests