Skip to content

Hand every child Run one set of child asks, built once after the Harness check #876

Closed

Description

@JacobStephens2

What to build

Make one module decide what a child Run is asked, so a Ticket's Run and a Base fix get it from one place.

Today each Run takes its Command's Harness, Model and Effort, its Security fix ask and its Security review ask apart. Then the Run, its Base fix, its Delivery and the Spec run each rebuild them by hand on the way to a child Run. Two examples:

  • The Base fix copies the Harness before the Run has checked it, so the Run has to re-sync it afterwards.
  • The Delivery carries a Security fix ask it never reads, only so the Spec run can pass it on to its Tickets.

After this change, a Run builds one child asks value once, after its Harness check. That value travels unchanged to every child Run it starts, and it answers whether a Run of a given kind runs its own Security review.

Behaviour does not change. The new tests pin the current rules:

  • A child Run runs its sessions on the Command's checked Harness, Model and Effort.
  • Every child Run gets the Command's Security fix ask.
  • A Ticket's Run runs no Security review of its own.
  • A Base fix runs one when its Command asked for one, including a Base fix started by a Ticket's Run.

Acceptance criteria

  • One child asks module holds the Command's checked Harness, Model and Effort, its Security fix ask and its Security review ask. It is built once in a Run, after the Harness check, from the Run's Asks. A child Run reads it back from what it was given.
  • The child asks module answers whether a Run started as a given child kind (none, Ticket or Base fix) runs its own Security review. A Ticket's Run runs none. A Run that is not a child, and a Base fix, run one when the Command asked for one. This replaces the Ticket mask the Run applies to itself today.
  • Starting a child Run, directly or through the owned set of concurrent child Runs, takes the issue, the child's kind, its Base fix ask and the child asks. The separate Security options and Harness parameters are gone.
  • What a child Run is given, and its hidden arguments, carries the child asks in place of separate Security options and Harness fields. It writes and reads back the same hidden arguments as today.
  • The Base fix no longer keeps a Harness or Security options, and its re-sync of the Harness after the check is deleted. Building a Base fix takes only the child kind and the Base fix ask. Starting a Base fix receives the child asks from the Delivery that calls it.
  • The Delivery's Security fix ask and its Harness field are replaced by a reference to the child asks, which its own sessions also run on. Its own Security review ask stays a separate fact.
  • The Spec run's two Security booleans and its Harness reference are replaced by the child asks it takes from its Delivery. It does not rebuild Security options for each Ticket.
  • Unit test: whether a Run runs its own Security review, for each child kind, with the Command's Security review ask both on and off.
  • Unit test: the existing round-trip test for what a child Run is given covers every Security fix and Security review combination on both child kinds.
  • Integration test: a Run asked for a Security review that starts a Base fix has a Base fix whose Delivery runs a Security review session.
  • Integration test: a Spec run asked for a Security review still runs exactly one review, on the Spec PR. The existing Spec run Security review test stays green.
  • GLOSSARY.md: the Security review entry also says that a Base fix gets one when its Command asked for one, whichever Run started it.
  • cargo test passes, and so do the repository's lint and format checks.

Blocked by

None (can start immediately).

Decisions

  • One Ticket, not a Spec. The change is an in-process re-plumbing of one set of facts across the Run, Base fix, Delivery, Spec run and child Run modules. It fits one session. The Base fix and Spec run halves can't land apart without leaving both paths half-converted.
  • Behaviour is preserved, including the Base fix's Security review. Today a Base fix runs the Command's Security review whichever Run started it, even one started by a Ticket's Run, which runs none itself. The deepening keeps that rule and pins it with tests. The child asks therefore always carry the Command's own Security review ask, not the masked one, and each Run asks the child asks whether it runs its own. Masking on the parent side was rejected: a Ticket's Run would then pass "no review" on to its own Base fix, which changes behaviour.
  • The child asks are built after the Harness check, and only then. This deletes the Base fix's early Harness copy and its re-sync. A Run that is a child built its Asks from what it was given, and its parent had already checked that Harness. A Run started by a Pass runs on what the Pass checked. Every path therefore builds the child asks from a checked Harness.
  • The Base fix takes the child asks per call, not at construction. The Base fix is built before the Run opens its Launch directory and checks the Harness, because a Run that fails early still reports it. Handing it the child asks when it starts a Base fix removes the ordering hazard instead of documenting it.
  • The Base fix ask stays outside the child asks. It differs per child kind: a Ticket gets what the Run's Base fix says Tickets are asked, and a Base fix is forbidden its own. It also comes from the Base fix's state. It stays a separate argument to starting a child.
  • Asks keeps its flat fields. The continuation command, the User config and the command entry points read the Run's Asks field by field. Folding them into the child asks would widen the change with no new locality. The child asks are derived from Asks once, and a child's Asks are rebuilt from them in the one existing place.
  • The Delivery's own sessions run on the child asks' Harness. One Harness per Command is already a glossary rule, so a separate Harness field on the Delivery would only duplicate it. The Delivery's own Security review ask stays separate, because for a Ticket's Run it differs from what the Delivery hands on.
  • Name: "child asks", not "inherited". "Inherited" is taken by Inherited failure. The new name is an implementation term, not a domain concept, so it gets no GLOSSARY.md entry. Only the sharpened Security review rule does.
  • No ADR. The change is easy to reverse and involves no real trade-off.

Architecture review

Strength: Strong · Dependencies: in-process

Files: src/run.rs, src/base_fix.rs, src/delivery.rs, src/spec_run.rs, src/child_run.rs, src/child_run/runs.rs, src/asks.rs

Before

flowchart LR
  Asks --> Run
  Run -.harness copy, re-synced after check.-> BaseFix[Base fix]
  Run -.masks Ticket review.-> Run
  Run --> Delivery
  Delivery -.carries unread security fix.-> SpecRun[Spec run]
  SpecRun -.rebuilds security options.-> Runs[child Runs]
  BaseFix -.security + harness.-> Start[child Run start]
  Runs -.security + harness.-> Start
  Start --> Given
  classDef leak stroke:#dc2626,stroke-width:2px;
  class BaseFix,SpecRun,Delivery leak
Loading

After

flowchart LR
  Asks --> Run
  Run --> ChildAsks[Child asks]
  ChildAsks --> Delivery
  Delivery --> BaseFix[Base fix]
  Delivery --> SpecRun[Spec run]
  BaseFix --> Start[child Run start]
  SpecRun --> Runs[child Runs]
  Runs --> Start
  Start --> Given
  classDef deep stroke-width:3px;
  class ChildAsks deep
Loading

Problem: What a child Run is asked gets taken apart and rebuilt in about seven places. This leaves a mutable Harness copy, a field kept only to be passed on, and a Security review rule split between parent and child.

Solution: Use one child asks module, built after the Harness check, that travels unchanged to every child Run and answers which Runs run their own Security review.

Wins

  • Locality: child rules live in one module
  • Delete Base fix's harness re-sync
  • Interface shrinks for Spec run and Delivery
  • Base fix's Security review rule tested

Activity

  1. added
    needs-triage
    ready-for-agent
    architect-plan
    in-progress
    and removed
    needs-triage
    ready-for-agent
    on Oct 20, 2026
  2. removed
    in-progress
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    architect-plan

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions