Repository navigation
fix: validate midnight deltas following native compaction - #884
Conversation
miuuyy
left a comment
There was a problem hiding this comment.
Thanks — I reproduced #883 on released 6.1.13, and this patch fixes it. There is one validation gap to close before merging: two full environment content parts in the same rebuilt message, followed by a valid midnight delta, are accepted. The later full claim is skipped because the calendar scan starts after the whole message.
In the new v1/v2 regression, append another environment content part to current.content with a different cwd, before calling store.resolve(request). Both variants currently accept it. Please require exactly one environment part in the rebuilt base message and add this rejection test. I checked that rejecting additional claims at first.index fixes this while preserving the reported midnight case.
|
Addressed in b3040fc. Both v1/v2 regressions reproduced your reported acceptance before the correction. The parser now rejects any additional environment part at the rebuilt base message index before scanning later calendar fragments. The tests cover both a conflicting full claim and an identical duplicate in the same Validation on the exact PR branch: all 124 environment tests pass (one Windows-only skip); full |
miuuyy
left a comment
There was a problem hiding this comment.
The duplicate-part regression is fixed. I reproduced the original failure and verified the valid continuation and rejection cases. Thanks for the follow-up.
Fixes #883.
A native compaction continuation can contain a rebuilt full environment preamble followed by a same-turn, date-only midnight update. Both XML parts are counted as complete grants, so
extractChatGptContinuationEnvironmentClaimrejects the request before the current native rollout can validate it.Accept one rebuilt full environment followed by strictly parsed calendar fragments. Carry those fragments into the existing current-rollout root and complete filesystem-profile checks. A second full environment, changed roots/profile, malformed fields, stale/missing rollout, or incompatible network policy still fails closed. This changes no browser ownership, completion, tool approval, model, or retry behavior.
Validation:
bun run verifyon this three-file change: 1,031 core tests pass (89 skips), 422 launcher tests pass (one skip), audits/typechecks and relocatable runtime smoke pass. Linux x64 packaged-launch smoke passed using an isolated application/Codex home on the existing X11 display. macOS/Windows were not tested locally.This PR addresses only the environment-validation failure. Live supervision also found separate intermittent Web empty-final and detached-response binding failures; those are not claimed fixed by this patch. Local diagnostic instrumentation used for that separate investigation and local package-version stamps are excluded from this PR.