feat(trajectory): allow OPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTES override for per-event byte cap#80681
feat(trajectory): allow OPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTES override for per-event byte cap#80681wAngByg wants to merge 3 commits into
Conversation
|
Codex review: found issues before merge. Reviewed July 3, 2026, 11:45 PM ET / 03:45 UTC. Summary PR surface: Source +127, Tests +187, Docs +5. Total +319 across 7 files. Reproducibility: not applicable. this is a feature/config PR rather than a bug report. Current main still uses a fixed 256 KiB per-event cap, while the PR body supplies copied live recorder output for the proposed override. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: If maintainers sponsor the env contract, rebase onto current main and parameterize the existing preserved-field truncation helpers; otherwise keep the fixed 256 KiB cap. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature/config PR rather than a bug report. Current main still uses a fixed 256 KiB per-event cap, while the PR body supplies copied live recorder output for the proposed override. Is this the best way to solve the issue? No, not as-is. The override shape is plausible, but the best solution requires maintainer acceptance of the env contract and a rebase that preserves current usage-aware truncation semantics. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d68f877ac3e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +127, Tests +187, Docs +5. Total +319 across 7 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
51ea14e to
66e75d5
Compare
66e75d5 to
9d13c9f
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Heads up: this PR needs to be updated against current |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
f6ae71e to
8f7d4e1
Compare
b314f3c to
01c46cc
Compare
01c46cc to
635b348
Compare
635b348 to
de304e5
Compare
|
@clawsweeper re-review Rebased to current main at |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(trajectory): allow OPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTES override for per-event byte cap This is item 1/1 in the current shard. Shard 10/22. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Summary
OPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTESoverride for both trajectory writers while preserving the existing 256 KiB default.512kb,1mb, and2gb.Change Type (select all)
Scope (select all touched areas)
Real behavior proof (required for external PRs)
OPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTES.8f7d4e1a6b95c0561a83b0b71e0b6005d449ee87, using the realcreateTrajectoryRuntimeRecorderpath and a synthetic oversized payload shaped to stay under the inner sanitizer limits while exceeding the outer event-byte cap.OPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTESunset and recorded a payload with 60 fields of 5000 chars each.OPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTES=1mb.Supplemental extension trajectory validation:
Supplemental validation for the previously failing gateway CI files:
Additional local checks at the same PR head:
originalBytes=301299,limitBytes=262144, andreason=trajectory-event-size-limit. WithOPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTES=1mb, the same payload is preserved as a 301302-byte line withtruncated=falseand all 60 fields present.Security Impact (required)
NoNoNoNoNoYes-OPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTEScontrols only the per-event trajectory recording cap at recorder creation time.Repro + Verification
Environment
8f7d4e1a6b95c0561a83b0b71e0b6005d449ee87Steps
OPENCLAW_TRAJECTORY_RUNTIME_EVENT_MAX_BYTES=1mb.Expected
limitBytes=262144.Actual
Review scope clarification
The current head resolves the cap from the recorder's explicit environment at recorder creation time:
The truncate helper receives that resolved
eventMaxBytesvalue instead of rereading process-wide environment state. This keeps the override startup-scoped and aligned with the recorder's already resolved environment.