Skip to content

Does an e2e test become an outer loop around /build's unit TDD loop for a new feature? #541

Closed

Description

@orioltf

Question

For a new feature that /build implements across frontend, backend and API, does the e2e test become an outer loop around /build's unit TDD loop, and what closes that outer loop?

Settle where the e2e test is written (which slice, before or after the unit slices), what "green" means for it when the feature spans several layers, and whether the e2e test needs a running app on the generation side before /build can call the slice done.

Activity

  1. orioltf commented on Sep 23, 2026

    @orioltf
    MemberAuthor

    Constraint from a closed decision

    Does v1 require resettable test data, or do generated tests own their data? decided that e2e tests are read-only by default, and that writing e2e tests first for a new feature requires a data mechanism the Consumer declares. A new feature has no published content in any environment until someone creates it, so a test written first has nothing to read.

    For this ticket: an outer e2e loop around /build applies only at a Consumer that declares a data mechanism. The second Consumer declares none today. Any Box change this ticket asks for is about the loop, not about data.

  2. orioltf commented on Sep 24, 2026

    @orioltf
    MemberAuthor

    Constraint from Is an untestable acceptance criterion refused by context, or by a change to /specs and /tickets?, 2026-09-24

    • Every criterion in the PRD carries one of three classes: e2e-testable, not e2e-testable, or unverifiable. /specs assigns the class, and the developer confirms it at Halt 1. The terms are defined in apps/claude-code/unic-archon-dlc/CONTEXT.md, in a draft PR.
    • Only an e2e-testable criterion gets an e2e slice from /tickets. The other two classes are accepted gaps, by a Consumer ADR, so /build never receives one as an e2e test to write.
    • The criteria sit as Acceptance criteria: bullets under each PRD user story. Each bullet keeps its ID from the source page.
  3. self-assigned this
    on Sep 25, 2026
  4. orioltf commented on Sep 28, 2026

    @orioltf
    MemberAuthor

    Resolution, 2026-09-28

    Yes. The e2e test becomes an Acceptance Slice, which is a slice of its own. Its RED runs first and its GREEN runs last. A validation step before the loop keeps a broken environment from counting as RED. This ticket decides the shape of the loop only. How the app runs on the generation side stays open until a Consumer declares a data mechanism, as Does v1 require resettable test data, or do generated tests own their data? requires. The second Consumer declares none today.

    Where the e2e test is written

    1. An Acceptance Slice holds one browser test for each e2e-testable criterion, with the criterion's ID in the test title. The other slices of the feature stay plain slices.
    2. The Acceptance Slice's RED runs before every other slice of the feature. Its GREEN runs after all of them reach green-done. Today blocked_by blocks a whole slice, so an e2e slice that depends on the other slices writes its test after the code. The test then passes at once, sets red_unexpected_pass and blocks the build. So unic-dlc-build.yaml must let a slice block its GREEN phase alone. This change revises build-generic-red-green-refactor-loop. It leaves fresh-context-red-green-separation unchanged.
    3. The default is one Acceptance Slice per user story. A Practice Pack sets this default in .archon/unic-dlc.config.yaml, and the Consumer overrides it there. /setup merges the config key by key and keeps the values on disk, so an override survives a re-run. How a Practice Pack writes a config value goes to Practice Packs must stack.

    What closes the loop

    1. The Acceptance Slice's GREEN is an ordinary GREEN. It may change production code in any layer until the test passes.
    2. When a test in the Acceptance Slice fails, a fresh context classifies the failure. That context is separate from the GREEN agent. It reads the test output and any guidance the Practice Pack or the Consumer supplies, and it does not read the diff. The guidance is optional. The context gives each failure one of three verdicts, taken from the QA plugin behind Is the internal QA plugin's content reused in the e2e Practice Pack, and on what terms?:
      • environment issue: the build cancels, as the validation step does.
      • broken or stale test: GREEN fixes the test, not the code.
      • genuine bug: the failure gets a severity.
    3. Severity uses the scale of the QA process's defect step: Blocker, Critical, Major, Minor, Trivial. It is not the scale /pr-review uses. An e2e failure is a QA defect, not a review finding.
    4. The Acceptance Slice's GREEN has an attempt cap of its own. At the cap, a high-severity failure stops the build for a human, and a low-severity failure is deferred. The default puts Blocker and Critical high and Major, Minor and Trivial low. The Consumer can move the cut. A Consumer whose process is mature can switch the cap off and rely on the loop's max_iterations alone.
    5. The Consumer chooses where a deferred failure goes:
      • back into the build's issues.json as a new slice: a longer build that also fixes minor failures, or
      • to a new item on the Consumer's tracker, with the test marked test.fixme and linked to that item: a shorter build that leaves the gap visible in the suite and the pull request.

    The validation step

    1. bootstrap in unic-dlc-build.yaml checks that the e2e environment is ready whenever sdlc_needs.e2e is declared. If it is not ready, guard-not-ready cancels the build. This applies whether or not issues.json holds an Acceptance Slice, because verification runs sdlc_needs.e2e at the end of every build. RED keeps its current rule: a non-zero exit.

    Settled elsewhere or left open

    • The value of the attempt cap goes to the map's "The numbers". The map now has two thresholds, one on the QA defect scale and one on the /pr-review scale.
    • What the validation step probes, such as a URL or a health command, and how the app runs, stays open with the environment. The QA plugin leaves this to Playwright's webServer block.
    • The new config values need a single block, not separate top-level keys. /to-spec names it.
    • The Box change is an implementation item for /to-tickets. It edits unic-dlc-build.yaml, so it carries blocked_by edges to open-pr precedes its gate and No Box can target a base branch that is not the trunk. The seat that owns the Box files hears of it first. The build diagram under apps/claude-code/unic-archon-dlc/docs/architecture/ needs a redraw in the same pull request or in a follow-up.
    • The term Acceptance Slice enters apps/claude-code/unic-archon-dlc/CONTEXT.md. The Practice Pack entry now reads "context artefacts and config values".
  5. added a commit that references this issue on Sep 28, 2026
  6. orioltf commented on Sep 28, 2026

    @orioltf
    MemberAuthor

    PR #626 is ready to merge, 2026-09-28

    Verified by the e2e seat orchestrator on head 262c1315514fc85e7c31e4489e68a6428207feed:

    Merge with a merge commit. That is left to a maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions