Skip to content

[FEATURE] S6 — End-to-end MCP admission regression (tiny task-tracker flow) and preview==handoff invariant #181

Description

@Joncallim

Issue Type

Feature — child slice S6 of EPIC #172. Depends on #177 (S2), #178 (S3), #179 (S4), #180 (S5). Canonical architecture: docs/adr/0009-mcp-admission-contract.md.

Problem Statement

The blocker that motivated #172 was exposed by a real "tiny task tracker" style run: a valid Architect plan with prompt-only MCP context still stalled at handoff on MCP grant semantics. There is no representative end-to-end regression that would catch a recurrence, and there is no single test proving preview and handoff agree.

Desired Outcome

An end-to-end regression exercises the tiny-task-tracker flow through planning → approval → handoff and asserts the admission contract behaves correctly, so the #172 failure mode cannot silently return with the next workforce slice.

User Story

As a Forge maintainer, I want a representative regression for the exact flow that stalled, so future changes to admission, handoff, or grants fail loudly instead of reintroducing the blocker.

Requirements

Add an integration/e2e flow (web/__tests__ or web/e2e) for a local-only tiny task-tracker project:

  • The Architect creates packages with frontend, QA, docs, and review work.
  • The MCP plan includes prompt-only context (promptOverlay, mcpAwareSubtasks) and no live tool handles.
  • Approval succeeds (no false block).
  • Handoff advances ready packages instead of blocking on MCP ambiguity.
  • A required filesystem.project.read/filesystem.project.search grant still blocks until approved or denied through the intended path (per S3), and a denied-required grant holds the package without burning an attempt.
  • A filesystem.project.write request is treated as planning-only (warns, does not block).
  • A deferred capability (e.g. github write/branch/pr/merge) is reported as mode: 'deferred_live_mcp' with recoveryAction: 'defer_live_mcp_feature', not as an install error.

Add the preview==handoff invariant suite (also referenced by S2) if not already present: web/__tests__/mcp-admission-invariant.test.ts asserting deriveMcpGrantDecisions, evaluateWorkPackageMcpBroker, and requiresFilesystemGrantApproval produce the same mode/status for a fixed package across the capability classes and all four requirement fields.

Acceptance Criteria

  • The tiny-task-tracker regression covers: prompt-only context approves + hands off; required filesystem read/search blocks until approved or denied; denied-required holds with zero attempts; filesystem.project.write is planning-only; a deferred capability reports deferred_live_mcp.
  • The preview==handoff invariant suite passes and fails if any admission path diverges.
  • npm run lint, npx tsc --noEmit, npm test, npm run build pass.

Dependencies

Implementation Scope

Medium — test-only, but exercises the full planning → approval → handoff pipeline.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions