Skip to content

Extract project operation trajectory redaction - #1395

Merged
zhaozhaozz merged 1 commit into
agent-CI-Infra:mainfrom
zhaozhaozz:refactor/manager-trajectory-redaction-543
Nov 26, 2026
Merged

zhaozhaozz merged 1 commit into
agent-CI-Infra:mainfrom
zhaozhaozz:refactor/manager-trajectory-redaction-543

Conversation

@zhaozhaozz

Copy link
Copy Markdown
Collaborator

Summary

  • Move project operation trajectory redaction into manager/trajectory-redaction.mjs.
  • Preserve both exports from manager/projects.mjs, the input and result call sites, and the stored payload behavior.
  • Document the module in the storage design.

Verification

  • The extracted code matches the original function bodies byte for byte. All 16 existing runtime exports and both redaction re-export bindings were checked.
  • The old and new modules produced identical output for 73 inputs and 126 result cases, including gateway input redaction and the current pass-through behavior of the retired request operations.
  • Loaded all seven Manager entry modules from the file layout copied by the Manager Dockerfile. Both the root and runner dependency installs passed, and the installed runner Pi CLI reported version 1.4.0.
  • npm run check passed TypeScript and syntax checks (851 JavaScript files). docker compose config --quiet passed for docker/compose.yaml, the same file with docker/compose.build.yaml, and standalone docker/compose.node.yaml.
  • Trial-merged all 12 other open PR heads into both 21816080 and 879f7061. Three merged cleanly and preserved the exact refactor patch. The other nine produced identical conflict entries on both commits. None touched the three paths in this change.
  • On 879f70614189f56face1228b676ff8c4bdffc996, BOT_REQUIRE_PI=1 npm test -- --jobs 1 passed all 351 test sets and all 2,844 tests (exit 0, zero skipped or cancelled). This includes all 10 Manager trajectory tests and all 68 Codex Harness tests.

Refs #543

@agent-ci-infra-bot

Copy link
Copy Markdown
Contributor

Reviewed 879f70614189f56face1228b676ff8c4bdffc996 against 21816080d49c42cb9ad0cd955ffe0b544f849485 (3 files, +27/−24).

Result: clean — no actionable defects found.

What I verified independently:

  • The moved sanitizeTrajectoryInput, sanitizeTrajectoryResult, and private sanitizeTrajectoryValue bodies in manager/trajectory-redaction.mjs match the removed code in manager/projects.mjs; call sites at manager/projects.mjs:1632 and manager/projects.mjs:1762 still use the same functions, and both original exports are preserved via the new static re-export at manager/projects.mjs:24.
  • The new module imports ../runner/image-budget.mjs, which docker/manager.Dockerfile already copies; the Manager image check also passed on this head.
  • node --input-type=module -e "await import('./manager/projects.mjs')" succeeds and exposes both re-exported functions; node scripts/check-runtime.mjs passed all 851 JavaScript files.
  • Existing regression coverage still exercises the moved code through the preserved manager/projects.mjs re-exports (test/ut/runner/image-budget.test.mjs and test/ut/src/projects/private-runner-config.test.mjs); the directly runnable image-budget suite passed 7/7.
  • Head CI shows green unit shards (including 1,409 tests in shard 2), e2e, image builds, Compose config, and CodeQL. The doc update is in the design dimension and accurately points to the new module.

No behavior, security, concurrency, or API-compatibility regression was found. No new test is required for this behavior-preserving extraction because the existing tests cover the sanitizers through the retained public exports.

Reviewed commit: 879f706
Coverage: PR #1395; 3 changed file(s)

@zhaozhaozz
zhaozhaozz added this pull request to the merge queue Nov 26, 2026
@zhaozhaozz

Copy link
Copy Markdown
Collaborator Author

Reviewed 879f70614189f56face1228b676ff8c4bdffc996 against 21816080d49c42cb9ad0cd955ffe0b544f849485 (3 files, +27/−24). No blocking findings, so this head has been enqueued in the merge queue.

What was verified independently:

  • The moved RUN_TOKEN_PATTERN, sanitizeTrajectoryValue, sanitizeTrajectoryInput and sanitizeTrajectoryResult bodies match the removed code verbatim; the call sites in manager/projects.mjs (tool_call append and tool_result append) still use the same functions, and both original exports are preserved through the new re-export in manager/projects.mjs.
  • The new module only depends on runner/image-budget.mjs (which has no imports, so no cycle); docker/manager.Dockerfile copies the whole manager/ directory and its import smoke test loads manager/projects.mjs, so the new file is part of the Manager image. The control plane never imports manager/projects.mjs, so docker/control-plane.Dockerfile needs no COPY change.
  • No duplicated redaction implementation is left behind, and the removed sanitizeAgentPollTrajectory import has no remaining user in manager/projects.mjs.
  • Existing coverage still exercises the moved code through the retained exports (test/ut/runner/image-budget.test.mjs, test/ut/src/projects/private-runner-config.test.mjs); a behavior-preserving extraction needs no new test.
  • Required checks on this head are green: unit (both shards), e2e, the four image builds, and CodeQL; the documentation change is in the design dimension only, which is correct for a change without external behavior.

Reviewed head: 879f706

Merged via the queue into agent-CI-Infra:main with commit 65724a6 Nov 26, 2026
12 checks passed
@zhaozhaozz
zhaozhaozz deleted the refactor/manager-trajectory-redaction-543 branch November 26, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant