breg: ingestion-run client and audit follow-ups from #1188 final review round
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the Rust client request builder and derived bindings for the ingestion count ceiling, then inspect create_ingestion_run for request/response binding. Trace execute_batch_guarded, finish_ingestion_submission, and the service-refusal audit, using service_level_chunk_refusals_are_audited to enumerate duplicate-audit paths. Check the attempt persistence path for chunkIndex and verify all four follow-ups preserve refusal auditing and response-safe values.
Written by the indexing model from the issue text.
Description
Follow-ups accepted from the final review round of #1188 (round 15, four P2s). All four were verified or mechanism-confirmed against the code; all are non-critical consistency and availability edges on authenticated, creator-scoped surfaces, so they are tracked here rather than fixed in the PR.
-
Reject run-request counts above the protocol ceiling at build time (review)
The client builder encodes an announcement withitemCount/inputLength/chunkCountabove 2^53 - 1 even thoughparse_create_run_bodyalways refuses it. ApplyMAXIMUM_INGESTION_COUNTin the Rust client's request builder (and the derived bindings) so the maintained SDK cannot construct announcements the runtime always rejects. Verified: the round-14 bound was added to the server parser and to client decode, not to the request builder. -
Bind created runs to their announcement (review)
create_ingestion_runaccepts a structurally valid 201 body for a different announcement without comparing the returned run's profile, operation, package/schema binding, input digest, or counts against the request, so a substituted body can be persisted as the successful result and drive later chunks against the wrong checkpoint. Mirror the request/response binding the round-14 fix added to submit/read/cancel/receipt (the announcement members are all echoed and comparable). Verified: create was the one run-scoped method left unbound. -
Avoid auditing coordinator refusals twice (review)
When a valid next-chunk request is refused inside the batch coordinator (normalization, validation, or mutation),execute_batch_guardedhas already written the batch refusal audit, and the ingestion error arm writes a second HTTP refusal audit for the same request; if only the redundant second write fails, the deterministic refusal is promoted toservice.unavailable. Audit integrity is security-sensitive per AGENTS.md, so the follow-up should either invoke the service-level audit only for errors raised before the coordinator or carry an already-audited marker. Mechanism confirmed in outline (finish_ingestion_submission+ the service-refusal audit pinned byservice_level_chunk_refusals_are_audited); the exact set of double-audited paths needs enumeration before the fix. -
Reject oversized chunk indexes before persisting attempts (review)
chunkIndexparses as i64 and the mismatch path persists it intolast_attempt_chunk_index(column check is only>= 0), so an absurd index makes every later run document carry a count above 2^53 - 1, which the round-14 client decode refuses: the creator's own run becomes uninspectable and unresumable by every maintained client. Enforce the response-safe ceiling (MAXIMUM_INGESTION_COUNT) on the attempted index before persisting. Verified:Option<i64>storage,>= 0check only, value rendered into the run document.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 0
- Avg merge
- 3h 45m
- Merged PRs (30d)
- 134
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from registrystack/registry-stack
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
registrystack/registry-stack#1239 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
registrystack/registry-stack#1235 ·
-
area:breg bug good first issue rust
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
registrystack/registry-stack#1227 ·
-
area:casework documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
registrystack/registry-stack#1217 ·
-
area:breg documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
registrystack/registry-stack#1213 ·
All issues in registrystack/registry-stack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100