Skip to content

Phase 6: Release preparation - #7

Closed
james-in-a-box[bot] wants to merge 1 commit into
jib/phase-4-clifrom
jib/phase-6-readme-polish
Closed

Phase 6: Release preparation#7
james-in-a-box[bot] wants to merge 1 commit into
jib/phase-4-clifrom
jib/phase-6-readme-polish

Conversation

@james-in-a-box

@james-in-a-box james-in-a-box Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 6 of the egg extraction: prepare for initial release.

Changes

CHANGELOG.md:

  • Document all features from phases 1-5
  • Group by phase for clear progression
  • Follow Keep a Changelog format

pyproject.toml:

  • Rename package to egg-sandbox (PyPI namespace)
  • Add keywords for discoverability
  • Add PyPI classifiers
  • Mark as Alpha development status

Validation Plan

# 1. Checkout the branch (after merging PR #6)
git fetch origin
git checkout jib/phase-6-readme-polish

# 2. Verify CHANGELOG has all phases documented
grep -E "^- \*\*.*Phase [0-9]" CHANGELOG.md
# Expected: Lines for Phase 1, 1.5, 2, 3, 4

# 3. Verify package name in pyproject.toml
grep "^name = " pyproject.toml
# Expected: name = "egg-sandbox"

# 4. Verify classifiers are present
grep -A 15 "classifiers = \[" pyproject.toml
# Expected: Development Status, Environment, License, OS, Programming Language, etc.

# 5. Verify keywords are present
grep "keywords = " pyproject.toml
# Expected: sandbox, llm, security, docker, claude, ai, code-execution

# 6. Test package builds correctly
uv build
# Expected: Creates dist/egg_sandbox-0.1.0.tar.gz and .whl

# 7. Run linting
./dev native lint
# Expected: All checks passed

# 8. Run tests
./dev native test
# Expected: 4 tests pass

# 9. Cleanup build artifacts
rm -rf dist/

Authored-by: jib

- Update CHANGELOG with comprehensive feature list from phases 1-4
- Rename package to egg-sandbox for PyPI (egg is likely taken)
- Add PyPI classifiers and keywords for discoverability
- Add topic categories (Security, Code Generators)

Authored-by: jib
@james-in-a-box james-in-a-box Bot changed the title Phase 6: Polish CHANGELOG and package metadata Phase 6: Release preparation Feb 2, 2026
@jwbron jwbron closed this Feb 4, 2026
james-in-a-box Bot added a commit that referenced this pull request Feb 11, 2026
- Include truncated raw_partial_input in tool_use blocks when JSON parsing
  fails, for debugging incomplete streaming responses (re-review issue #1)
- Add docstring notes documenting:
  - Tool result matching order-dependency (original issue #5)
  - Force push checkpoint behavior (original issue #7)
  - Shared transcript for multi-commit pushes (original issue #8)
  - container_id fallback from filename (original issue #12)
- Fix import sorting in gateway.py (ruff auto-fix)

Authored-by: egg
jwbron pushed a commit that referenced this pull request Feb 11, 2026
…pt capture (#517)

* Initialize SDLC contract for issue #509

* Draft analysis for issue #509: checkpoint migration

* Update refine review state (cycle 1)

* Approve and advance to plan phase for issue #509

* Draft plan for issue #509: per-commit checkpoints and API proxy capture

* Update plan review state (cycle 1)

* Approve and advance to implement phase for issue #509

* Populate contract tasks from plan for issue #509

* Implement per-commit checkpoint granularity (Phase 1)

Add support for creating one checkpoint per commit instead of one per push:

- Add get_commits_in_push() helper to enumerate commits between old/new SHAs
- Add capture_and_store_checkpoints_for_push() for multi-commit checkpoint creation
- Modify gateway push handler to get remote ref before push and iterate commits
- Each checkpoint now has push_sha pointing to the tip commit for traceability
- Graceful fallback: if rev-list fails, creates single checkpoint for tip commit

This is Phase 1 of issue #509 (per-commit checkpoints + API proxy capture).
Transcript source is still Claude Code JSONL (to be migrated in Phase 3).

Authored-by: egg

* Implement API proxy transcript capture (Phase 2)

Add instrumentation to the Anthropic API proxy to capture request/response
pairs for checkpoint creation:

- New TranscriptBuffer class manages per-session buffer files in /tmp/egg-transcripts/
- Fixed 10MB buffer rotation drops oldest entries when size limit exceeded
- Non-streaming responses captured with full content and usage
- Streaming SSE responses reassembled to extract content blocks
- Buffer entry schema documented with timestamps, model, messages, tools, usage
- Thread-safe file writes with file locking
- Global buffer cache for efficient access by container ID

This is Phase 2 of issue #509 (per-commit checkpoints + API proxy capture).
Phase 3 will migrate checkpoint extraction to use this buffer instead of
Claude Code JSONL files.

Authored-by: egg

* Migrate transcript source to API proxy buffer (Phase 3)

Replace Claude Code JSONL extraction with API proxy buffer reading:

- Add extract_transcript_from_proxy_buffer() and related extraction functions
- Update CheckpointHandler.capture_checkpoint() to use proxy buffer instead of JSONL
- Remove CLAUDE_PROJECTS_DIR constant (no longer needed)
- Maintain same return types for backward compatibility

The proxy buffer provides a stable API-based source for transcripts,
eliminating dependency on Claude Code's internal file format which
can change without notice.

This is Phase 3 of issue #509. Phase 4 will clean up deprecated JSONL code
and add buffer cleanup on session end.

Authored-by: egg

* Cleanup and documentation for proxy buffer architecture (Phase 4)

- Remove all Claude Code JSONL-specific code from transcript_extractor.py
  (file now only contains proxy buffer extraction functions)
- Add buffer cleanup on session end in session_manager.py
- Update CLI help text to describe per-commit checkpoint behavior
- Add architecture documentation in checkpoint_handler.py explaining
  the transcript flow from API proxy to checkpoint storage

Authored-by: egg

* Update autofix attempts for issue #509

* Address review feedback on PR #517 transcript capture

Fixes critical and correctness issues raised in review:

1. Race condition in buffer rotation (Critical #1):
   - Use exclusive file lock during entire rotation operation
   - Write to temp file then atomically replace with os.replace()
   - Clean up temp file on error

2. Memory accumulation for streaming (Critical #2):
   - Cap collected chunks at 10MB to prevent resource exhaustion
   - Log when capture is truncated due to size limit

3. Missing error handling for failed API responses (Critical #3):
   - Capture 4xx/5xx responses with status code and error message
   - Pass status_code to capture function for proper handling

4. Missing input_tokens from message_start (Correctness #4):
   - Extract input_tokens, cache_read_input_tokens from message_start
   - message_delta only contains output_tokens per SSE spec

5. Error events not handled in SSE parsing (Correctness #4):
   - Handle 'error' event type and capture as error content block
   - Add input_parse_error flag when tool_use JSON fails to parse

6. Unsafe path construction (Correctness #6):
   - Validate container_id against path traversal characters
   - Verify resolved path is within buffer directory

Minor fixes:
- Move `import time` to module level (Minor #10)
- Set buffer directory permissions to 0o700 (Minor #11)

Authored-by: egg

* Address re-review feedback: add raw_partial_input and doc comments

- Include truncated raw_partial_input in tool_use blocks when JSON parsing
  fails, for debugging incomplete streaming responses (re-review issue #1)
- Add docstring notes documenting:
  - Tool result matching order-dependency (original issue #5)
  - Force push checkpoint behavior (original issue #7)
  - Shared transcript for multi-commit pushes (original issue #8)
  - container_id fallback from filename (original issue #12)
- Fix import sorting in gateway.py (ruff auto-fix)

Authored-by: egg

* Address minor review observations: add constant and logging

- Add RAW_INPUT_TRUNCATE_SIZE constant for the 1000 char truncation
  threshold used when preserving raw tool input on parse failure
- Add warning log in transcript_extractor when extracting tool calls
  with input_parse_error flag, surfacing streaming parse failures
  during checkpoint extraction

Authored-by: egg

* Add test coverage for input_parse_error handling path

Adds tests for the input_parse_error and raw_partial_input handling
that was added for incomplete streaming JSON responses. This addresses
the non-blocking observation from the PR review to ensure the
defensive code path is documented through tests and protected from
regressions.

- TestParseSSEResponse: Tests that incomplete tool_use JSON sets
  input_parse_error flag and preserves truncated raw_partial_input
- TestExtractToolCallsFromProxyBuffer: Tests that extraction logs
  a warning when input_parse_error is present and truncates the
  raw input preview appropriately

Authored-by: egg

---------

Co-authored-by: james-in-a-box[bot] <2365503+james-in-a-box[bot]@users.noreply.github.com>
Co-authored-by: james-in-a-box[bot] <246424927+james-in-a-box[bot]@users.noreply.github.com>
james-in-a-box Bot added a commit that referenced this pull request Feb 12, 2026
Critical fix (AC-28):
- Refactor run_interactive() and run_exec() to use subprocess.run()
  instead of os.execvpe() so entrypoint regains control after process
  exit and can signal completion to orchestrator

Code quality fixes:
- Use OrchestratorClient in entrypoint instead of raw urllib (#2)
- Add thread-safe singleton pattern with double-checked locking (#3)
- Add progress_percent validation (0-100) to ProgressData (#4)
- Standardize health check timeout to 5s, signal ops to 10s (#5)
- Preserve response body before JSON parsing in error handling (#7)
- Add warning log when using fallback constants (#9)
- Move ENV_AGENT_ROLE import to module level in detection.py (#10)
- Fix docstring mismatch in gateway _check_orchestrator_connectivity (#11)
- Export get_orchestrator_client from package __init__.py

Authored-by: egg
jwbron added a commit that referenced this pull request Feb 12, 2026
#556)

* Initialize SDLC contract for issue #544

* Draft analysis for issue #544

Analyze the five remaining orchestrator integration items:
- AC-24: Gateway health reports orchestrator connectivity
- AC-27: Typed sandbox-to-orchestrator API client
- AC-28: Sandbox orchestrator mode detection and completion reporting
- AC-29: shared/egg_orchestrator/ shared package
- AC-33: Orchestrator architecture documentation

Recommends hybrid approach following existing patterns.
Includes HITL decisions for completion signaling method and
shared types scope.

Authored-by: egg

* Update refine review state (cycle 1)

* Approve and advance to plan phase for issue #544

* Draft plan for issue #544: orchestrator integration items

* Update plan review state (cycle 1)

* Approve and advance to implement phase for issue #544

* Populate contract tasks from plan for issue #544

* Add shared/egg_orchestrator/ package (AC-29)

Create shared package for orchestrator types and utilities used by both
gateway and sandbox containers. This provides:

- OrchestratorClient: Typed client for sandbox-to-orchestrator communication
- Orchestrator mode detection utilities (is_orchestrator_mode)
- Deployment mode enum (LOCAL, REMOTE_SINGLE, DISTRIBUTED)
- Signal types for completion reporting (complete, progress, error, heartbeat)
- Constants and configuration for orchestrator connectivity

The package is designed to be imported by both containers without creating
circular dependencies. It uses only standard library for HTTP communication
to avoid adding dependencies.

Authored-by: egg

* Add orchestrator connectivity to gateway health endpoint (AC-24)

The /api/v1/health endpoint now reports orchestrator connectivity status
when an orchestrator URL is configured via EGG_ORCHESTRATOR_URL. The
response includes:

- orchestrator.configured: Whether orchestrator URL is set
- orchestrator.reachable: Whether the orchestrator responded to health check
- orchestrator.status: Orchestrator health status if reachable
- orchestrator.error: Error message if unreachable

This enables monitoring tools to verify the full gateway-orchestrator
communication path during distributed deployments.

Authored-by: egg

* Add sandbox orchestrator mode detection and completion reporting (AC-28)

The sandbox entrypoint now detects when running in orchestrator mode
(vs interactive/local) and signals completion/error back to the
orchestrator on container exit. Detection is based on:

- EGG_ORCHESTRATOR_MODE environment variable (explicit)
- EGG_PIPELINE_ID environment variable (implicit)
- EGG_ORCHESTRATOR_URL environment variable (implicit)

On exit, the sandbox sends a signal to the orchestrator's signal API:
- "complete" signal for successful exit (exit code 0)
- "error" signal for failed exit with error message

This enables the orchestrator to track sandbox lifecycle without polling
container status, and to coordinate multi-agent workflows.

Authored-by: egg

* Add orchestrator architecture documentation (AC-33)

Document the three deployment modes and how components interact:

1. Local mode: Interactive sandbox with gateway sidecar
2. Remote-single mode: Orchestrator spawns single managed sandbox
3. Distributed mode: Orchestrator coordinates multiple agent sandboxes

Includes:
- Network architecture diagrams (ASCII)
- Component interaction details
- Signal flow for sandbox lifecycle
- Environment variable reference
- Shared package documentation

Also updates architecture README to reference the new orchestrator doc
and adds egg_orchestrator to the components table.

Authored-by: egg

* Update autofix attempts for issue #544

* Address review feedback on orchestrator integration PR

Critical fix (AC-28):
- Refactor run_interactive() and run_exec() to use subprocess.run()
  instead of os.execvpe() so entrypoint regains control after process
  exit and can signal completion to orchestrator

Code quality fixes:
- Use OrchestratorClient in entrypoint instead of raw urllib (#2)
- Add thread-safe singleton pattern with double-checked locking (#3)
- Add progress_percent validation (0-100) to ProgressData (#4)
- Standardize health check timeout to 5s, signal ops to 10s (#5)
- Preserve response body before JSON parsing in error handling (#7)
- Add warning log when using fallback constants (#9)
- Move ENV_AGENT_ROLE import to module level in detection.py (#10)
- Fix docstring mismatch in gateway _check_orchestrator_connectivity (#11)
- Export get_orchestrator_client from package __init__.py

Authored-by: egg

* Address review feedback on orchestrator integration PR

Key changes addressing reviewer feedback:

1. Signal handler logic (#5): Track subprocess completion state to report
   correct exit codes. If SIGTERM arrives before subprocess completes,
   report interrupted status (128+signum) instead of always success (0).

2. TTY handling (#4): Add explicit stdin/stdout/stderr to subprocess.run()
   calls to ensure consistent terminal behavior after the switch from
   os.execvpe() to subprocess.run().

3. Security: Unknown phase fail-closed (#1): Change phase_filter to block
   files for unknown phases instead of allowing by default. This prevents
   bypass via invalid phase strings.

4. Security: Path escape validation (#2): Add validation in _normalize_path
   to block paths that escape the repository (e.g., ../../../etc/passwd).

5. py.typed marker file (#1): Add empty py.typed file for PEP 561 type
   checking support in egg_orchestrator package.

6. Test coverage: Add comprehensive tests for:
   - egg_orchestrator types, client, detection
   - Entrypoint orchestrator mode and subprocess handling
   - Gateway health orchestrator connectivity
   - Phase filter unknown phase blocking and path escape validation

Authored-by: egg

* Address contract verification feedback for AC-22, AC-23, AC-25, AC-13, AC-20

Fix acceptance criteria verification issues:
- AC-22: Change orchestrator health check timeout from 5s to 2s as specified
- AC-23: Include URL field in orchestrator health response when configured
- AC-25: Add test for orchestrator unreachable case (connection failure)
- AC-13: Add HTTP response tests for signal methods with mocked responses
- AC-20: Add tests verifying signals are sent on normal exit and error exit

Authored-by: egg

* Add url field verification to orchestrator health test

The test_health_check_orchestrator_reachable test was mocking
_check_orchestrator_connectivity without including the url field
that the actual implementation returns. Updated the mock and
added an assertion to verify the url field is present.

Authored-by: egg

---------

Co-authored-by: james-in-a-box[bot] <2365503+james-in-a-box[bot]@users.noreply.github.com>
Co-authored-by: james-in-a-box[bot] <246424927+james-in-a-box[bot]@users.noreply.github.com>
Co-authored-by: jwbron <8340608+jwbron@users.noreply.github.com>
james-in-a-box Bot pushed a commit that referenced this pull request Feb 13, 2026
…add tests

- Extract validate_checks() helper in repo_config.py to centralize check
  validation logic (fixes #2/#3: duplicated validation, dead code)
- Add validation of deserialized EGG_REPO_CHECKS in orchestrator to prevent
  KeyError on malformed data (fixes #1: missing env var validation)
- Use validate_checks() from compose.py instead of inline duplication
- Remove leading underscores from local variables in pipelines.py (fixes #5)
- Add tests for _build_checker_prompt and _build_autofix_prompt with
  repo_checks parameter (fixes #6: missing prompt builder tests)
- Remove redundant sys.path manipulation from test file (fixes #7)
jwbron added a commit that referenced this pull request Feb 13, 2026
* Add per-repo check commands for multi-repo SDLC pipeline

* Address review feedback: validate env var checks, deduplicate logic, add tests

- Extract validate_checks() helper in repo_config.py to centralize check
  validation logic (fixes #2/#3: duplicated validation, dead code)
- Add validation of deserialized EGG_REPO_CHECKS in orchestrator to prevent
  KeyError on malformed data (fixes #1: missing env var validation)
- Use validate_checks() from compose.py instead of inline duplication
- Remove leading underscores from local variables in pipelines.py (fixes #5)
- Add tests for _build_checker_prompt and _build_autofix_prompt with
  repo_checks parameter (fixes #6: missing prompt builder tests)
- Remove redundant sys.path manipulation from test file (fixes #7)

* Centralize validate_checks in shared/egg_config/validators

Move validate_checks() to shared/egg_config/validators.py as the
single canonical definition. The orchestrator, config, and compose
modules all import from this shared location, eliminating the
duplicated inline validation logic flagged in review.

Authored-by: egg

* Separate validate_checks import into its own try/except block

The validate_checks import was bundled into the same try/except as
the network constants (ORCHESTRATOR_*_IP, ORCHESTRATOR_PORT). If
egg_config.validators failed to import while egg_config constants
succeeded, the except block would overwrite the real constants with
hardcoded fallbacks. Use separate try/except blocks so each import
has an independent fallback, matching the pattern in repo_config.py.

* Add per-repo check commands to setup flow

* Gate repo checks config behind top-level prompt; add integration test

---------

Co-authored-by: egg <egg@localhost>
Co-authored-by: egg-reviewer[bot] <261018737+egg-reviewer[bot]@users.noreply.github.com>
Co-authored-by: jwbron <8340608+jwbron@users.noreply.github.com>
james-in-a-box Bot pushed a commit that referenced this pull request May 30, 2026
Six fixes addressing review:
- #1 (blocker): gate context PR opener on `not force` in advance_phase
  so force=True can unstick a sick gateway; convergence still happens
  via the four runner-side backstops once the gateway recovers.
- #2 (blocker): add minimum-viable unit tests for the new opener,
  persistence helper, and validator (29 new tests across
  test_open_context_pr_at_implement_start.py and the
  TestValidatePlanPreflight class).
- #3 (non-blocking): replace "transactional" overclaim in
  _persist_context_pr_number docstring with an explicit persistence-
  surface section explaining the disk-only-pending-runner-commit
  semantics and the four-backstop convergence path.
- #4 (non-blocking): catch ValueError from the
  ContextPrCreationReason coercion in ContextPrCreationError.__init__
  and coerce to UNKNOWN with a loud logger warning, so a typo
  surfaces as a typed 422 rather than a 500.
- #5 (non-blocking): mark _resolve_slice_base_branch as consumed by
  slice-2 TASK-2-1 in its docstring.
- #6 (non-blocking): add explicit "Deleted in slice-2 TASK-2-1"
  tombstones to the two legacy wrappers
  (_persist_context_pr_linkage_on_contract,
  _maybe_open_base_pr_for_plan_to_implement) so the unreferenced
  scaffold is grep-able for the slice-2 follow-up.

Items #7-9 disposed in PR comment (disagree, with reasoning).
james-in-a-box Bot pushed a commit that referenced this pull request Jun 11, 2026
- contract_completeness.py: switch from stdlib logging to egg_logging.get_logger
  for structured-log enrichment consistency (egg-reviewer #8).
- signals.py: defensive non-dict attestation handling and isinstance guard on
  tasks_verified list (egg-reviewer #1); structured details on no-op propose
  rejection (egg-reviewer #3); explicit warn-and-skip on empty producer_role
  rather than silently degrading the attestation check (egg-reviewer #5);
  comment documenting the CONFIRM-gate carve-out in the message-bus fallback
  path (egg-reviewer #4).
- sandbox brc handler + schema: drop the dead NACK attestation thread (the
  gate only reads it on ACK); unwrap the new 400 contract_incomplete on no-op
  propose so brc_propose surfaces structured rejection data instead of
  raising (egg-reviewer #2, #3).
- validator.py: expand docstring to call out that the demote-only check is
  broader than just the enforcer — every reviewer role has task-status write
  capability, so restricting to the enforcer alone would leave side channels
  (egg-reviewer #6).
- test_contract_completeness_gate.py: cover the kill switch for confirm and
  noop_propose, end-to-end slice_id=None integration, and non-dict
  attestation robustness; tighten producer_role empty-string assertion
  (egg-reviewer #7).
- test_brc_attestation.py: update NACK test for dropped attestation thread;
  add propose-400 contract_incomplete unwrap test.
jwbron added a commit that referenced this pull request Jun 11, 2026
…on incomplete task rows, attestation channel revived (#3119)

* Fix #3114: contract-completeness gate on enforcer ACK/CONFIRM + attestation threading

- orchestrator/contract_completeness.py: pure completeness checks, kill switch
- routes/signals.py: reject enforcer ACK (contract_incomplete / attestation_required /
  attestation_mismatch), enforcer CONFIRM, and no-op propose with open owned rows
- review_graph.py: reviewer_contract CRITICAL edges to tester + documenter
- sandbox brc tools/handlers: attestation param threaded; structured 409 surfacing
- validator.py: reviewer task-status writes demote-only
- preamble/criteria/docs updates

* test: align suites with #3114 gate semantics

- test_peer_consensus_integration: enforcer ACKs for tester/documenter (new critical edges)
- test_validator: reviewer demote-only (promote-to-complete now rejected)
- preamble: tighten #3114 producer guidance; soften collapse drop ratio 0.18→0.13
  on the #3027 precedent (load-bearing gate guidance re-raised producer preamble size)

* Fix mypy: add return type annotation to test method

* Address PR review feedback (#3119)

- contract_completeness.py: switch from stdlib logging to egg_logging.get_logger
  for structured-log enrichment consistency (egg-reviewer #8).
- signals.py: defensive non-dict attestation handling and isinstance guard on
  tasks_verified list (egg-reviewer #1); structured details on no-op propose
  rejection (egg-reviewer #3); explicit warn-and-skip on empty producer_role
  rather than silently degrading the attestation check (egg-reviewer #5);
  comment documenting the CONFIRM-gate carve-out in the message-bus fallback
  path (egg-reviewer #4).
- sandbox brc handler + schema: drop the dead NACK attestation thread (the
  gate only reads it on ACK); unwrap the new 400 contract_incomplete on no-op
  propose so brc_propose surfaces structured rejection data instead of
  raising (egg-reviewer #2, #3).
- validator.py: expand docstring to call out that the demote-only check is
  broader than just the enforcer — every reviewer role has task-status write
  capability, so restricting to the enforcer alone would leave side channels
  (egg-reviewer #6).
- test_contract_completeness_gate.py: cover the kill switch for confirm and
  noop_propose, end-to-end slice_id=None integration, and non-dict
  attestation robustness; tighten producer_role empty-string assertion
  (egg-reviewer #7).
- test_brc_attestation.py: update NACK test for dropped attestation thread;
  add propose-400 contract_incomplete unwrap test.

* Fix flaky capsys assertion in contract-completeness gate test

The empty-producer_role test asserted against capsys.readouterr().err,
but EggLogger lazily attaches StreamHandler(sys.stderr) on first log call
and the handler captures a stale reference to the original sys.stderr.
capsys replaces sys.stderr at the Python level, which the handler
bypasses — capfd captures at the fd level and sees the write.

* Fix test: use caplog handler attached directly to non-propagating logger

The empty-producer_role test could not reliably observe the warning
emitted by EggLogger ("orchestrator.signals"): propagation is
disabled, so caplog's root attachment misses it; the StreamHandler
holds a stream reference captured at lazy-init time, which defeats
both capsys and capfd. Attach caplog.handler directly to the
underlying Python logger so the record is captured regardless of
propagation or stream-reference timing.

* Fix ruff formatting in test_contract_completeness_gate.py

* Address PR #3119 review: drop dead logger fallback; tighten NACK drop test

- contract_completeness.py: remove the stdlib logging fallback for
  egg_logging.get_logger. The fallback returned a stdlib Logger that
  would have raised TypeError on the structured kwargs every call site
  passes (identifier=..., error=...) — the path was marked no-cover
  and egg_logging is in-tree, so a runtime trip would have inverted
  the gate's fail-open posture into a 500. Drop it; egg_logging is
  always present.

- test_brc_attestation.py: rename test_nack_payload_excludes_attestation
  to test_nack_drops_supplied_attestation and pass attestation=_ATTESTATION
  in the request so the assertion actually exercises the drop. The
  prior version asserted absence in a request that never carried the
  field — would have passed even if brc_nack started forwarding it.

---------

Co-authored-by: egg-reviewer[bot] <261018737+egg-reviewer[bot]@users.noreply.github.com>
Co-authored-by: james-in-a-box[bot] <246424927+james-in-a-box[bot]@users.noreply.github.com>
james-in-a-box Bot pushed a commit that referenced this pull request Jun 26, 2026
…tion

19 independent per-file decomposition slices (one phase == one slice ==
one PR), ordered easiest->hardest with the structural outliers
(gateway.py, pipelines.py) last. _run_pipeline split addressed head-on
(non-negotiable #7); no descope. Allowlist driven to empty cumulatively.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
james-in-a-box Bot pushed a commit that referenced this pull request Jun 26, 2026
19 independent per-file decomposition slices (one slice = one file = one
PR), ordered easiest->hardest with structural outliers gateway.py and
pipelines.py last but fully in scope. _run_pipeline split head-on
(non-negotiable #7); allowlist driven to empty cumulatively. yaml-tasks:
19 phases / 97 tasks, AC-1..AC-7.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
james-in-a-box Bot pushed a commit that referenced this pull request Jun 26, 2026
Per-file sub-package seam designs for all 19 allowlisted files, with the
two outliers addressed head-on: gateway/gateway.py (10k, 46 routes) and
orchestrator/routes/pipelines.py (27k), whose _run_pipeline state machine
decomposes into a thin orchestration loop + per-phase handlers + extracted
consensus-cycle and HITL-gate (non-negotiable #7). Recommended 19-slice,
file-disjoint DAG; outliers as PR stacks at the tail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
james-in-a-box Bot pushed a commit that referenced this pull request Jun 27, 2026
…tion

19 independent per-file decomposition slices (one phase == one slice ==
one PR), ordered easiest->hardest with the structural outliers
(gateway.py, pipelines.py) last. _run_pipeline split addressed head-on
(non-negotiable #7); no descope. Allowlist driven to empty cumulatively.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
james-in-a-box Bot pushed a commit that referenced this pull request Jun 27, 2026
19 independent per-file decomposition slices (one slice = one file = one
PR), ordered easiest->hardest with structural outliers gateway.py and
pipelines.py last but fully in scope. _run_pipeline split head-on
(non-negotiable #7); allowlist driven to empty cumulatively. yaml-tasks:
19 phases / 97 tasks, AC-1..AC-7.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
james-in-a-box Bot pushed a commit that referenced this pull request Jun 27, 2026
Per-file sub-package seam designs for all 19 allowlisted files, with the
two outliers addressed head-on: gateway/gateway.py (10k, 46 routes) and
orchestrator/routes/pipelines.py (27k), whose _run_pipeline state machine
decomposes into a thin orchestration loop + per-phase handlers + extracted
consensus-cycle and HITL-gate (non-negotiable #7). Recommended 19-slice,
file-disjoint DAG; outliers as PR stacks at the tail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jwbron pushed a commit that referenced this pull request Jul 6, 2026
… -> _run_hitl_gate.py (#3312 slice-4, task-4-3, non-negotiable #7)

GIANT #3 bite 7 — first while-loop per-phase-handler extraction. _run_pipeline
2,684 -> 1,988L. The refine/plan HITL-gate converge-before-advance block
('if current_phase.value in _HITL_GATE_PHASES and not
pipeline.config.hitl_gates:') moves verbatim to _run_hitl_gate_converge (722L).
Its 4 outer-while 'continue's are threaded through a returned action signal:
the helper returns (pipeline, action) and the thin loop does
'if action == "continue": continue' — behaviour-exact (the block owns only
continues, no break/return; pipeline is the sole threaded output). Pure
refactor. Adds _run_hitl_gate_converge to the test's _EXTRACTED_HELPERS tuple
so the _commit_statefiles call-site coverage assertion follows the moved call.
ruff clean; import OK; 171 seam tests pass (test_consensus_polling,
test_conditional_ack_hitl_gate, plan-exit, advance_phase); only the 2
documented pre-existing recover_advance_clear failures remain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jwbron pushed a commit that referenced this pull request Jul 6, 2026
… _run_phase.py (#3312 slice-4, task-4-3, non-negotiable #7)

GIANT #3 bite 8. _run_pipeline 1,988 -> 1,712L. The phase-execution
'if True: while ...:' block (spawn agents / run the BRC inner review cycle)
moves verbatim to _run_phase_execution (331L). The block's 4 breaks belong to
its OWN inner while (they stay verbatim); only the single escaping bare return
is threaded through a 2-state action signal — the helper returns (pipeline,
phase_execution, phase_failed, action) and the thin loop does
'if action == "return": return' (the '"break"' arm is dormant — no
outer-while break in this block). pipeline/phase_execution/phase_failed are
pre-init'd and threaded in+out; the now-dead tester_gap_summary pre-init is
dropped from the giant (0 loads; the helper re-inits its own). Pure refactor.
ruff clean; import OK; 95 seam tests pass (test_consensus_polling,
test_slice_run_loop_integration); only 2 documented pre-existing failures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jwbron pushed a commit that referenced this pull request Jul 6, 2026
… -> _run_phase_blocks.py; giant now UNDER cap (#3312 slice-4, task-4-3, non-negotiable #7)

GIANT #3 bite 9. _run_pipeline 1,712 -> 1,467L (UNDER the 1,500 cap). Extracts
3 while-loop per-phase blocks verbatim into _run_phase_blocks.py (338L):
_run_plan_advance (plan populate/advance; its single outer-while break threaded
via a 'break' action signal; phase_overseer_active bool threaded in+out),
_run_pending_phase_init and _run_implement_advance (both pure fall-through, no
control flow — just threaded I/O). Adds the 3 helpers to the test's
_EXTRACTED_HELPERS so the _commit_statefiles call-site coverage assertion
follows the moved call. Pure refactor. ruff clean; import OK; 100 seam tests
pass (test_consensus_polling, test_slice_run_loop_integration, plan-exit); only
the 2 documented pre-existing recover_advance_clear failures remain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
james-in-a-box Bot pushed a commit that referenced this pull request Jul 6, 2026
…rator/CLAUDE.md (#3312)

Adds the concrete routes/pipelines/ submodule-layout seam row (task-4-5):
the 46-submodule package, the decision-8 route-decorators-in-barrel convention,
the _run_pipeline per-phase split (non-negotiable #7), packaging-neutral recursive
COPY, and the terminal criterion — pipelines.py was the LAST allowlist entry, so
scripts/file-size-allowlist.yaml's files: map is now EMPTY. Closes #3312.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant