Skip to content

Pipeline admission: queue entire epics, delivered in order#1793

Open
psdjungpulzze wants to merge 4 commits into
mainfrom
goal/a65bf538
Open

Pipeline admission: queue entire epics, delivered in order#1793
psdjungpulzze wants to merge 4 commits into
mainfrom
goal/a65bf538

Conversation

@psdjungpulzze

Copy link
Copy Markdown
Contributor

No description provided.

pulzzejason and others added 4 commits June 30, 2026 22:31
…ce-release escape hatch

S3 goal dependency gate: flip GATING_INCOMING_BLOCKS_EDGE so a CANCELLED
blocks-predecessor keeps gating its successors (removes the `status != cancelled`
carve-out that silently released dependents onto code that never landed). Preserves
S2: a merged predecessor still releases (`prState != merged`), and a non-boundary
aggregation-parent still releases on accept.

Ship the escape hatch in the same change so a chain can never deadlock:
- add `forceReleasedAt` / `forceReleasedBy` to EngineGoalEdge (additive migration);
- `forceReleasedAt: null` becomes a top-level clause of GATING_INCOMING_BLOCKS_EDGE,
  so a force-released edge drops out of every gate seam (queue.ts candidacy,
  countGatingGoalBlockers, the fleet-queue surfacing query, starvation.ts) — all
  share the constant;
- `forceReleaseGoalDependency(edgeId, releasedByUserId?)` stamps the edge (preserved
  for audit, distinct from removal) — idempotent, throws EngineNotFoundError on miss;
- POST .../goals/[goalId]/edges/[edgeId]/force-release, authorizeProjectWrite + the
  same incident-edge / in-project guard as the DELETE edge route.

Tests: updated the exact-shape assertions (goal-edge + queue), inverted the
cancelled-releases test to cancelled-HOLDS, added force-release release + function +
route (success/not-found/wrong-project) coverage.

No agent-config impact: this adds an operator HTTP route, not a registered agent tool,
and no new agent-visible entity/workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review returned the goal for patch coverage below threshold (78.9%): the
catch arms added with the force-release escape hatch were unexercised.

- goal-edge.test.ts: forceReleaseGoalDependency rethrows a non-P2025 db
  error unchanged (covers the non-"missing edge" rethrow).
- force-release route.test.ts: a typed EngineNotFoundError from the stamp
  maps to a clean 404 (catch → engineErrorToHttp → mapped response), and a
  non-engine error rethrows to a 500 (the `throw e` arm).

All changed lines in route.ts + forceReleaseGoalDependency now covered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…force-release control

S3 visibility & UI for the cancelled-predecessor HOLD (backend in e73b6b0):

1) Fleet-queue surfacing: the `waiting_on_deps` blockedBy detail select no longer
   filters predecessors to non-terminal status (which HID a cancelled blocker behind
   the generic "Waiting on deps" label). It now reuses the full
   GATING_INCOMING_BLOCKS_EDGE.fromGoal predicate (+ project scope), so a CANCELLED
   gating predecessor IS surfaced — each blockedBy entry carries `cancelled` + a
   `reason` ("predecessor cancelled — held pending decision"). Gate classification is
   unchanged (the `incomingGoalEdges.some` still uses the full predicate).

2) Goal-detail gate cue: flipped so a cancelled (non-force-released) incoming
   blocks-predecessor reads as STILL GATING, matching the real gate. listGoalEdges now
   carries `forceReleasedAt` so a force-released edge reads as released; the cue is
   `forceReleasedAt == null && status != accepted` (best-effort display, claim path
   stays authoritative).

3) Operator control: the dependency manager surfaces the held state + reason on a held
   incoming edge and adds an explicit Force-release pill (amber, Interactor design
   system) wired to POST .../edges/[edgeId]/force-release. After release the edge shows
   as "Force-released" (control hidden) and the gate cue clears on refetch. The
   remove-edge control remains the alternate escape hatch.

No agent-config impact: operator HTTP route + UI only; no new agent-visible
entity/tool/workflow.

Tests: fleet-queue cancelled-surfacing, goal-detail cancelled-holds + force-release
released cue, goal-edge forceReleasedAt passthrough, UI held-reason + force-release
control + released state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
S3 — A cancelled mid-chain predecessor HOLDS its successors (no auto-release)
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.

3 participants