Skip to content

Commit c403108

Browse files
james-in-a-box[bot]egg-orchestratorjwbronegg-reviewer[bot]
authored
Namespace .egg-state files per-pipeline to prevent merge conflicts (#895)
* Initialize SDLC contract for issue #871 * Add refine analysis for issue #871 * Add agent-design review verdict for issue #871 refine phase * Add refine review verdict for issue #871 * Persist statefiles after refine phase * Add architect analysis for issue #871: namespace .egg-state files per-pipeline * WIP: auto-commit uncommitted work (architect) [issue-871] Container 43985389ec6a15b861158676d5595c1076f7306aa4b6048fc26c10298f8bf331 exited with uncommitted changes. This commit preserves the agent's work-in-progress. Authored-by: egg * Add implementation plan for issue #871: namespace .egg-state files per-pipeline * Add risk assessment for issue #871: namespace .egg-state files per-pipeline * WIP: auto-commit uncommitted work (task_planner) [issue-871] Container cda12d8f2ad0f1b8de10b80c7ece574aa9dc9514399433b150ee16cfa50a06c9 exited with uncommitted changes. This commit preserves the agent's work-in-progress. Authored-by: egg * WIP: auto-commit uncommitted work (risk_analyst) [issue-871] Container d09dc3dd6da2090b5045cf58fa343e548d37e2f69c563d16e966a1959dbbacd4 exited with uncommitted changes. This commit preserves the agent's work-in-progress. Authored-by: egg * Add plan review verdict for issue #871: needs_revision * Revised architect output: address plan review feedback for issue #871 * WIP: auto-commit uncommitted work (architect) [issue-871] Container 69ae9374a57d14f6288cea0f022be7439821623fd492b99e463f60eabc7dcaee exited with uncommitted changes. This commit preserves the agent's work-in-progress. Authored-by: egg * Revised plan: address reviewer feedback on wrapper layer callsites * WIP: auto-commit uncommitted work (task_planner) [issue-871] Container f140cdb5bace1d4c87c8ed24976c41ec649692560a308ddc3ae4fe79f067fbb8 exited with uncommitted changes. This commit preserves the agent's work-in-progress. Authored-by: egg * Risk assessment revision 2: identify plan draft sync gap and test scope corrections * WIP: auto-commit uncommitted work (risk_analyst) [issue-871] Container 90b2c25febc1000b81a154fdc49dca28e4d232862cb4e3f1642bbf208f62f694 exited with uncommitted changes. This commit preserves the agent's work-in-progress. Authored-by: egg * Plan review: approved (revision 2) * Persist statefiles after plan phase * Namespace .egg-state files per-pipeline to prevent merge conflicts Add issue/pipeline identifier prefix to all globally-named files in .egg-state/agent-outputs/ and .egg-state/checks/, matching the convention already used by contracts/, drafts/, and reviews/. Core changes: - shared/egg_contracts/orchestrator.py: Add optional identifier param to load_agent_output, save_agent_output, collect_handoff_data with fallback - orchestrator/handoffs.py: Forward identifier through wrapper functions - orchestrator/dispatch.py: Pass self.contract_key as identifier - orchestrator/routes/signals.py: Derive identifier from pipeline - orchestrator/routes/pipelines.py: Update prompt builders and readers to use prefixed filenames * Add tests for namespaced .egg-state file paths - test_pipeline_prompts.py: Update checker/check-and-fix result filename assertions to expect prefixed names; add TestNamespacedOutputFilenames class for agent prompt output paths; add _read_tester_gaps identifier tests for prefixed/fallback behavior - test_orchestrator.py: New test file with 9 tests for load_agent_output, save_agent_output, and collect_handoff_data with identifier parameter (prefixed path, fallback, neither-exists, priority, string identifiers) - phase-runner.sh: Derive identifier from EGG_ISSUE_NUMBER/EGG_PIPELINE_ID for namespaced implement-results.json filename * Update docs and agent mode commands for namespaced filenames Update all documentation and sandbox agent mode command files to reference {identifier}-prefixed output filenames instead of global names. Includes sdlc-pipeline.md, agent-development.md, orchestrator.md, all four agent mode command files, and the phase_output.py docstring. * Document agent-outputs namespacing and backward compat fallback * Add gap-targeting tests for namespaced .egg-state file paths * Fix remaining hardcoded tester-output.json paths and lint issues * Update implement phase check results: all passed * Persist statefiles after implement phase * Address review feedback: extract _pipeline_identifier helper - Extract repeated `issue_number if issue_number is not None else pipeline_id` pattern (11 occurrences) into a `_pipeline_identifier()` helper function to reduce divergence risk if the fallback logic changes. - Fix inconsistent truthiness check in `_synthesize_plan_draft`: the prefixed file construction used `if _synth_id` (truthiness) instead of `if _synth_id is not None`, which was inconsistent with all other identifier checks. Now that the helper always returns `int | str`, the guard is unnecessary and has been removed entirely. Authored-by: egg --------- Co-authored-by: egg-orchestrator <egg@localhost> Co-authored-by: jwbron <8340608+jwbron@users.noreply.github.com> Co-authored-by: egg-reviewer[bot] <261018737+egg-reviewer[bot]@users.noreply.github.com>
1 parent 3dd7f51 commit c403108

29 files changed

+2853
-747
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"status": "success",
3+
"tests": {
4+
"total": 6692,
5+
"passed": 6692,
6+
"failed": 0,
7+
"skipped": 85
8+
},
9+
"lint": {
10+
"status": "pass",
11+
"issues_found": 3,
12+
"issues_fixed": 3,
13+
"details": "Removed unused pytest imports from test_handoffs_namespaced.py and test_orchestrator.py; fixed import sort order in test_handoffs_namespaced.py; reformatted 5 files via ruff format"
14+
},
15+
"integration_issues": {
16+
"found": 2,
17+
"fixed": 2,
18+
"details": [
19+
{
20+
"file": "orchestrator/routes/pipelines.py",
21+
"line": 2213,
22+
"issue": "Hardcoded tester-output.json in _build_phase_prompt revision instructions not updated to use namespaced path",
23+
"fix": "Updated to use f-string with {issue_number if issue_number is not None else pipeline_id}-tester-output.json"
24+
},
25+
{
26+
"file": "orchestrator/routes/pipelines.py",
27+
"line": 2810,
28+
"issue": "Hardcoded tester-output.json in _build_phase_scoped_prompt revision checklist not updated to use namespaced path",
29+
"fix": "Updated to use f-string with {pipeline.issue_number if pipeline.issue_number is not None else pipeline_id}-tester-output.json"
30+
}
31+
]
32+
},
33+
"regressions": {
34+
"found": false,
35+
"details": "All 6692 existing tests pass. No regressions detected."
36+
},
37+
"summary": "Integration verified successfully. The coder's implementation correctly namespaces .egg-state files per-pipeline to prevent merge conflicts. Two hardcoded tester-output.json references in prompt-building functions were missed by the coder and have been fixed by the integrator. All tests pass and lint is clean after fixes.",
38+
"changes_reviewed": {
39+
"core_library": "shared/egg_contracts/orchestrator.py - load_agent_output, save_agent_output, collect_handoff_data now accept identifier parameter with backward-compat fallback",
40+
"orchestrator_handoffs": "orchestrator/handoffs.py - wrapper functions forward identifier to core library",
41+
"pipeline_routes": "orchestrator/routes/pipelines.py - all callers pass identifier derived from issue_number or pipeline_id; prompt builders reference namespaced filenames",
42+
"signals": "orchestrator/routes/signals.py - complete signal handler passes identifier when saving agent output",
43+
"docs": "docs/architecture/orchestrator.md, docs/guides/agent-development.md, docs/guides/sdlc-pipeline.md - updated to reference namespaced filenames",
44+
"agent_modes": "sandbox/.claude/commands/{coder,tester,documenter,integrator}-mode.md - updated output filename instructions",
45+
"tests": "orchestrator/tests/test_handoffs_namespaced.py (new), shared/egg_contracts/tests/test_orchestrator.py (new), orchestrator/tests/test_pipeline_prompts.py (extended) - comprehensive coverage of namespaced paths, backward compat, edge cases"
46+
},
47+
"commit": "fbf79998f",
48+
"acceptance_criteria": {
49+
"all_egg_state_files_namespaced": true,
50+
"no_globally_named_files_remain": true,
51+
"backward_compatible_reader": true,
52+
"documentation_updated": true
53+
}
54+
}

.egg-state/agent-outputs/architect-output.json

Lines changed: 459 additions & 468 deletions
Large diffs are not rendered by default.

.egg-state/agent-outputs/risk_analyst-output.json

Lines changed: 205 additions & 215 deletions
Large diffs are not rendered by default.

.egg-state/checks/implement-results.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
{
55
"name": "lint",
66
"passed": true,
7-
"output": "==> Ruff check...\nAll checks passed!\n==> Ruff format check...\n429 files already formatted\n==> Mypy...\nSuccess: no issues found in 118 source files\n==> Shellcheck...\n==> Custom checks... all passed"
7+
"output": "==> Ruff check...\nAll checks passed!\n==> Ruff format check...\n430 files already formatted\n==> Mypy...\nSuccess: no issues found in 118 source files\n==> Shellcheck...\n==> Yamllint...\nSKIP: yamllint not installed\n==> Hadolint...\nSKIP: hadolint not installed\n==> Actionlint...\nSKIP: actionlint not installed\n==> Custom checks...\n bin-symlinks...\nOK: All 2 bin/ symlinks are valid\n claude-imports...\nWarning: host-services directory not found\n container-host-boundary...\nOK: No forbidden host-services imports found in sandbox\n container-paths...\nOK: No problematic sys.path patterns found\n docker-and-claude-invocations...\nOK: No docker/claude invocation violations found\n gh-cli-usage...\nWarning: host-services directory not found\n hardcoded-ports...\nOK: No hardcoded port numbers found\n llm-api-calls...\nOK: No direct LLM API usage found outside sandbox\n model-versions...\nOK: No non-alias Claude model references found\n reviewer-job-names...\nOK: All reviewer jobs use the required naming prefix\n workflow-secrets...\nOK: No untrusted script execution with secrets found in workflows"
88
},
99
{
1010
"name": "test",
1111
"passed": true,
12-
"output": "=========== 6685 passed, 85 skipped, 4 warnings in 73.80s (0:01:13) ============\n\nFixed: 2 docker_client test failures caused by sys.modules mock pollution from test_checkpoint_discovery.py. Added early docker import in orchestrator/tests/conftest.py to ensure real docker module is in sys.modules before test collection."
12+
"output": "==> Running unit tests...\npytest tests/ gateway/tests/ orchestrator/tests/ -v\n6692 passed, 85 skipped, 4 warnings in 73.24s (0:01:13)"
1313
},
1414
{
1515
"name": "security",

0 commit comments

Comments
 (0)