fix(codegraph): bound command output retention - #642
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough
Changes명령 출력 수집
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
left a comment
There was a problem hiding this comment.
Current-head review on 3427e5a66d7a0ea9379ddc7915ba2b3d1872c492: no additional valid source, DDD/owner-boundary, documentation, or regression finding. The patch keeps CodeGraph command capture shell-free and fail-closed, replaces per-chunk retention/final concatenation with a fixed maxOutputBytes buffer, rejects an unfit chunk before retaining it, preserves timeout/kill/diagnostic semantics, and updates the canonical sandbox design plus executable regression. This is COMMENT-only review, not self-approval. Merge remains contingent on all required exact-head hosted gates reaching terminal success and a fresh pre-merge head/base/thread check.
Finding
Noema's CodeGraph sandbox command wrapper caps captured stdout/stderr at 128 KiB, but protected source retained every accepted child-process
datachunk as a separateBufferand concatenated them only after close. Untrusted command output could therefore amplify retained heap/object count with highly fragmented output even while total payload bytes stayed within the byte ceiling. This is an Isolation Integration resource-bound defect inside Noema's CodeGraph reviewer boundary; it does not change quarantine/runtime ownership.RED
Test-only exact
ac1b2404b56fdeacbaa035247e7cf628ba890344executed the real bounded child-process path and required successful bounded output without a finalBuffer.concatover retained chunks. Hosted application CI run34627520581checked out that exact head, passed base/toolchain/install/typecheck, and failed atrelease tests, providing the expected RED.Repair
Production repair
32e15c10280b4eb9ff04d7719c0be670c429d306replaces per-event chunk retention with one fixedmaxOutputBytesbuffer. Each accepted stdout/stderr chunk is copied directly into the remaining bounded region; an oversize chunk is rejected and the child is killed before it is retained. Close decodes only the written subarray, so retained output memory is bounded independently of stream fragmentation while preserving event-order capture, shell-free spawn, wall-clock/output ceilings, child-kill semantics, diagnostic bounds, and environment ownership.Canonical CodeGraph sandbox design documentation was converged on the same branch to state the fixed-retention invariant and its verification requirement. A trailing-newline source hygiene finding in the touched test file was then repaired without changing test semantics. Final exact is
3427e5a66d7a0ea9379ddc7915ba2b3d1872c492.GREEN / review
On that unchanged exact, application CI
34628191004, reviewer-ci34628191052, required Security Scan34628191053, and patch-validator-image34628191114are terminal SUCCESS. Application release tests, security/KPI/license/acquisition gates passed; reviewer-ci retained its 100% line+branch/docstring gates and real no-network CodeGraph sandbox smoke; patch-validator retained exact-source/image/SBOM/vulnerability and isolation evidence. A current-head COMMENT-only review found no additional valid source, DDD/owner-boundary, documentation, or regression finding. Fresh unresolved inline threads are 0. Protectedmainremainedef24edcea85f49cdf7e81f88cb30ca84d620b80f, matching this PR's base immediately before Ready.Scope
No LLM routing, quarantine/security product authority, outbound policy, or foreign domain truth moves into Noema. This is source/isolation hardening only; it is not an immutable release, deployment, quarantine-runtime, or production-outcome claim.
Summary by CodeRabbit
성능 및 안정성
테스트