Skip to content

Commit e3ca597

Browse files
committed
docs: record final PR 1196 edge-case review
1 parent aab3dac commit e3ca597

2 files changed

Lines changed: 24 additions & 12 deletions

File tree

‎research/code-reviews/PR 1196 Consensus Review.md‎

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- Repository: `AltimateAI/altimate-code`
44
- Pull request: [#1196](https://github.com/AltimateAI/altimate-code/pull/1196)
55
- Review dates: 2026-08-30 through 2026-08-31
6-
- Final code candidate: `071f4dc782e70bb4a0f63397902a4285d0156903`
6+
- Final code candidate: `aab3dac85008fd9a21919741021d3be3848cefbe`
77
- Mode: full Council review plus final independent remediation pass
88
- Local verdict: **PASS**
99
- Remote gate: the final candidate must be pushed and fresh CI/bot review must finish
@@ -48,7 +48,9 @@ Post-Council review found and repaired:
4848
- provider-normalized Mistral/Devstral bridge messages missing from the estimate;
4949
- generated system prompts counted even when workflows omit them or OAuth routes them through instructions;
5050
- identical system and instruction values being deduplicated despite occupying two wire fields; and
51-
- a static bridge assertion that could match the unclamped property-access form.
51+
- a static bridge assertion that could match the unclamped property-access form;
52+
- empty base64 image data wrapped in a `URL` object escaping unsupported-media projection; and
53+
- positive sub-floor context windows being treated as placeholder metadata.
5254

5355
Each repair was centralized in the shared output-budget module or the existing pure media projection, then exercised through both request boundaries.
5456

@@ -65,45 +67,50 @@ Batching the same parser would not remove its decompression/traversal boundary.
6567

6668
## Final independent remediation review
6769

68-
Two independent live Council seats re-reviewed the request-shape correction at `c78e1a61b6`, then received the final `c78e1a61b6..071f4dc782` delta after fresh bot findings. The final delta makes the estimator more conservative and does not change PDF behavior.
70+
Two independent live Council seats re-reviewed the request-shape correction at `c78e1a61b6`, then reviewed both follow-up deltas through exact final head `aab3dac850`. The final deltas make the estimator more conservative and do not change PDF behavior.
6971

7072
### Feynman seat — PASS
7173

72-
- Verified exact final code head `071f4dc782`.
74+
- Verified exact final code head `aab3dac850`.
7375
- Confirmed `pdf-lib`, async parsing, page regex/policy, and transitive lock entries are absent.
7476
- Confirmed lazy estimation is not evaluated when `maxOutputTokens` is omitted.
7577
- Confirmed Mistral/Devstral projection matches the transport normalizer without mutating history.
7678
- Confirmed workflow/OAuth prompt routing matches the fields actually sent.
7779
- Confirmed identical system/instruction values are counted as two wire occurrences while omitted system fields remain excluded.
7880
- Confirmed the tightened bridge regex rejects `params.maxOutputTokens` and accepts the clamped shorthand.
81+
- Confirmed empty base64 images wrapped in `URL` objects become explanatory text while valid strings, byte buffers, and ordinary URLs remain unchanged.
82+
- Confirmed undefined and zero context limits bypass lazily, while every positive limit—including 1, 512, and 1,024—is enforced.
83+
- Confirmed the requested-capped floor accepts the exact 523-token boundary and rejects 522 tokens for the reproduced request.
7984
- Re-ran provider, typecheck, diff, and bridge checks successfully.
8085

8186
### Musashi seat — PASS
8287

83-
- Verified exact final code head `071f4dc782`.
88+
- Verified exact final code head `aab3dac850`.
8489
- Confirmed the parser experiment remains cleanly reverted and no PDF dependency returned.
8590
- Confirmed synchronous lazy estimation, linear Mistral projection, and parity across both callers.
8691
- Confirmed identical wire fields are counted separately while OAuth/workflow omissions are not double-counted.
8792
- Confirmed the fixed-width bridge lookbehind runs correctly under Bun.
93+
- Confirmed `URL.href` inspection matches the AI SDK URL contract without changing binary media handling.
94+
- Confirmed every positive context window is enforced while absent/non-positive contexts retain lazy bypass behavior.
8895
- Confirmed focused tests, typecheck, and diff checks pass.
8996

9097
### Degraded seat
9198

9299
The original chairman seat was rejected twice by the service safety filter because its retained conversation context included the earlier parser stress case. It produced no contrary code finding on the final head. The thread limit prevented replacing that retained seat with a new fourth thread.
93100

94-
Consensus therefore rests on two independent live PASS votes on exact final code head `071f4dc782`, the primary review, the complete changed-file inspection, and sealed zero-finding Codex Security scans. The degraded seat is disclosed rather than silently counted as agreement.
101+
Consensus therefore rests on two independent live PASS votes on exact final code head `aab3dac850`, the primary review, the complete changed-file inspection, and sealed zero-finding Codex Security scans. The degraded seat is disclosed rather than silently counted as agreement.
95102

96103
## Final verification
97104

98-
- Focused provider, AI-SDK stream, native request, and upstream bridge suites: **416 passed, 11 skipped, 1 existing todo, 0 failed**.
105+
- Focused provider, AI-SDK stream, native request, and upstream bridge suites: **417 passed, 11 skipped, 1 existing todo, 0 failed**.
99106
- Repository typecheck: **13/13 successful**.
100107
- Strict changed-file marker validation: passed.
101108
- Required-marker inventory: **35/35**.
102109
- Frozen lockfile install: **1,295 installs across 1,390 packages, no changes**.
103-
- Targeted oxlint on the final supplemental files: **161 warnings, 0 errors**; warnings are existing repository debt.
110+
- Targeted oxlint on the final supplemental files: **173 warnings, 0 errors**; warnings are existing repository debt.
104111
- Prettier: all changed files pass except `provider/provider.ts` and `provider/transform.ts`; both fail identically on `origin/main`.
105112
- `git diff --check origin/main...HEAD`: passed.
106-
- Final request-shape Codex Security scans `1dcbce9e-587e-4495-94ff-6d3291e5e1d6` and `bfa1cc4a-7d87-463d-8fc9-822e1624f8b1`: complete coverage, **0 findings**.
113+
- Final request-shape and edge-case Codex Security scans `1dcbce9e-587e-4495-94ff-6d3291e5e1d6`, `bfa1cc4a-7d87-463d-8fc9-822e1624f8b1`, and `19f139b0-8c4c-48cc-adca-a60d41920664`: complete coverage, **0 findings**.
107114

108115
## Residual limitations
109116

‎research/security-reviews/PR 1196 Security Review.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- Repository: `AltimateAI/altimate-code`
44
- Pull request: [#1196](https://github.com/AltimateAI/altimate-code/pull/1196)
55
- Review dates: 2026-08-30 through 2026-08-31
6-
- Final code candidate: `071f4dc782e70bb4a0f63397902a4285d0156903`
6+
- Final code candidate: `aab3dac85008fd9a21919741021d3be3848cefbe`
77
- Scan mode: chained immutable branch-diff reviews
88
- Final coverage: complete
99
- Findings remaining on the final candidate: **0**
@@ -33,8 +33,9 @@ The review used immutable ranges so every material repair was independently reco
3333
| Parser-free remediation | `858c7b1dab..908be9cabb` | Complete coverage; **0 findings** |
3434
| Final request-shape fixes | `5e04c7885d..c78e1a61b6` | Complete coverage; **0 findings** |
3535
| Instruction occurrence fix | `c78e1a61b6..071f4dc782` | Complete coverage; **0 findings** |
36+
| Final edge-case hardening | `a279303720..aab3dac850` | Complete coverage; **0 findings** |
3637

37-
The parser-free remediation scan was sealed once as scan `80591880-0a17-454c-b312-92c32a38f5ff`. The final request-shape scans were sealed once each as `1dcbce9e-587e-4495-94ff-6d3291e5e1d6` and `bfa1cc4a-7d87-463d-8fc9-822e1624f8b1`. Their authoritative results contain no deferred work, no open question, and zero findings.
38+
The parser-free remediation scan was sealed once as scan `80591880-0a17-454c-b312-92c32a38f5ff`. The final request-shape and edge-case scans were sealed once each as `1dcbce9e-587e-4495-94ff-6d3291e5e1d6`, `bfa1cc4a-7d87-463d-8fc9-822e1624f8b1`, and `19f139b0-8c4c-48cc-adca-a60d41920664`. Their authoritative results contain no deferred work, no open question, and zero findings.
3839

3940
## Findings discovered and resolved
4041

@@ -56,6 +57,10 @@ The experiment coupled a 100-page fallback to a 500 KB parser ceiling. A valid 6
5657

5758
The final policy removes the 100-page claim instead of replacing it with a larger parser. Exact page expansion is explicitly delegated to the provider.
5859

60+
### 4. Final boundary cases were made conservative
61+
62+
The final supplemental review found that an empty base64 image represented as a `URL` object could escape unsupported-media projection, and that positive context windows at or below 1,024 tokens were treated as placeholder metadata. The final candidate inspects `URL.href` using the same data-URL rule as strings and enforces every positive context limit. Absent and non-positive context metadata still bypasses lazily, so estimates are not evaluated when no credible limit exists.
63+
5964
## Final trust and data flow
6065

6166
Both production request paths use the same sequence:
@@ -72,7 +77,7 @@ Codebase graph tracing found exactly two production callers of the centralized c
7277

7378
## Verification
7479

75-
- Focused provider, AI-SDK stream, native request, and upstream bridge suites: **416 passed, 11 skipped, 1 existing todo, 0 failed**.
80+
- Focused provider, AI-SDK stream, native request, and upstream bridge suites: **417 passed, 11 skipped, 1 existing todo, 0 failed**.
7681
- Repository typecheck: **13/13 tasks successful**.
7782
- Strict changed-file marker validation: passed.
7883
- Required-marker inventory: **35/35**.

0 commit comments

Comments
 (0)