Skip to content

fix: bound PR canonical index encoding before growth - #1831

Merged
EffortlessSteven merged 4 commits into
sync/history-ripr-engineering-20261004from
fix/pr-evidence-index-growth-20261009
Oct 9, 2026
Merged

EffortlessSteven merged 4 commits into
sync/history-ripr-engineering-20261004from
fix/pr-evidence-index-growth-20261009

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Both PR producers now admit the existing 4,096-entry limit before canonical projection and enforce the existing 2 MiB encoded-byte limit before growing the index buffer. Successful bytes, order and digests remain identical; an oversized ten-item presentation cannot rescue a failed exhaustive index.

Qualified head 8b0db371bfb0d8f0af9ade4221eeb8602b6f3806, tree abbd455ad132584bca5ed76ac1324e85c07588fc, carrier base e81fd3adbc3d528548600f2a0fe6583f64e29977. The shared review_input helper feeds installed and xtask producers, with an additive public API record. A private sticky fallible encoder clamps geometric reservation requests and preserves the first failure across empty retries. Digest/count derive only from complete encoding; duplicate derivation retains downstream rejection. Separate ten-entry/128 KiB presentation guards, subject-first revocation and subject-last publication remain.

Observed proof:

  • Historical behavioral RED at cefdfe0: CI37919457356/job113783603676 failed because malformed 4,097-entry input reached projection rather than the entry guard.
  • Current Rust-only CI37921679491/job113790838719 passed 7,497 unit tests/0 failed/2 ignored plus integration/docs; all four helper/writer controls and installed producer refusal/recovery passed.
  • Current Routed37921898892/job113791642920 passed required fmt/check/clippy/policy/goldens/fixtures and 13,240 workspace tests, 5 skipped. Both actual producer transaction controls passed. Literal e81 → 8b producer → saved check → review → review check executed and admitted current evidence.
  • Normalized result113811274758 passed: expected literal base/head/head-tree and synthetic f5442f2/treeabbd. Synthetic parents e81+8b and exact tree were independently verified. All 36 current checks are terminal (23 success/13 skipped); both addressed review threads have verified replies/resolved state.

Controls cover frozen successful encoding/order/digest, empty/Unicode/escape data, exact 2 MiB/+1, raw-size versus escaped-size expansion, 4,096/+1 pre-projection admission, duplicate consumer refusal, sticky refusal before growth and non-power-of-two reservation clamp. Actual producer controls include 4,096 unique findings whose full index exceeds 2 MiB while ten presentation items fit, and malformed 4,097 input; stale same-subject saved-check/direct-review refusal and recovery remain.

Governing issue/ownership/design: #1627 (comment). This integrates one reviewed source prerequisite into existing carrier #1818; dependent guard #1833 remains separate. No cap, schema, workflow, toolchain, protected-check, permission, runner or security change. Rollback is review_input.rs, both producer files and the additive API record.

Claim bounded logical encoded length/admitted reservation requests only. Physical capacity, RSS, decoded Value/projection/evidence allocations, complete full-carrier production and RC readiness remain outside this proof. Complete route stays DISABLED and canonical ab614 qualification remains NOT_ESTABLISHED. Local execution remains unavailable at the recorded pre-process helper_unknown_error; hosted proof is retained remotely.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d3d587da-5f7a-43ac-8f47-781236886272

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds test cases to verify the handling of oversized entries and byte limits during PR evidence generation in both "crates/ripr/src/app/pr_evidence.rs" and "xtask/src/reports/pr_evidence.rs". The feedback recommends replacing the hardcoded magic number "128 * 1024" with the named constant "REVIEW_INPUT_MAX_BYTES" in both test files to improve code maintainability and consistency.

Comment thread crates/ripr/src/app/pr_evidence.rs Resolved
Comment thread xtask/src/reports/pr_evidence.rs Resolved

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent exact-source review of22de7ad3459cccfe0b725e9a6c939baab987188f/treeb009c1dd3f61b0bb04b593bd528cc3d56c782cd2 found no actionable source, import, integration or safeguard defect. Shared producer helper retains4096/2MiB, admits entries before unchanged projection, refuses encoded length before reservation/copy, uses manuallyclamped geometric try_reserve_exact, and emits count/digest only after complete serialization. Legacy successful bytes/order/digest, undercap errors and consumer duplicate rejection are preserved; publicAPI record additive, protected gate implementation unchanged. Reviewer challenged two weak tests; corrected rejected2049total leaves buffer/request1024 unchanged underlimit2048, and successful3000limit forces1024→2048→3000→3000. Private all-or-error write_all override preserves firstfailure even on emptyretry. Actual bothproducer admittedbaseline→named indexrefusals→savedcheck/directreview refusal→recovery controls retained. Root observed terminal test-onlyCI37919457356/job113783603676 intendedred: old projection error where entryguard expected, with unchanged production. Disposition REVIEW_INCOMPLETE until exact published-head formatting/compiler/writer+xtask controls and producer/check/review receipts. Bounded encodedlength/admittedrequests only; decoded/projection/evidence allocations, consumerencoding, physicalcapacity/RSS, fullcarrier and complete-route remain outside claim. COMMENT on authoredPR, not approval.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 9, 2026 10:54

EffortlessSteven commented Oct 9, 2026 •

Copy link
Copy Markdown
Member Author

Carrier coordination readback for exact head 22de7ad3459cccfe0b725e9a6c939baab987188f / tree b009c1dd3f61b0bb04b593bd528cc3d56c782cd2: Rust-only37920452515/job113786843636 passed7,497unit tests/0failed/2ignored, including the installed producer transaction and four new writer/index controls. Routed37920465255/job113786970910 failed cargo fmt --check at10:57:17Z, nativeexit1, with13formatting hunks in review_input.rs and both producer files; downstream required PR evidence was not established. Aggregate113788488957 is terminalfailure, nativeverdict=failed.

Please retain existing writer ownership, apply the formatter output in a normal scoped successor, reconcile the two named-presentation-constant review threads, and qualify the exact new head/tree through mandatory formatting/compiler/tests, both actual producer controls and producer/check/review proof. Independent exact-source inspection found no concrete semantic blocker; this remains REVIEW_INCOMPLETE, not complete-route qualification. No coordinator source edits or reruns were made, and this does not request any build in the paused old task or desktop.

Separately, current carrier e81fd Perl/release job113782824770 is terminalfailure after103Perl tests and release phases: nativeproducerexit2 / stepexit1, 518,606changedRustlines across961files versus5,400, analysis not run. This is fresh e81fd evidence, not the historical77c3 denominator. Required Rust/coverage/analytics/broadWindows remain active; full issue1627 route is still disabled and owned by the existing writer.

Current successor readback and independent local proof (11:40UTC): Writer published 8b0db371bfb0d8f0af9ade4221eeb8602b6f3806 / tree abbd455ad132584bca5ed76ac1324e85c07588fc, parent22de. Full diff is formatter output plus two test substitutions by the existing128KiB presentation constant; production behavior unchanged. Both review threads are addressed/resolved with exact-source readback. Current Rust-only37921679491/job113790838719 passed7,497unit tests/0failed/2ignored and all four shared writer controls plus installed transaction control. Current Routed37921898892/job113791642920 remains active: REVIEW_INCOMPLETE, not merge-ready.

Because the hosted artifact endpoint remained technically blocked, carrier coordination independently regenerated the normal exact e81fd→8b0/treeabbd producer/check/review/check/annotations/check in a measured isolated cloud worktree with the repository-declared Rust1.95.0, unchanged lockfile and locked/offline serial compile. All seven native stages exited0. Check schema0.2 SHA256 7aac4c5ae852e599fcdfb6cd7a7395f150af604c80f42b7e600dde6cfcaeec36; canonical diff SHA256 e34e2ffe8e292aa1e1a953f05ef542709cab572144178edd463af733c66fa0c8; complete_with_findings118, exhaustive index59,454encodedbytes with independent digest/length readback, projection10 explicitly truncated. The review receipt is complete/committed/no missing artifacts or limitations. Independent substantive assessment covered all3inline+7summary IDs against full raw evidence and exact source/controls: no actionable source/oracle blocker found, with WeaklyExposed/unknown projection labels preserved. Deleted legacy index/error/field seams moved into the shared helper; current byte-count field is constrained by parity and consumer admission controls. Allocator failure and all118 individual mutation adequacy are not claimed.

Retained exact reports, compiler-artifact-selected executable hashes, verified source bundle, per-ID dispositions and resource receipts are preserved. Owned target/worktree/tools were released only after terminal consumers and byte/hash readback: peak private process-tree RSS3.23GB, minimum free21.60GB, required10GiB reserve intact; free29.49GB after closeout. No old-task/desktop build, competing source edit, cap increase or new remote CI run was requested. This is local alternative evidence, not hosted ZIP byte equivalence or full-producer heap/full-carrier/complete-route qualification. Existing writer retains the next guard-before-deep-clone slice; complete route remains NEEDS_REVISION/DO NOT ENABLE.

Terminal successor qualification and integration (12:17 UTC): Exact8b0/treeabbd is independently REVIEW_READY for this bounded source prerequisite. Current Routed37921898892 child113791642920 passed13,240tests/5skipped, both actual producer transaction controls and all four shared writer controls; normalized aggregate113811274758 native verdict=passed binds literal e81base/8bhead/abbdtree and compiled f5442f2 preview with the same tree. Rust-only7497/0failed/2ignored and resolved-thread readbacks remain current. Historical22de formatting/native failure remains preserved. Existing owner merged PR1831 at12:11:48Z as017dbb5081d836a8f6bf46dc95428883e75cbdd8, single parente81, exactqualifiedtreeabbd; all167/824 frozen histories and five original ordered-parent merge objects remain preserved. No ancestry rewrite was requested or performed.

Previous e81carrier runs are now terminal: Rust13,236passed/5skipped and release phases passed, then producer refused518,606Rustlines/961files/5,400guard with analysis not run; Perl matched that guard refusal after103passed. Coverage/analytics passed. BroadWindows37919221011 cancelled at90minutes: run1 nativeexit101 with observed failures; run2 status_missing/unknown exit and trustworthy-summary refusal. These are retained native verdicts, not successor017db proof. Existing writer now owns published guard-before-deep-clone PR1833 atd4522c8c/treec2a325fe/base017db; current CI37928614956 and Routed37928844223 are active. Complete route stays NEEDS_REVISION/DO NOT ENABLE; no cap increase, duplicate writer, old-task/desktop build or publication.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 9, 2026 11:06
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 9, 2026 11:08

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Current exact-source review: 8b0db37 / tree abbd455ad132584bca5ed76ac1324e85c07588fc, parent 22de. All thirteen formatting hunks match actual completed Routed formatter output. The two test preconditions now use existing REVIEW_INPUT_MAX_BYTES constants, both still 128 KiB; verified replies and resolved thread readback recorded. Production semantics, shared helper, public API record, cap/refusal behavior and writer controls are unchanged. No actionable finding. Root observed terminal intended old-code red and repair22de Rust-only green: four new boundary/growth/equivalence controls plus installed producer control passed, 7,497 unit tests passed/0 failed/2 ignored with integration/docs. Test subject641d4ff9f8e59b723ea8751cd1463e2394e12ed5 has parents e81+22de and exact22de treeb009. Those historical results do not qualify current8b. Disposition REVIEW_INCOMPLETE pending fresh formatting/compiler/tests, xtask controls and actual producer/check/review receipts on current8b. Complete route remains disabled; no full-carrier, physical-capacity or RSS claim.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

REVIEW_READY for exact8b0db371bfb0d8f0af9ade4221eeb8602b6f3806/treeabbd455ad132584bca5ed76ac1324e85c07588fc, basee81fd3adbc3d528548600f2a0fe6583f64e29977. Independent reviewer inspected the complete4file source/consumer/oracle delta and independently fetched terminal logs/current checks; no actionable source/contract/oracle findings.

Routed37921898892/job113791642920 SUCCESS:13240passed5skipped, all4helper/writer controls and both installed/xtask producer transaction controls PASS; fmt/check/clippy/recorded gates completed. Actual literal e81→8b producer→savedcheck→review→reviewcheck succeeded with contract confirmations. Normalized113811274758 verdict=passed bound to basee81, PRhead8b/treeabbd and syntheticf5442f22/treeabbd; syntheticparents e81+8b/treeexactabbd independently verified. Artifact identities/digests confirmed from metadata/logs only, archives not materialized. All36currentchecks terminal23success13skip; boththreadsresolved with verifiedreplies. Final independenthead/base read12:10:42UTC remains exact/Ready/clean.

No remaining blocker for ordinary protected integration of this leaf. Logical encoded length/admitted reservation requests is the claim; no physicalcapacity/RSS/globalValue/projection bound, complete-route activation, full-carrier or RC qualification claim.

@EffortlessSteven
EffortlessSteven merged commit 017dbb5 into sync/history-ripr-engineering-20261004 Oct 9, 2026
38 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/pr-evidence-index-growth-20261009 branch October 9, 2026 12:11
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