Skip to content

feat(loop): auto-shipped #402 - worker session captured#410

Closed
hadamrd wants to merge 6 commits into
trunkfrom
loop/402-feat-observability-operational-entropy-m
Closed

feat(loop): auto-shipped #402 - worker session captured#410
hadamrd wants to merge 6 commits into
trunkfrom
loop/402-feat-observability-operational-entropy-m

Conversation

@hadamrd

@hadamrd hadamrd commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Auto-shipped by forge-loop - worker for #402 exited its
SDK session without committing. The loop captured + formatted +
pushed the output. Auto-merge is enabled.

  • has tests in diff: False
  • worker status: no_pr
  • worker log: docs/ops/loop-runner-logs/worker-402-*.log

Merge gate: CI must pass + critic must not block on sev1.

hadamrd and others added 2 commits June 8, 2026 03:07
Add a read-only operational_entropy block to control-plane status with
four cheap counts: open_branches, live_worktrees, open_epics, and
backlog_age_days (age of the oldest open issue). Each source degrades
gracefully (git/GitHub failure -> null, never raises) and uses a single
branch list, one `git worktree list`, and one list_open_backlog call
reused for both epics and backlog age (no per-issue N+1).

Surfaced in:
- forge-loop status --json (control_plane.operational_entropy) + Rich row
- GET /api/status (_status_payload) + console Health screen
- LoopStatus TS type + mock

Closes #402

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Worker exited its SDK session without running git commit. The
loop captured the uncommitted output, applied the configured
format command, committed, and pushed. Auto-merge is enabled;
CI gates + critic-block-on-sev1 are the merge contract.

Worker status: no_pr
Worker log: docs/ops/loop-runner-logs/worker-402-*.log
@hadamrd hadamrd added loop:auto-rescued loop:needs-review Auto-rescued PR — worker exited dirty; needs human review for completeness labels Jun 8, 2026
@hadamrd

hadamrd commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Source issue #402 was closed mid-flight (state: closed). Loop refusing auto-merge. Reopen the issue OR merge manually.

hadamrd added 3 commits June 8, 2026 13:53
…file)

Removes the 3345-line console/package-lock.json accidentally committed by
the auto-ship. The console uses pnpm (pnpm-lock.yaml is tracked in trunk);
npm's lockfile is redundant scope creep. Refs #402.
…ability-operational-entropy-m

# Conflicts:
#	src/forge_loop/console_api.py
#	src/forge_loop/control/status.py
#	tests/test_cli_status_control_plane.py
#	tests/test_operational_entropy.py
… by trunk

Issue #402's operational-entropy metric was already delivered to trunk by
PR #409 (+ follow-ups #413/#414/#415/#421). The auto-shipped #410 payload
duplicated that work; after merging trunk the only remaining branch delta
was a verbatim-duplicate test_console_api test, which trunk already carries.
Remove it so the branch converges to a no-op over trunk. Refs #402.
@hadamrd

hadamrd commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Repair summary (#402)

Root cause of the stall: issue #402 was already delivered to trunk by its
twin auto-ship PR #409 (feat(observability): operational-entropy metric on status + console, commit f287534) — a byte-identical payload to this PR's
worker commit. #402 was auto-closed the moment #409 merged (01:08Z), which is
why the loop refused auto-merge here. The metric was then elaborated on trunk
by #413/#414/#415/#421 (the pure operational_entropy snapshot module,
top-level entropy payload view, and loop-<n>-only branch counting).

So this branch's feature payload is fully superseded by trunk.

What this repair did (shrinks the diff, does not grow it):

  • Removed the spurious 3345-line console/package-lock.json the auto-ship
    committed — the console uses pnpm (pnpm-lock.yaml is the tracked
    lockfile), so the npm lock was pure noise.
  • Merged origin/trunk (branch was 9 behind, CONFLICTING) and resolved every
    conflict in favour of trunk's more-evolved implementation.
  • Removed a verbatim-duplicate test_status_carries_operational_entropy_block
    that trunk already carries (ruff F811).

Net result: the branch is now a clean catch-up to trunk — the only
remaining delta vs trunk is the loop-planted .claude/settings.json worktree
path (infra, untouched by policy). PR is now MERGEABLE (conflicts gone).

Gates:

  • ruff check src tests → clean.
  • Targeted feat(observability): operational-entropy metric on status + console #402 tests (test_operational_entropy, _snapshot,
    test_cli_status_control_plane) → pass against the worktree source.
  • Note: python -m pytest from the worktree imports forge_loop from the
    editable install (main checkout), and test_console_api's
    test_status_carries_operational_entropy_block (a trunk test) hangs in this
    sandbox because it constructs a real GithubkitClient() (no network) — both
    pre-existing/environmental, identical on trunk, not introduced here.
  • pyright src/forge_loop reports 2 errors in runner/dispatch.py and
    runner/tick_checks.py — both pre-existing trunk debt in files this PR
    does not touch; fixing them is out of scope (unrelated refactor).

Recommendation: this PR is the un-merged twin of #409 and now converges to a
no-op over trunk. Suggest closing #410 as superseded by #409 (the feature
is already live), or merging the empty convergence. Left open per the repair
contract.

@hadamrd hadamrd left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimal path to green (must-fix to merge)

  1. Revert the .claude/settings.json change — swapping the allow-list worktree paths from wt-loop-224 to wt-loop-402 is transient per-worktree loop scaffolding, not part of #402; it must not be committed to trunk.
  2. With that reverted the branch is an empty no-op over trunk (the operational_entropy feature for #402 already landed via #409 + follow-ups #413/#414/#415/#421). Close PR #410 as superseded by #409 rather than merging it.

@hadamrd hadamrd added the critic:blocking Critic found blocking issues label Jun 8, 2026

@hadamrd hadamrd left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[sev2/architecture] The lone remaining change commits a transient worktree path to trunk: it repoints the Write/Edit/Read/Grep/Glob allow-list entries from /tmp/forge-forge-loop/wt-loop-224/** to /tmp/forge-forge-loop/wt-loop-402/**. These are ephemeral per-loop worktree paths (loop scaffolding), unrelated to #402, and hardcoding one loop's worktree into committed config is leaked transient state. Revert this hunk so the branch carries no trunk-bound config change.

Comment thread .claude/settings.json Outdated

@hadamrd hadamrd left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic findings:

  • [sev1/product] This PR delivers none of #402's acceptance criteria. The entire net diff is a single .claude/settings.json edit — there is no operational_entropy block, no _operational_entropy_status helper, no git branch_list, no CLI/API/console surfacing, and no tests. The worker's own final commit confirms the feature was already delivered to trunk by #409 (+ #413/#414/#415/#421) and that after merging trunk the only delta was a duplicate test it then deleted. As it stands this PR cannot satisfy #402; it should be closed as superseded, not merged.

@hadamrd

hadamrd commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Source issue #402 was closed mid-flight (state: closed). Loop refusing auto-merge. Reopen the issue OR merge manually.

…json (#402)

The branch's only delta vs trunk was a loop-planted repoint of the
Write/Edit/Read/Grep/Glob allow-list from wt-loop-224 to wt-loop-402 in
.claude/settings.json — ephemeral per-loop worktree scaffolding, not part
of #402. Restore the committed file to trunk so the branch carries no
trunk-bound config change. (#402 feature itself already shipped to trunk
via #409 and follow-ups #413/#414/#415/#421.)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@hadamrd

hadamrd commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Repair (#402) — branch converged to trunk

Addressed the one unresolved review thread ([sev2/architecture] on .claude/settings.json):
reverted the loop-planted worktree-path repoint (wt-loop-224wt-loop-402) in the
committed file back to trunk's content (commit 70f127b). The on-disk file stays
loop-planted/transient and uncommitted.

State: the #402 feature itself already shipped to trunk via #409 and was elaborated by
#413/#414/#415/#421, so this branch's payload was fully superseded. After this revert the
branch is byte-identical to trunkgit diff origin/trunk...HEAD is empty (zero net
delta). Nothing functional remains to merge.

Gates: ruff check src tests → clean. Two pre-existing pyright errors in
runner/dispatch.py / runner/tick_checks.py are inherited from trunk verbatim (those files
have an empty diff vs trunk) — out of scope for this revert-only repair.

Note: auto-merge is still gated because source issue #402 was auto-closed when its twin
#409 merged. Since this branch now carries zero delta vs trunk, it can simply be closed, or
the issue reopened/merged manually per operator preference.

@hadamrd hadamrd closed this Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

critic:blocking Critic found blocking issues loop:auto-rescued loop:needs-review Auto-rescued PR — worker exited dirty; needs human review for completeness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant