Harness Intelligence Wiki
SpecsCLIIssue 250/251 Scoped Delivery Validation

Scoped Delivery Validation

Spec: Scoped Delivery Validation

Context

Shared delivery skills give the agent no limit on local validation and no owner for broad regression. In issue #251 a delivery ran the whole local E2E suite twice (35.3 and 33.2 minutes; 40 and 41 of 47 files failing, many in unrelated features). Two-minute focused suites decided the result. In issue #250 a verifier restarted a stack of five PostgreSQL containers, four Nest services, a backend, a dashboard and HTTPS proxies for every run. Each run stopped on one missing field or one assertion that no contract required.

This spec makes local validation follow the plan, gives broad regression to CI, and makes each expensive run return all the evidence it can. The operator keeps the same acceptance rigor and an honest report of what ran.

The view shows the accepted path (Q1, Q4, Q6, Q7, Q12). Local cost grows with the plan. The only broad check is CI, or one local broad run when CI cannot give it.

Non-Goals

  • Find or change the source of the ci-app full-E2E and baseline mandate (Q13, parked).
  • Change project-owned Project Verifier references in any consumer project.
  • Add a delivery runtime, service, or new skill entrypoint.

Requirements and Outcomes

Canonical terms: Verification Tier, Observation Manifest, Speculative Helper Expectation, Owned Stack, New Discriminator (see the glossary).

OUT-001: Local validation follows the plan

During delivery the agent runs only focused tests for the changed behavior, directly relevant integration checks, and type/lint checks for the affected workspaces. verify-behavior exercises only the stories the plan changes. Unrelated failures are recorded, not chased.

Architecture: OUT-001; ARC-001, ARC-003, ARC-005, FLOW-001-STEP-001.

OUT-002: CI owns broad regression

The project's CI owns the full suite and broad regression. Closeout awaits and reports the CI result for the pushed commit. When the project has no full-suite CI, closeout runs one local broad run in its place. CI is the only fresh run.

Architecture: OUT-002; ARC-001, ARC-006, FLOW-001-STEP-003..005.

OUT-003: Verification is tiered and reuses the Owned Stack

Verification uses three Verification Tiers and reuses one strictly owned, isolated stack across delivery steps with controlled resets.

Architecture: OUT-003; ARC-001, ARC-002, ARC-004, FLOW-002.

OUT-004: Each verifier run returns all its evidence

A verifier run captures a planned Observation Manifest, asserts only what a requirement or contract supports, and completes independent observations after a known mismatch.

Architecture: OUT-004; ARC-003, ARC-004, FLOW-002-STEP-003, FLOW-003.

OUT-005: Expensive runs need a reason

Another expensive run needs a New Discriminator and a complete Observation Manifest. A recurring missing observation changes the plan, not the run count.

Architecture: OUT-005; ARC-001, ARC-007, FLOW-002-STEP-004.

Acceptance Criteria

  • AC-001: The shared guidance states the default local validation as focused tests for the changed behavior, directly relevant integration checks, and type/lint checks for affected workspaces only.
    • Covers: OUT-001
    • Architecture: AC-001; ARC-001
  • AC-002: The shared guidance allows broader local validation only for a concrete changed dependency, a focused failure, or an explicit user request.
    • Covers: OUT-001
    • Architecture: AC-002; ARC-001
  • AC-003: The shared guidance does not repeat a check whose relevant inputs did not change.
    • Covers: OUT-001, OUT-005
    • Architecture: AC-003; ARC-001
  • AC-004: The shared guidance records unrelated failures as out of scope with their evidence, and requires no unchanged-baseline run to classify them.
    • Covers: OUT-001
    • Architecture: AC-004; ARC-001
  • AC-005: verify-behavior exercises only the stories scoped to the plan by default; the "every in-scope observable story" default is gone.
    • Covers: OUT-001
    • Architecture: AC-005; ARC-003
  • AC-006: create-plan task validation contains focused checks only; no task gate requires a full local suite.
    • Covers: OUT-001
    • Architecture: AC-006; ARC-005
  • AC-007: Delivery closeout awaits the CI result for the pushed commit and reports it.
    • Covers: OUT-002
    • Architecture: AC-007; ARC-006
  • AC-008: No delivery report states a full-suite pass from focused local checks.
    • Covers: OUT-002
    • Architecture: AC-008; ARC-001, ARC-006
  • AC-009: No local delivery step requires a fresh stack start for acceptance; the guidance names CI as the only fresh run.
    • Covers: OUT-002, OUT-003
    • Architecture: AC-009; ARC-001, ARC-002
  • AC-010: Without full-suite CI, closeout runs one local broad run that covers only what CI lacks (the full suite when there is no CI; the E2E journeys when CI has no E2E), on the Owned Stack after a controlled reset, and reports it as a local broad run.
    • Covers: OUT-002
    • Architecture: AC-010; ARC-001, ARC-006
  • AC-011: The shared guidance defines tier 1 (saved receipts and pure-helper checks), tier 2 (a focused reproduction for one hypothesis) and tier 3 (the plan-scoped acceptance journey after focused checks settle), and states that saved receipts never replace current runtime acceptance.
    • Covers: OUT-003
    • Architecture: AC-011; ARC-001, ARC-007
  • AC-012: Runtime validation reuses the Owned Stack across delivery steps with controlled resets, reuses only strictly owned and isolated resources, reuses evidence only when its relevant input identities match, and keeps owned cleanup at the end of the delivery.
    • Covers: OUT-003
    • Architecture: AC-012; ARC-002, ARC-003
  • AC-013: Verifier drive triage restores state with a controlled reset first and relaunches only when a reset cannot restore known owned state.
    • Covers: OUT-003
    • Architecture: AC-013; ARC-004
  • AC-014: Before the first run, verify-behavior requires an Observation Manifest derived from generated DTOs and source predicates that covers public state, exact release/intent, classifier operands, resource ownership, and correlated operation/receipt/error stages and timings.
    • Covers: OUT-004, OUT-005
    • Architecture: AC-014; ARC-003
  • AC-015: The verifier captures manifest observations before assertions run and redacts secrets from them.
    • Covers: OUT-004
    • Architecture: AC-015; ARC-003
  • AC-016: Each Feature Map entry written by the verification lifecycle skills records its Observation Manifest and the expectation class of each assertion.
    • Covers: OUT-004
    • Architecture: AC-016; ARC-004
  • AC-017: Business invariants and contract output semantics are gates; a Speculative Helper Expectation is not a gate; readiness, authorization, lifecycle, concurrency and cleanup gates remain.
    • Covers: OUT-004
    • Architecture: AC-017; ARC-003, FLOW-003
  • AC-018: A cached action label or one fenced competing operation is not treated as a repeated effect or a duplicated resource.
    • Covers: OUT-004
    • Architecture: AC-018; ARC-003, FLOW-003
  • AC-019: After a known verifier mismatch, independent observations complete, the gate is reported failed or blocked, and partial evidence is never a full pass.
    • Covers: OUT-004
    • Architecture: AC-019; ARC-003
  • AC-020: Before another expensive run, the guidance requires a stated New Discriminator and a complete Observation Manifest; when the same observation is missing again, the diagnostic plan changes instead of another rerun.
    • Covers: OUT-005
    • Architecture: AC-020; ARC-001, ARC-007

Constraints

  • Shared skills are edited only in wearedevpunks/skills on main, then synchronized with bun run sync:skills; .agents/skills/* is not the source.
  • One single source holds the delivery-wide validation policy: implement-spec/references/validation-scope.md (ARC-001). Other skills point to it; they do not restate it.
  • Skills under phases/ name the reference as text because sync copies skills flat and cross-category relative links do not resolve (ARC-001).
  • Existing gates stay: Focused Repair Validation, Task Gates, runtime evidence correlation, owned cleanup, honest blocked status.

Dependency Readiness

No Stack Required.

Branch/Base Intent

Not applicable.

Architecture Source

Accepted Technical Decisions

  • ARC-001 (Q1, Q2, Q4, Q5, Q6, Q7, Q11, Q12): new implement-spec reference references/validation-scope.md holds local default, CI ownership, local broad-run fallback, Verification Tiers, Owned Stack reuse and the repeat guard.
  • ARC-002 (Q5, Q7, Q11): runtime-product-validation.md reuses or starts the Owned Stack instead of starting the runtime per task; lifecycle.md §9 points to ARC-001.
  • ARC-003 (Q3, Q8, Q9, Q10, Q11): verify-behavior/SKILL.md Select defaults to plan-scoped stories; Exercise requires the Observation Manifest, expectation classes, observation after mismatch, and Owned Stack reuse.
  • ARC-004 (Q8, Q9, Q11): create-verification-skill and update-verification-skill add the manifest and expectation class to Feature Map entries and prefer a controlled reset over relaunch.
  • ARC-005 (Q1, Q4): create-plan keeps task validation focused.
  • ARC-006 (Q4, Q6): delivery-phase/phases/closeout.md awaits CI or runs the local broad-run fallback, and reports which one ran.
  • ARC-007 (Q7, Q12): debugging-phase/SKILL.md uses tiers 1 and 2 and the repeat guard.

Accepted Testing Decisions

Not recorded in the grill. The changes are guidance text; validation is the Verification Seams below.

Verification Seams

  • The synchronized skill text in .agents/skills/{implement-spec,verify-behavior,create-verification-skill,update-verification-skill,create-plan,delivery-phase,debugging-phase}: each AC is a statement a reader can find or confirm absent.
  • The sync receipt apps/cli/.devpunks-cache/skills-sync.json: its commit matches the skills main commit that holds the change.

Parked Decisions

  • Q13, ci-app mandate source: owner ci-app maintainers; resume if ci-app still runs mandated broad local suites after this ships.

Decision Log

DecisionEvidenceRationale
Plan-scoped local validationQ1, Q2, Q3Issue #251: focused two-minute suites decided; broad runs added unrelated failures
CI owns broad regression; CI is the only fresh runQ4, Q5Avoid duplicated CI work and local full-stack restarts; differs from #250 item 5 by choice
Local broad run when CI lacks itQ6 (R2 supersedes R1)Keep broad coverage where CI cannot give it
Tiers, manifest, expectation classes, observe after mismatchQ7, Q8, Q9, Q10Issue #250 runs 13–15 failed on verifier assumptions, one field at a time
Owned Stack reuse and repeat guardQ11, Q12Setup cost dominated #250; blind reruns added no information

On this page