oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

Equipo runner implementation plan

> Future implementation: use superpowers:subagent-driven-development task by task. The R2 planning session does not invoke that workflow or dispatch agents.

Goal: Paul submits a bug, watches Engineering and Review, receives an Amadan review branch with evidence, and can cancel with verified containment.

Architecture: The instance owns tasks, connections, leases, budgets and evidence in its activation database. A Go user service on docs-t1 dials out, controls local Paseo through a pinned Node adapter, and owns the check executor and repository credentials.

Baseline: Repository HEAD 99a6321 for this R2 revision (Foundation implementation baseline 2911a91). Implement this plan in order, Task 0 then Tasks 1–18: 19 tasks. Task 0 is the new prerequisite; existing task numbers stay stable. This revision changes only this plan and authorizes no implementation, agents, commits, pushes or deployment.

Sources: docs/superpowers/specs/2026-11-01-equipo-design.md §§3.2–3.4, 4, 6–7, 9–10; roadmap Runner row; 2026-11-01-paseo-probe.md; runner briefs and Round 1 findings in this directory. R1b supersedes R1's Codex prohibition and periodic refresh. Subscription calls mean dispatched Paseo turns, as ruled on 2026-11-02.

Stack after Task 0: Go floor 1.26.0, gate toolchain go1.26.10, Rastrillo v0.30.0, chi, GORM, modernc SQLite. Paseo client/protocol/server 0.14.0; Node v24.19.0; Claude Code 2.1.312; Codex CLI 0.165.0. Changed runtime versions require renewed capability verification.

Constraints and task conventions

  • Paseo runs agents. The runner has no TCP/inet listener; tools use private per-attempt Unix sockets. Linux/systemd on docs-t1 only; no launchd or tito-studio gate.
  • Connections belong to people. Use the requester's explicitly enabled connections and enrolled machine. Both families must be available on that same runner before spending. Review needs a different known family, producer and session.
  • Publish only the saved review branch through a disclosed Amadan agent account. Never merge, deploy or push the default branch. A changed candidate invalidates checks and review. Success delivers a verified branch; the app then waits for the named person's merge acknowledgement, attributed to that person rather than forge verification.
  • Unknown outcomes stay unknown and charged. Cancellation, restart, missing events and quarantine release cannot create receipts or refunds. Subscription reservations are accounting limits, not provider-enforced token/currency ceilings.
  • Preserve the day/sidebar shell, token colors, phone indexes/back links, scriptless forms, and byte-identical framework assets. No split screen, initials, progress percentages or coloured left-border accents.
  • App-owned runtime strings, including runner diagnostics, belong only in internal/equipo/copy.go. Mark each draft COPY REVIEW REQUIRED; review and apply edits verbatim before release. Framework-owned live strings stay in Rastrillo locale packs and are exempt from the copy.go rule. This plan specifies keys/meaning, not final copy. Leave README unchanged. Use plain words without em dashes or exclamation marks.
  • Browser Actor comes from verified sessions; runner identity comes from its credential. Check the current roster and append audit inside each write transaction. Use its transaction handle throughout. No request-to-GORM binding or scope.Owned for shared records.
  • Keep origin/key/SMTP requirements and first-boot-only owners. App tables belong in Models/Schema, framework tables only in BootSchema. Migrations are additive. Preserve one activation database and Foundation's closed execution default until Task 17.
  • Builds use CGO_ENABLED=0. Keep default Go caches; scratch under on-disk $TMPDIR; servers bind 127.0.0.1. No sudo. Remove owned scratch and stop test processes.
  • make ci is the common local/CI gate; .amadan/ci* delegates to Make. No ordinary test starts providers/Paseo agents or pushes to Amadan. Live gates require explicit opt-in.
  • Each task follows red → implement → green → guard mutations → commit. Add every named new test before implementation, including names introduced in implementation/gate paragraphs. Record commands/results in the controller report. Missing symbols can establish red; after green, bypass each guard independently, observe its assertion fail, then restore. Stage only task files; future commit subjects below are under 80 characters. This planning session makes no commits.
  • Interfaces below omit repeated ctx context.Context from method listings; every operation accepts it first. IDs are opaque except existing core types. Wire version 1 uses strict snake_case JSON, UTC timestamps and integer-second durations. UI errors are copy-key enums. Test fakes require explicit injection; production constructors reject missing real dependencies.

Plan 2 excludes cross-machine bundles/chunking, enrolment-response recovery, Journey pagination, owner provider/family allowlists (plan 4), best-fit reasoning, ask-each-time selection, coordinators, preferences, settlement, plan editing, product ranking, CARLOS signals, features and copy/design tasks. Project/account deletion stays absent; ASCII uniqueness and existing non-ASCII lower-case behavior stay unchanged. Labels never confer identity or authority.

Read isolation and Paul's ruling

ReadIsolation requires both current preflight and an exact (provider, provider version, Paseo server version, config hash) tuple in the instance build’s verified list, recorded in its release manifest after Task 18 passes the sentinel gate. PaseoVersion is the observed daemon server version, not the client package version. The effective configuration hash covers permission mode, credential home, routing and read policy. A runner-reported true for an unlisted tuple is stored as unconfined and requires the eligible connection’s owner acknowledgement and labels; it cannot add to the build’s list. Canonical denied paths cover runner state/config/journal/bearer/cleanup files, the configured Amadan credential, actual Paseo and routed provider credential homes, ~/.ssh, and resolved symlink targets. Reject workspaces inside those subtrees. Revalidate before creation and every turn; changed mode/home/routing/policy invalidates preflight. Permission answers cannot relax the trusted policy.

Installed-source findings from Round 1: @getpaseo/{client,protocol,server} 0.14.0; provider options/agents under the installed CLI's node_modules/@getpaseo/server/dist/server/server/agent/providers/. These are inspection references, never runtime imports.

| Provider | Capability and dispatch decision | |---|---| | Claude Code 2.1.312 | ClaudeProviderOptionsSchema and buildOptions support sandbox filesystem.denyRead, failIfUnavailable and permission deny rules. Use modeId: "default", enabled filesystem sandbox, no excluded commands, allowUnsandboxedCommands: false, absolute built-in Read(...) denies. Keep ReadIsolation=false until Task 18 proves every sentinel and policy-tampering assertion and the exact observed tuple is included in the instance build’s verified list and release manifest. Claude must remain confined; no acknowledgement bypass. | | Codex CLI 0.165.0 / Paseo 0.14.0 | Legacy read-only/workspace-write modes do not deny protected reads. Command-only probes read an outside sentinel even with sandbox_permissions=[]; an explicit named filesystem deny profile blocked it while permitting the workspace control. Paseo's strict schema rejects the needed profile fields and maps legacy turn policies. Report ReadIsolation=false, reason unsupported_per_agent_profile. Paul permits this connection to run unconfined under the acknowledgement below. Do not report confinement, modify shared provider homes, invent passthrough fields or bypass Paseo. |

Paul's ruling, 2026-11-02: for his own repositories, Codex may run without read isolation for now, clearly labelled. A current team owner must explicitly acknowledge each unconfined connection. The acknowledgement covers all projects in the team: Paul’s ruling is “his own repos”, and every project in his team is his. Personal connection opt-in remains separate. No acknowledgement means no creation or dispatch. This exception changes only read-isolation eligibility; account pinning, identity, timeline, process ownership and every other gate still apply.

Task 6 persists IsolationAcknowledgement{ID, ConnectionID, Owner, Provider, ProviderVersion, PaseoVersion, IsolationConfigHash string; AcknowledgedAt time.Time; ConnectionRevision int64} and its audit in the owner transaction. No bulk or label-based acknowledgement; submitted owner/time/version fields cannot establish authority. Bind to the observed tuple and connection identity; the runner’s claimed ReadIsolation flag never controls lapse checks. Revoke by owner action; removal or demotion of the acknowledging owner, provider identity/version changes or observed Paseo daemon server version changes automatically lapse it. Check the acknowledging owner’s current roster role inside each write transaction; lookup errors deny access. A changed effective configuration/security revision also requires fresh preflight and acknowledgement; heartbeat/LastSeen updates do not change that revision. Recheck at assignment, claim, create and each turn/admission; version change fences pending work and contains affected running attempts before reuse. Never grandfather stale approvals.

A runner with any acknowledged unconfined connection enabled is tainted. Every step, evidence item (including executor evidence) and publication from that runner carries unconfined, whichever connection ran it. A concurrent Claude task on that runner is also labelled even when its own connection passes confinement. Connection capability and runner exposure are separate facts.

Snapshot connection IsolationStatus (confined or unconfined), runner taint, acknowledgement IDs and observed tuples into each selection, attempt, step and evidence provenance. Derive these from the instance-authorized assignment, enabled connections and observed session, never tool-submitted JSON. Propagate taint to already-running work when an acknowledged unconfined connection is enabled. Persist the historical label after acknowledgement expiry, disabling the connection or later confinement. Executor identity remains attributable but its evidence on a tainted runner is labelled unconfined. Missing or stripped provenance fails registration/publication. Display literal unconfined on every affected task card, Journey chip, task detail/evidence entry and published review branch description; retain it in the task/publication summary.

After each unconfined attempt is contained, rotate the runner’s bearer and cleanup tokens before further admission. Task 8 owns the credential transition; Tasks 15/17 wire it after verified containment. Revocation or expiry cannot be revived by rotation. Taint remains while any acknowledged unconfined connection is enabled; disabling one cannot erase exposure from work already affected.

Unconfined workspaces/environments still contain no injected credentials; hooks/helpers stay disabled. Checks use the required command sandbox, with executor evidence subject to runner taint. Publication uses the runner-held credential, and Review uses another family. Unconfined means host read denial is unproven: do not claim that filesystem secrets or the tool capability file are unreadable by that agent. The fixed Equipo MCP helper is the sole approved helper; typed tool, lease and fence restrictions remain enforced. Claude's shell sandbox plus built-in denies must protect every path; arbitrary hooks/plugins/MCP helpers and unsandboxed retries remain forbidden.

Restore confinement: Task 9 owns the future supported per-agent Codex profile adapter. When Paseo ships it, remove that version's exception eligibility, construct the deny profile through its supported API, observe effective policy, and run Tasks 10/18 sentinel tests. The Paseo version change already lapses old acknowledgements. Record the passing tuple in the instance build’s verified list and release manifest, then require ReadIsolation=true before re-enabling Codex once the supported profile contract exists; retain historical unconfined labels. No global skip or permanent bypass flag.

Storage and dependencies

App paths below are relative to internal/equipo; core paths to internal/equipo/team. Shared DTOs live in internal/runnerproto/{types,validate}.go; SDK types stay in internal/runner/paseo. Core scope uses persisted Team.ID, not CARLOS account labels.

Keep standalone core migrations for fixtures; mirror their exact tables/indexes/defaults/foreign keys in app SQL and private GORM models. At every bump update team.SchemaVersion, standalone ordered migrations, app migration and migrations/schema.sql together. TestExecutionSchemaParity covers fresh databases, every supported upgrade, preserved data, newer-version refusal and two no-op reopens. Never stamp legacy state directly to the newest version.

| Task | App migration | Core version/change | |---|---|---| | 1 | 0007_execution.sql | Mirror version 3 | | 2 | 0008_recovery.sql | 3 → 4: recovery generation, clock high-water, stale grants, recovery charges | | 3 | 0009_runner_policy.sql | 4 → 5: reservation period/project indexes | | 5 | 0010_runners.sql | Enrolment/credentials | | 6 | 0011_connections.sql | Personal choices and isolation acknowledgements | | 7 | 0012_tasks.sql | 5 → 6: job request key/hash | | 8 | 0013_runner_assignments.sql | 6 → 7: atomic admission request/ticket | | 11–13 | 0014_artifact_blobs.sql, 0015_runner_events.sql, 0016_questions.sql | Blob/event/question projections |

JSON-only policy/evidence extensions need no columns. Task 6 builds instance selection; runner discovery waits for 17. Task 7 tests preparation DTOs/outbox/graph with a fake, without HTTP or workspace calls. Task 8 uses seeded assignments, real admissions and fake validators. Task 15 connects preparation to Tasks 8/10/11 and installs real artifact/question validators. Task 17 attaches production execution after recovery/supervision exist. Task 16 supplies a post-commit notifier to earlier write paths; nil notifier during earlier tasks preserves that dependency order.

Task 0: Upgrade Foundation to Rastrillo v0.30.0

Files: go.mod, go.sum, app locale-pack import, static/, templates/layout.html, internal/equipotest/browser_test.go, internal/equipotest/foundation_test.go, compatibility tests; Makefile/CI only if needed to retain the existing gates. No Foundation behavior expansion.

Checked against local tag v0.30.0 in /home/paulca/amadan.net/rastrillo/rastrillo, including go.mod, serve.go, auth/{auth,handlers,signin}.go, pow, sessions, migrate, ui/{funcs,ui,vendored}.go, harness, budget, db, dbtest, csrf, mail, background, perf, and docs/site/{live,reference/live}.md:

| Foundation use | Required upgrade work | |---|---| | Module/toolchain | Raise go 1.25.0 to 1.26.0; require Rastrillo v0.30.0 and tidy its dependency graph. Existing Make GOTOOLCHAIN=go1.26.10 already meets the floor; retain it. Keep the Rastrillo CLI tool directive. | | Resolve, Options, Serve, Handler, assets | Existing activation/Mux/Wrap/ErrorPage/Background APIs remain. Handler now checks locale packs even for default English: blank-import amadan.net/rastrillo/rastrillo/locales/en in the app package so production and test binaries link it. Preserve one DB, clear opts.DBPath, close on failure/shutdown. Later set Options.Live. | | auth.New/Config, handlers, From, RequireSession, SigninState, PrepareSigninResponse, Sweep | Existing database mode and fields remain supported. Keep DB/Origin/InstanceKey/Proof, roster Authorize, SubjectFor, confirmation renderer and paths. Do not switch to new records/signed-session mode. Recheck email/keymail, replay, signout and removed-member tests; v0.30.0 also preserves safe posted returnto through sign-in, with SignedInPath as fallback. | | pow.New/Config, SQLNonces, NonceStore, NoProof, DefaultMinAge, Schema | No caller changes. New record nonces and Form.At are additive; keep SQL nonces, scriptless NoProof and minimum-age checks. | | sessions.Schema, HashToken, auth-managed SQL sessions | No signature/schema changes needed. New signed mode is optional. Row sessions now refuse path-routed tenants: keep this lone-instance origin, no BasePath adoption or auth bypass. | | migrate.MustFromFS, Merge, Apply, Set; dbtest.FromSet | Existing calls/sets remain. New schema introspection excludes `litestream*; retain app/framework inventory separation and migration idempotence. No rewritten historical migration. | | db.Open, .G, .Writer(), .Close() | Compatible; writer still has SetMaxOpenConns(1) and no txlock=immediate. Keep Task 1's pool guard. | | ui.Funcs(WithIcons), Templates, Layout("stage"), VendoredAssets("day") | Compatible, including legacy T "key" and nil localizer. Keep current template map; no required ui.Pages migration. Replace all vendored assets from this tag byte-for-byte, including new live.js, light.js, anchor.js. Link live.js after busy.js in the app layout; stage now references the new assets. Preserve app CSS in equipo.css. | | Browser harness/chromedp | harness.New, WithScrollbars, Screen remain. Rig.Run now takes chromedp.Action[chromedp.Void]; dependency graph uses chromedp v0.21.0/cdproto v0.158.6. Port Evaluate/Location/screenshots to typed harness.Evaluate[T], Read or Into; selectors to chromedp.CSS; custom ActionFunc/.Do(ctx) helpers to chromedp.Func(func(ctx, target) error) and typed actions/cdp.Call. Port CDP cookie, media and script-disable calls to command constants with params. Preserve navigation waits, assertions and scripts-off coverage. | | budget.Main, CLI budget size/test; perf.Middleware, perftest; mail/background/CSRF | Budget, performance, mail and background APIs used here are unchanged. csrf.Protect(origin, ...Option)` remains compatible with existing calls; no new exemptions for browser forms. Keep all Make gates and TestMain budgets. |

  • [ ] Red: Add TestRastrilloUpgradeContract checking linked version/floor, default-English Handler boot and static assets including live.js. Run go test ./internal/equipotest -run 'TestRastrilloUpgradeContract|TestVendoredAssetsMatchTheLibrary' -count=1; the upgrade assertion fails on v0.28.0. Update TestFoundationFailsClosed/private_routes to require the redirect /signin?return_to=%2F for unauthenticated /, preserving its status and access-denial assertions. Run go test ./internal/equipotest -run TestFoundationFailsClosed/private_routes -count=1 before and after the upgrade. Retain the existing Foundation suite as regression coverage.
  • [ ] Implement: go mod edit -go=1.26.0; GOTOOLCHAIN=go1.26.10 go get amadan.net/rastrillo/rastrillo@v0.30.0; GOTOOLCHAIN=go1.26.10 go mod tidy. Apply the table's locale/assets/browser changes, inspecting dependency diff. Use ui.VendoredAssets("day") as the authoritative copy set; do not broadly rewrite app files with doctor.
  • [ ] Green: Repeat red; run Foundation's full make ci, plus go test -tags browser ./internal/equipotest -run TestFoundationBrowserWalk -count=1 and the same with EQUIPO_BROWSER_NO_JS=1. Both widths 1280/390 remain covered. Check normal motion separately; record any reproducible framework transition issue rather than hiding it. Removing the locale import, changing a vendored byte or dropping the live asset must fail the relevant assertion. Do not weaken tests/budgets to accommodate the upgrade.
  • [ ] Commit: build: upgrade Foundation to Rastrillo v0.30.0.

Task 1: Put execution state in the activation database

Files: Core shared.go, shared_test.go, store.go; app execution.go, execution_models.go, store.go, models.go; migration 0007; internal/equipotest/execution_schema_test.go.

Interfaces: team.OpenShared(ctx, writer *sql.DB, path string, o Options) (*Store, error) borrows the writer without owning migrations/pool; checks schema before start. Close writes the witness but closes SQL only for standalone Open. Mirror existing service, jobs, steps, attempts, reservations, actions, events, artifacts, period_budgets, time_reservations names. Store.WithTransaction(ctx, fn func(*sql.Tx) error) error uses the witnessed transaction path. Execution.Write(ctx, fn func(*gorm.DB) error) error binds a fresh GORM session to that SQL transaction, preserves writer resolution and disables nested transaction creation. Attached Store.write delegates there.

  • [ ] Tests: TestExecutionSharedPool, TestExecutionSchemaParity, TestExecutionBackupIncludesArtifacts: apply BootSchema twice, use both stores, close core and still ping app writer. App/core/audit roll back together; crash between SQL commit and witness publication retains recoverable-gap behavior. No nested pool acquisition; backup includes jobs, reproduction bytes and app records. Second migration applies nothing.
  • [ ] Red/green: go test ./internal/equipo/team ./internal/equipotest -run 'TestExecution' -count=1; green also make migration-check and existing TestCommit|TestRecovery core tests.
  • [ ] Implement: Preserve lock ordering, witness writes and commit-failure poisoning; never run standalone migrations on production. Refuse writer pools whose Stats().MaxOpenConnections != 1; close rows before nested queries. No ordinary GORM transaction may bypass core locking/witnesses. Production attachment waits for Task 17.
  • [ ] Commit: feat: attach execution storage to the activation database.

Task 2: Release quarantine and handle stale authority safely

Files: Core recovery_release.go, stop.go, tests; authority/jobs/scheduler/actions/recovery/periodbudget/store; app recovery.go, authority/projects/roster/budgets; migration 0008; internal/equipotest/recovery_test.go.

Interfaces: AdmissionRequest.Project ProjectID; Store.Pause(ctx, reason string) error for startup/quarantine; FenceGrantsTx(ctx, tx *sql.Tx, changes []GrantChange) error, GrantChange{Ref GrantRef; Version, Epoch int64}; StopAttempt(ctx, scope Scope, h Handle, reason string) error. RecoverySnapshot(ctx) (RecoverySnapshot, error) returns Revision, Incarnation int64; Hash string; Unresolved []ActionID; Uncontained []AttemptID. ReleaseQuarantine(ctx, expectedRevision int64, actor, reason, reconciliationHash string) error and its ReleaseQuarantineTx variant take the current SQL transaction. App owner entry: ReleaseExecution(ctx, actor Actor, expectedRevision int64, reason, snapshotHash string) error.

  • [ ] Tests: TestRecoveryReleaseOwnerAndRevision: deny member, stale snapshot, missing reconciliation, or uncontained attempts. TestRecoveryReleaseKeepsUnknownCharged: release cannot replay/refund unknown work. TestProjectGrantChargeAgreement: wrong project with valid grant fails create/renew/admit. TestRuntimeAuthorityEditFencesOnlyChangedGrants: edit A stops A until Resume while B renews/admits; global RosterEpoch changes stale all its grants; label/unrelated edits stop neither; removal cancels, lookup errors deny. TestContainAfterClockRollback: StopAttempt → physical cleanup → Contain works before the old deadline and rejects old handle. Clock rollback, including to a time after CreatedAt, preserves full reserved seconds when elapsed time is unknown; no read refunds it.
  • [ ] Red/green: go test ./internal/equipo/team ./internal/equipotest -run 'TestRecoveryRelease|TestProjectGrantCharge|TestRuntimeAuthority|TestContainAfter' -count=1; green also make migration-check and existing restore/witness/crash tests.
  • [ ] Implement: Resolve Project against grant in every Authority call; production admissions last 5 seconds. Use Task 1's current transaction for grant fencing. Changed grants stale only their jobs, fence attempts, request stops and revoke undispatched intents. Resume reconciles contained, still-authorized jobs; revoked/target-changed jobs cancel. Budget edits synchronize only affected scope without staling unrelated grants. Persist reconciliation work and audit atomically; serialize budget sync/contain/Resume.

Recovery revision is a dedicated generation advanced by reconciliation/stop/receipt/release, not read-advancing service.revision. Persist a clock high-water mark for mutations. Owner release writes core/app audit atomically, clears only the reconciled quarantine revision, then Resume reopens admission. Missing history requires owner attestation and conservative RecoveryCharge{Key string; Account AccountID; Project ProjectID; Reserved PeriodLimits} via RecordRecoveryCharge(ctx, charge, actor, reason) error: owner-gated, idempotent key/content, included in totals without fabricated receipts. No runner release endpoint for quarantine.

  • [ ] Commit: feat: reconcile and release execution quarantine.

Task 3: Define subscription accounting and bound period queries

Files: Core policy/model/budget/periodbudget/store, subscription_test.go, periodquery_test.go; app budgets, migration 0009, internal/equipotest/budget_sync_test.go.

Interfaces: Policy v2 adds UsageMode (metered, subscription) and RequireDistinctReviewFamily; retain v1 behavior. RunnerPolicy(mode string, limits, perTurn Limits, rates Rates) (Policy, error) is a pure constructor. ConfiguredBudgets(ctx, account AccountID) (BudgetSet, error). Subscription ledger currency is zero with an unavailable flag, not a fabricated price; calls/tokens/time remain positive bounds. Metered jobs retain positive cost caps/rates. Configured team/project budgets use each job's pricing/per-call policy, independent of job creation order; retain legacy unconfigured-account behavior.

  • [ ] Tests: TestSubscriptionPolicy, TestMixedConnectionPolicies, TestLoweredBudgetBlocksReservedAdmission, TestBudgetSyncCrash, TestPeriodQueriesBoundedHistory, TestUnknownUsageStillCharged, TestBoundedTurnReservation, TestCachedUsageSeparate. Assert 5-second admissions, 60-second leases, 1,200-second attempts, 2,700-second jobs, two attempts/step, concurrency two, depth zero, 24 external actions/job with one publication slot and at most 23 provider turns. Limit reduction after Intend makes Admit return ErrBudget; repeated sync does not advance twice. Compare checked totals/query plans across 100,000 settled old rows and older open rows.
  • [ ] Red/green: go test ./internal/equipo/team ./internal/equipotest -run 'TestSubscription|TestMixedConnection|TestLoweredBudget|TestBudgetSync|TestPeriodQueries|TestUnknownUsage|TestBoundedTurnReservation|TestCachedUsageSeparate' -count=1. Green: migration check and existing TestReservationLimitsAndOverflow|TestSettlementRules|TestLateUsageAfterCancelAndAuditedSettlement|TestTimeReservationsDoNotChangeCallLedger.
  • [ ] Implement: Reserve one call plus configured bounded PerCall input/output, clipped to positive remaining job/period headroom; never default to all remaining tokens. A completed turn with unknown usage keeps its reservation; another turn may proceed with remaining headroom. Unknown outcome blocks progression/replay. Zero headroom blocks. Persist overrun before stopping further turns. Count reviewer/follow-up turns; underlying requests remain unavailable unless proven.

Backfill validated period/project columns from timestamps/job rows. Separate indexed queries for open rows and settled account/project/month rows, avoiding (?=0 OR ...); include every open month and checked overflow arithmetic. Sync budget revisions/content hashes idempotently across crashes. Removing month/state predicates must fail the bounded-history assertion. Production token limits require Task 18 calibration, not fixture defaults; cached input remains separate in display.

  • [ ] Commit: feat: account for subscription turns and index period usage.

Task 4: Make Git identity and repository checks part of evidence

Files: Core git_evidence.go, tests, model/evidence/actions/policy; schema mirrors if fields require columns.

Interfaces: GitCandidate{Repository, BaseCommit, Commit, Tree string}, media type application/vnd.equipo.git-candidate+json. RepositoryCheckResult{CandidateHash, Commit, CheckDefinitionHash, BaselineTestSetHash, ObservedTestSetHash string; Outcome CheckOutcome; ExitCode, TestsRun, TestsFailed int; LogHash string}. RoleRepositoryChecks requires CapVerify. Provenance adds observed ModelFamily and the isolation snapshot defined above. Publication JSON includes candidate_hash; head remains Git commit. Read-only Evidence(ctx, scope) (EvidenceReport, error) and ReadyToPublish(ctx, scope); the latter excludes only publication receipt.

  • [ ] Tests: TestGitCandidateIdentity, TestBugNeedsRepositoryChecks, TestReviewDifferentFamily, TestChangedCandidateInvalidatesEvidence: SHA-256 artifact digest hashes canonical payload bytes, differs from commit; base reproduction references base commit, candidate reproduction/review reference artifact hash; publication matches both. Reproduction/review without repository checks fails. Same family across profiles/providers or unknown family fails; different family plus distinct producer/session passes. New candidate invalidates review/checks. Compile failure, skip/no tests, zero exit without measured tests, wrong definition or malformed hash fails. Isolation provenance must survive new evidence and candidate lineage.
  • [ ] Red/green: go test ./internal/equipo/team -run 'TestGitCandidate|TestBugNeeds|TestReviewDifferent|TestChangedCandidate' -count=1; green also go test ./internal/equipo/team -run 'TestFixture|TestReview|TestEvidence|TestConclude' -count=1.
  • [ ] Implement: Preserve v1 byte-subject semantics; v2 bugs require typed candidate and both checks. Validate publication repository/ref/commit/hash at Intend and Admit. ReadyToPublish never terminates; Conclude waits for contained final workflow. Family/isolation come from runner-observed session, not review JSON. Support exact lowercase SHA-1/SHA-256 object lengths; reject other formats. Mutate identity, repository-check and family guards independently.
  • [ ] Commit: feat: require Git-bound checks and independent model families.

Task 5: Enrol and revoke machines with scoped credentials

Files: App enrolment/runners, protocol types/validation, routing/copy keys; migration 0010; internal/equipotest/enrolment_test.go.

Interfaces: Runner{ID, Person, MachineKeyHash, Label string; Revision int64; RevokedAt *time.Time}; RunnerPrincipal{RunnerID, Person, CredentialID string}. Store methods BeginEnrolment(ctx, machinePublicKey, label) (DeviceCode, error), ApproveEnrolment(ctx, actor, userCode) error, ExchangeEnrolment(ctx, deviceSecret, proof) (RunnerCredential, error), AuthenticateRunner(ctx, token) (RunnerPrincipal, error), RevokeRunner(ctx, actor, runnerID, revision) error. DTOs carry expiry/poll interval, no provider secrets.

  • [ ] Tests: TestEnrolmentAudience, TestEnrolmentSingleUse, TestRunnerRemovalRevokes, TestEnrolmentCSRFAndRate: device grant only polls/exchanges; bearer cannot approve/access browser UI; cookie cannot authenticate runner API. Approver determines person. Ten-minute expiry, minimum five-second poll, one-use approval, required Ed25519 proof over enrolment ID/challenge/exchange nonce. Lost successful exchange needs new browser-approved enrolment; consumed code cannot mint/recover bearer. Owner can revoke unused runner. Removal/revoke denies next request and pending poll delivery; DB error denies; secrets absent from logs/audit/HTML.
  • [ ] Red/green: go test ./internal/equipotest -run 'TestEnrolment|TestRunnerRemoval' -count=1; green also migration check. Mutate audience/current-membership gates with successful approval/claim controls.
  • [ ] Implement: POST /api/enrolments, /api/enrolments/token; session/CSRF GET/POST /runners/enrol; POST /runners/{id}/revoke. 256-bit device/bearer secrets, hashes only, explicit audience/instance/person/machine binding. Ten unambiguous base32 user-code characters; creation/approval rate limits. Thirty-day bearer expiry, rotation overlap at most five minutes, no revival after revoke. No encrypted exchange response/replay endpoint. Approval displays machine label/key fingerprint and real origin. Runner copy comes through an accessor to copy.go.
  • [ ] Commit: feat: enrol person-bound runners with separate credentials.

Task 6: Discover and select personal connections

Files: App connections, migration 0011, internal/equipotest/connections_test.go; selection handlers later rendered in Task 16. Runner discovery belongs to Task 17.

Interfaces: ConnectionReport{LocalID, Provider, ProviderVersion, PaseoVersion, Family, Model, AccountLabel, Kind, UnavailableReason, IsolationConfigHash string; Available, ReadIsolation, AllowanceKnown bool; AllowanceRemaining int64}. Stable connection/profile identity may expose multiple models. Connection{ID, RunnerID, Person, LocalID string; Revision int64; LastSeen time.Time}; ConnectionChoice{ProjectID, Revision int64; ConnectionIDs []string; PinnedID string}. Store ReportConnections(ctx, principal, reports) error, SaveConnectionChoice(ctx, actor, choice) error, SelectConnection(ctx, person, projectID, specialist, excludedFamily) (Selection, error). Task service supplies person/project, never forms. Selection carries connection/runner/provider/family/model/account/revision, reason pinned or first_allowed, and isolation snapshot. Add owner-only AcknowledgeUnconfined(ctx, actor, connectionID, expectedRevision) error and RevokeIsolationAcknowledgement with the same binding.

  • [ ] Tests: TestConnectionsBelongToPersonAndMachine, TestConnectionSelection, TestReviewWaitsForOtherFamily, TestAccountFailoverSelection, TestProjectAccountNoDeleteAndASCIILabels. Same account label across people never shares selection/credentials. Require personal opt-in; same-runner two-family preflight before build. Missing pin waits; stable fallback orders connection ID then model ID and respects fixed specialist model/concurrency. TestAccountFailoverSelection uses seeded reports and instance selection only: reject an observed account/family mismatch against the saved binding, refuse an unavailable pinned account without selecting a replacement, and reject a report that cannot guarantee no-failover. Task 17 owns TestAccountFailoverStops for actual pre-prompt observation, mid-step failover containment and reassignment ordering. Task 6 neither starts a supervisor nor asserts physical containment. DELETE routes fail without record/audit changes; ASCII duplicates conflict, existing non-ASCII behavior stays.

TestUnconfinedConnectionRequiresAcknowledgement: no ack/member/forged owner/wrong connection fails instance eligibility for creation and dispatch; valid current-owner ack permits only eligible Codex, with personal opt-in and all other capabilities. A forged Codex ReadIsolation=true report for an unlisted tuple is persisted as unconfined, still requires acknowledgement and produces labelled selection provenance. Assert this using seeded reports, without runner execution. TestIsolationAcknowledgementLapses: provider/observed daemon server upgrade, changed config/revision, revocation, or removal/demotion of the acknowledging owner invalidates the stored acknowledgement and denies instance eligibility. Lapse uses the observed tuple even if the report claims confinement. Cover all team projects and roster lookup failure. Task 8 adds stale claim/admission-ticket assertions and Task 17 adds live create/turn refusal; Claude never takes this exception. Assert who/when/connection/provider/versions in audit and no credentials.

  • [ ] Red/green: go test ./internal/equipotest -run 'TestConnections|TestConnectionSelection|TestReviewWaits|TestAccountFailoverSelection|TestProjectAccountNoDeleteAndASCIILabels|TestUnconfinedConnection|TestIsolationAcknowledgement' -count=1; green also migration check. Mutate person/pin/family/owner/version filters.
  • [ ] Implement: Reports only cover profiles allowed by an operator-maintained, credential-free runner account-binding file. Enrolment does not claim every shared-daemon profile; email labels do not prove ownership. Supported routing must pin credential home, observe actual account and disable failover before prompting. Never change daemon defaults. Reports stale after 90 seconds without heartbeat. Unknown allowance stays unknown alongside counted Equipo usage. Revocation disables admission and requests containment. Persist acknowledgement and audit transactionally per the ruling. Normalize reported isolation against the instance build’s verified tuple list before storing reports or selecting a connection. An unlisted tuple stays unconfined despite a reported true; missing preflight still denies confinement for a listed tuple.
  • [ ] Commit: feat: select allowed connections for each person's tasks.

Task 7: Create bug tasks and prepare their fixed plan

Files: App tasks/taskprepare, migration 0012, `internal/equipotest/taskstest.go; core jobs/store, jobretrytest.go`.

Interfaces: Task{ID, Requester, Description, RequestID string; ProjectID, Revision int64; JobID JobID; State, WaitCode, BaseCommit, ReviewRef, CheckDefinitionHash string}. CreateBug(ctx, actor, projectID, description, requestID) (Task, error); PrepareBug(ctx, principal, taskID, expectedRevision, PreparedBug) (Task, error). PreparedBug contains repository/default observation/base/check-definition bytes/hash. BugPreparer.Prepare(ctx, TargetBinding) (PreparedBug, error) is fake here. JobSpec.RequestKey is unique by account/requester/key with canonical input hash; same input returns original, mismatch ErrConflict. Pure BugJobSpec(task, project, policy, expectedSymptom) (JobSpec, error) derives Project/GrantRef together.

  • [ ] Tests: TestBugFormCannotChooseAuthority, TestBugSubmissionRetry, TestBugPreparationCrash, TestFixedBugPlan, TestJobRequestKey: accept only project/description/request ID; reject forged requester/repository/grant/budget/ref/kind. Only current owner or project's work owner starts; members read. Duplicate request yields one task/job; changed payload conflicts. Crash between job creation/app linking recovers same job. Project/connection revision change invalidates preparation. Five execution steps plus one app human step.
  • [ ] Red/green: go test ./internal/equipotest ./internal/equipo/team -run 'TestBug|TestFixedBug|TestJobRequestKey' -count=1; green also migration check and crashes around each outbox acknowledgement.
  • [ ] Implement: Description 1–16,384 UTF-8 bytes. Transaction writes task/outbox/audit before network. Server fixes equipo/<task-id> ref and immutable base. After authority/budget checks build reproduce/CapReproduce → implement/CapImplement → review/CapReview → verify/CapVerify → publish/CapPublish. Display Engineering reproduce/fix, Review review/checks, person merge; publish is runner-only and merge never executes in core. Fresh workspace per attempt.

FreezeBugEvidence(ctx, scope, handle, expectedSymptom, definitionHash, reproductionHash) error requires current revision/CapReproduce, registered reproduction from that attempt, and no candidate. Initial symptom is validated description until freeze. Add FrozenReproductionHash to EvidenceRequirement; later registrations must match. Freeze symptom/definition/reproduction before implementation; executor alone attests base/candidate/checks, and reproduce completion requires matching frozen hash/symptom/base failure. Task 15 adds real assignment/fetch integration, without introducing plan editing.

  • [ ] Commit: feat: create idempotent bug tasks with a fixed review plan.

Task 8: Expose fenced outbound runner work

Files: App runnerapi/execution; core actions/store, `admitretrytest.go; protocol; migration 0013; internal/equipotest/runnerapi_test.go`.

Interfaces: AdmitOnce(ctx, scope, handle, actionID, requestID) (AdmissionTicket, error) preserves legacy Admit; ticket has Dispatch, ExpiresAt, Incarnation. Assignment{ID, TaskID, StepKey, WorkspaceKey string; Scope Scope; Selection Selection; Revision int64; Kind string} (prepare, step). Brief carries target/instructions/standing instructions/selection/policy/artifact hashes; ConfirmedPreferences empty. ClaimRequest carries assignment/revision; response scope/handle/brief/lease deadline/cleanup token. Execution owns stores/reconciliation adapters and Poll(ctx, principal, after) ([]Assignment, error), Claim(ctx, principal, request) (ClaimResponse, error), Sync(ctx) error. Post-claim requests carry scope, handle, request ID, protocol version.

  • [ ] Tests: TestRunnerCannotClaimOthersWork, TestRunnerFenceEveryMutation, TestRunnerLongPollRechecksRoster, TestSpecialistConcurrency, TestDispatchAdmissionExpires, TestAdmitLostReplyRetry, TestRevokedCleanupCannotRefund, TestTaintedRunnerProvenance, TestUnconfinedContainmentRotatesTokens. Lost reply retries return identical stored ticket, charge/event/deadline unchanged, including crash immediately after commit. Changed payload/binding conflicts; expired/cancelled/revoked/grant-changed/budget-reduced/incarnation-changed replay denies. Racing runners yield one handle. Wrong person/machine/connection/fence denies every mutation/answer. Revoke while polling returns no assignment. Specialist limit one holds across jobs despite core concurrency two. Five-second stale admission cannot execute. Authority/DB error never becomes assignment or zero status. Forged zero cleanup receipt retains full charge. Extend TestIsolationAcknowledgementLapses with stale claim/admission tickets after owner removal/demotion or observed tuple changes. TestTaintedRunnerProvenance uses seeded active assignments and fake validators to enable acknowledged Codex while a confined Claude task runs concurrently: both tasks’ steps and evidence are labelled, including already-running work. TestUnconfinedContainmentRotatesTokens uses seeded attempts and a fake containment validator: each accepted unconfined containment rotates the bearer and all cleanup tokens, old tokens fail, retries do not rotate twice, and revocation cannot be revived. Physical containment integration waits for Tasks 15/17.
  • [ ] Red/green: go test ./internal/equipotest ./internal/equipo/team -run 'TestRunnerCannot|TestRunnerFence|TestRunnerLong|TestSpecialistConcurrency|TestDispatchAdmission|TestAdmitLostReplyRetry|TestRevokedCleanupCannotRefund|TestTaintedRunnerProvenance|TestUnconfinedContainmentRotatesTokens|TestIsolationAcknowledgementLapses' -count=1; green also migration check and per-endpoint binding mutations.
  • [ ] Implement: Persist admission request identity/dispatch/deadline/incarnation atomically with intent→dispatching. Retry revalidates authority/handle/budget/expiry, the observed tuple against the build’s list, isolation acknowledgement and runner taint. Instance-derived taint overrides any submitted confined provenance at every step/evidence/publication boundary. Runner journals request ID and consumes ticket once. Reserve assignment/specialist slot atomically; reconcile Claim crashes before effects.

POST /api/runner/v1/poll waits at most 25 seconds outside transactions. POST suffixes /claim, /renew, /prepare, /events, /artifacts, /intend, /admit, /receipts, /lost, /complete, /release, /stop, /contained, /connections, /heartbeat; scoped artifact GET. Stored assignment/auth determines runner/person/account; handle alone grants nothing. Renew every 15 seconds; delivery includes incarnation/5-second deadline. Reject version mismatch. Bounds: action JSON 64 KiB, event 16 KiB, artifact 1 MiB.

Historical receipt/containment reporting after cancel permits only exact known bindings. Each claim creates audience cleanup, retained locally at most 30 days; after revocation usable only for receipts/lost/contained, never new actions/permissions/evidence. Treat cleanup-only reports as untrusted observations: cannot reduce reserved or observed token/time high-water, cheaply settle unknown action or grant success. Keep charges open; corroborated owner-audited settlement may lower them. Separately validated process proof can release concurrency, not refund charges. Route tests use explicit fake validators until Task 15. After each verified unconfined containment, atomically replace the runner bearer and cleanup-token hashes, including tokens for concurrent attempts; invalidate old tokens without the normal overlap. Bind replacements to the existing scopes, fences, audiences and remaining lifetimes. Journal and atomically persist replacement credentials before further admission; failed or uncertain rotation blocks admission pending reconciliation. Cleanup for a revoked runner remains cleanup-only and cannot mint a live bearer. Preserve unknown charges and historical labels through rotation.

  • [ ] Commit: feat: serve scoped runner assignments and fenced reports.

Task 9: Build the version-pinned structured Paseo adapter

Files: internal/runner/paseo/{client,types,client_test}.go, sanitized testdata; runner/paseo/{package.json,package-lock.json,bridge.mjs,bridge.test.mjs}; Make runner-adapter-test and delegating CI step.

Interfaces: paseo.Client: Preflight(selection, ReadPolicy), CreateWorkspace(WorkspaceRequest), CreateAgent(AgentRequest), Subscribe(Agent, Cursor), Send(Agent, message, messageID), Respond(Agent, PermissionResponse), Stop(Agent), Archive(Agent), ArchiveWorkspace(Workspace). All accept context and return errors with their typed results. Subscription exposes Ready error channel, Events channel, Close. Agent retains server/agent/provider-session/workspace/account/provider/model/family IDs; Workspace server/project/workspace IDs and absolute path; Cursor epoch/sequence. AgentRequest{Workspace; Selection; IdempotencyKey, ModeID string; ReadPolicy; Env map[string]string; ProviderOptions json.RawMessage; MCPServers map[string]MCPServer} has no initial prompt. MCPServer explicitly serializes stdio type/command/args/env; reject other types for Equipo tools.

Capabilities retain Version, AccountPinning, ObservedAccount, RecoverableTimeline, ProcessOwnership, MCPAtCreate, ReadIsolation, ReadIsolationReason and IsolationConfigHash. ReadPolicy{DeniedPaths []string; ConfigHash string} is trusted canonical configuration. Event retains kind/server/agent/session/turn/permission/epoch/sequence and raw bounded payload. Preflight reports the observed provider version, daemon server version and effective config hash. Evaluate ReadIsolation against the build-verified tuple list as well as effective policy; neither a true runner flag nor pinned client packages prove confinement. Preflight is per selection/policy; ProcessOwnership is combined with Task 15 inspector coverage, never inferred from Paseo status.

  • [ ] Tests: TestPaseoAdapterContract, TestSubscriptionReadyBeforePrompt, TestPaseoUnsupportedCapabilities; Node cases structured events, permission IDs, MCP at creation, workspace identity, unknown version, read isolation required, provider option schema, cancelAgent export, daemon credentials. Replay structured probe events/questions/usage; reject human logs. No Send before Ready; preserve workspace/session IDs and permission IDs. Missing required capability denies with reason. Read-isolation case checks Claude refusal until its exact sentinel-passed tuple is listed, an unlisted forged-true Codex report taking the explicit acknowledgement/label route, and daemon/client version mismatch using the observed daemon version. Never treat this as a globally successful preflight.
  • [ ] Red/green: go test ./internal/runner/paseo -run 'TestPaseo|TestSubscriptionReady' -count=1; node --test runner/paseo/bridge.test.mjs. Green through make runner-adapter-test, which checks Node/npm and runs locked npm ci. Add it to ci and .amadan/ci.d/; no missing-Node skip. Mutate readiness and permission forwarding.
  • [ ] Implement: Pin client/protocol/server exactly 0.14.0, including transitive lock. Go supervises Node bridge; bounded stdin/stdout frames carry request IDs, redacted stderr diagnostics. Only configured local daemon, no start/stop, remote routing or plugin installation.

| Operation | Pinned exported surface | |---|---| | Connect | createHostClient from @getpaseo/client/node; readDaemonInstance, readLocalCredentialForTarget, resolvePaseoHome from @getpaseo/server/daemon-control; endpoint helpers from protocol daemon-endpoints; await connect promise. | | Workspace/agent | DaemonClient.createWorkspace/createAgent from exported @getpaseo/client/internal/daemon-client; retain idempotencyKey/workspaceId/env/modeId/providerOptions/MCP type. Load/contract-test this pinned internal export. | | Observe | fetchAgentTimeline, subscribeAgentTimeline, subscribe for controls; unsubscribe on close. | | Prompt/answer | sendMessage with message identity; respondToPermission with original request ID. | | Cleanup | cancelAgent, archiveAgent, archiveWorkspace; cancellation alone is not containment. listTerminals/killTerminal use exact workspace-owned IDs. |

Daemon credentials go only to the bridge connection, never agent/MCP env or logs. ProviderOptions come only from trusted policy. Persist creation intent first; recover by SDK idempotency/observed identity or remain uncertain without replacement. CLI JSON is limited to bounded discovery/workspace fixtures with separate stdout/stderr and strict decoding. Unknown versions/contracts need upstream capability support.

Installed ZeroSub 1.3.0 exposes zerosub.state and zerosub.agents.account but automatically reassigns exhausted/disabled portable accounts. It does not prove no-failover. Name/pin a supported per-agent binding, pre-prompt account observation and no-failover interface before eligibility; never invent createAgent AccountID or change shared defaults. Codex acknowledgement waives none of this. Implement both current isolation paths and the future profile restoration seam defined above; unsupported settings cannot be smuggled through live tests.

  • [ ] Commit: feat: drive Paseo through a pinned structured client.

Task 10: Create credential-free workspaces from exact revisions

Files: internal/runner/workspace/{workspace,workspace_test}.go, test-generated small Git repos; protocol/Paseo types.

Interfaces: Manager uses paseo.Client and runner forge-read access: Prepare(target) → PreparedBug; Create(assignment, brief) → Workspace; CaptureCandidate(workspace, target) → GitCandidate; ExportCandidate(candidate, destination) → error. WorkspaceRequest carries exact base, review branch, unique attempt key, isolation worktree.

  • [ ] Tests: TestWorkspacePinsBase, TestWorkspaceHasNoCredentials, TestCandidateCaptureCleanAndImmutable, TestWorkspaceRetryIdentity, TestReadIsolationRequired. Moving default does not change base. Dirty tracked/untracked files, symlink escape, wrong repo/ref refuse capture; commit descends from base and tree matches. Poison hooks/config/URL rewrites/helpers never execute; bearer absent from agent env/config/logs. New attempts never reuse workspaces; creation retry resolves same identity or uncertainty. Denied subtree/alias or changed policy refuses creation; missing ReadIsolation requires the exact valid Codex acknowledgement, never bypasses Claude's gate.
  • [ ] Red/green: go test ./internal/runner/workspace -run 'TestWorkspace|TestCandidateCapture|TestReadIsolationRequired' -count=1. Use local disposable remotes and credential sentinels; remove repos.
  • [ ] Implement: Private project clone fetched from saved canonical repository by credential-scoped runner subprocess. No credentials in URLs/argv/shared config or inherited agent environment. Give Paseo a credential-free source clone; disable system/global Git config, hooks and credential helpers for agents/checks; validate args/paths without shell interpolation. Read-policy preflight and acknowledgement checks precede every turn. Same-user harness confinement is not OS-user isolation; acknowledged Codex reads remain explicitly unconfined.

Reproduction/implementation use fresh base workspaces; implementation receives frozen reproduction. Capture immutable local Git objects into runner-owned staging before builder cleanup. Fresh review/check checkouts consume staging, not builder workspace or conversation. No pre-review push, bundle or cross-machine transfer. Task 11 validates evidence paths/hashes; this task injects prepared-definition fixtures, avoiding an executor dependency.

  • [ ] Commit: feat: isolate task workspaces and capture exact Git candidates.

Task 11: Freeze reproductions and run trusted checks

Files: internal/runner/checks/{executor,definition,goresults,sandbox}.go and tests; app artifacts, migration 0014; internal/equipotest/artifacts_test.go; protocol.

Interfaces: Definition has version/repository/base, Commands, Reproduction command, Baseline {Names []TestIdentity; Hash string}; identity is package/name. Command has argv/dir/parser/timeout seconds. Reproduction has expected symptom, files {Path; Bytes}, test names. CaptureBaseline(def) → TestBaseline; ParseDefinition(bytes, repo, base) → Definition; Executor.Reproduce(def, repro, subjectCommit, candidateHash) → CheckResult; RepositoryChecks(def, candidate, candidateHash) → RepositoryCheckResult. CommandSandbox.Run(command, workspace, ReadPolicy, stdout, stderr) returns exit/error. Store PutBlob(principal, scope, handle, digest, bytes), Blob(principal, scope, digest); Register remains core artifact boundary.

  • [ ] Tests: TestFrozenReproduction, TestTrustedBaseCheckDefinitions, TestExecutorEvidenceOutcomes, TestArtifactScopeAndLimits, TestReproductionOverlayCollision, TestRepositoryTestSetSuperset, TestRepositoryDeletedTestFile, TestRepositoryTSkipRejected, TestCheckSandboxDeniedPaths. Changed frozen bytes/hash/commands fail. Base failure matches symptom with positive run/fail counts; candidate passes identical frozen tests. Compile failure, skips, zero tests, incomplete JSON, timeout, truncated-before-parsing output or zero-exit without tests fails. Reject traversal/absolute/symlink/duplicate paths, corruption, wrong base and oversized blobs. Candidate must pass baseline package/test/subtest set plus reproduction under identical tags/platform; renamed/deleted tests, skipped packages/subtests and t.Skip fail; extra passing tests are allowed. Agents cannot submit executor-attested results. Assert base SubjectHash is base commit, candidate SubjectHash is artifact hash. TestExecutorEvidenceOutcomes also requires unconfined on every executor result from a tainted runner, even for a concurrent confined connection; stripping taint fails registration.
  • [ ] Red/green: go test ./internal/runner/checks ./internal/equipotest -run 'TestFrozen|TestTrusted|TestExecutor|TestArtifact|TestReproductionOverlay|TestRepositoryTest|TestRepositoryDeleted|TestRepositoryTSkip|TestCheckSandboxDeniedPaths' -count=1; green also migration check. Use actual small Go fixtures; mutate definition/symptom/count/hash guards.
  • [ ] Implement: Read base .equipo/checks.json v1; go-test-json measures tests, exit only non-test gates. Base .amadan/ci.d/ or .amadan/ci needs an explicit reviewed Go adapter preserving structured results; otherwise wait for setup. Freeze manifest and transitive scripts/Makefiles. Baseline includes required names/hash; result includes observed names/hash. Known failing bug test may be baseline; incomplete discovery/build failure is setup failure.

Repository checks run trusted material against a fresh immutable-export copy; reproduction runs separate scratch base/candidate copies. Overlay only test files; existing path must equal recorded base bytes or frozen bytes. Candidate-edited collision refuses, never overwrites the fix. Record subject commit/overlay hash/collision checks and delete scratch. Candidate runs require nonempty verified candidateHash; base uses empty candidateHash and base commit subject. At least one measured test command and every required repository gate must succeed. Task 15 combines immutable fetch and CaptureBaseline before final PreparedBug.CheckDefinitionHash.

Production CommandSandbox is pinned command-only codex sandbox -P equipo-checks with explicit runner-built filesystem denies, required runtime/workspace reads, minimal env and no credentials. This named-profile CLI support is independent of Paseo agent support; owner acknowledgement cannot relax the executor’s command sandbox. Its sandbox pass does not confer confined evidence identity on a tainted runner; persist runner-wide unconfined provenance on reproduction and repository-check results. Per-path sentinel tests and readable workspace control are mandatory, with no unsandboxed fallback. Record configured Codex binary/version. Supervise process groups; command timeout ≤1,200 seconds and remaining attempt time. Parse incrementally before retaining 64 KiB per output stream. Freeze RoleReproduction before base completion/implementation. Blobs are immutable hash-verified activation-DB rows: ≤1 MiB each, ≤128 MiB uploaded/attempt. Reject larger work, no chunking or referenced-evidence GC.

  • [ ] Commit: feat: execute frozen reproductions and base-pinned checks.

Task 12: Persist events and usage across reconnects

Files: Runner journal/events/usage and tests; app runnerevents, migration 0015; `internal/equipotest/runnerevents_test.go`.

Interfaces: OpenJournal(path) → Journal; Append(Event), Pending(limit), Ack(eventID), Close. Event retains ID/task/server/agent/session/epoch/kind/turn/sequence/scope/handle/payload/source time. IngestRunnerEvent(principal, event). UsageAccumulator.Observe(paseo.Event) returns settled *team.Usage only for verified complete turns; field-known flags are separate from numeric zero.

  • [ ] Tests: TestRunnerEventReplay, TestTimelineEpochReplacement, TestUsageCumulativeAndMissing, TestRunnerJournalCrashBoundaries, TestBufferFullStopsWork. Crash before append, after append/before upload, after server commit/before ACK: no duplicate effects/charge; changed duplicate payload conflicts. Refetch before following live; deduplicate server/agent/session/epoch/sequence, controls by stable event/turn/request ID. Epoch replacement rebuilds projection without deleting accounting. Cumulative 0.0673131 then 0.0758928 must not be summed. Missing usage stays nil; later zero LastUsage cannot erase completed evidence. Full disk/outbox stops admission and contains.
  • [ ] Red/green: go test ./internal/runner ./internal/equipotest -run 'TestRunnerEvent|TestTimelineEpoch|TestUsageCumulative|TestRunnerJournal|TestBufferFull' -count=1; green also migration check, reopen both databases, mutate dedup/epoch/nil handling.
  • [ ] Implement: Persistent private SQLite journal; fsync creation/dispatch IDs before effects, append events before local workflow ACK. Instance inbox/projection/audit transactionally; acknowledge only after idempotent core acceptance. Unique artifact registration request keys prevent semantic duplicates. Timeline gaps with unknown outcomes block dispatch; explicitly completed turn with missing usage follows Task 3 headroom rule. Idle/queued/prose never proves completion.

Versioned normalization uses TokenUsage{UncachedInput, CachedInput, Output int64; UncachedKnown, CachedKnown, OutputKnown bool}. Core InputTokens sums uncached+cached once with overflow checks; subtract cache from inclusive provider totals or add to exclusive totals; normalize cache writes once. Untested cumulative semantics remain unknown. Estimated subscription cost is display-only. Late completed observations may settle known actions without changing cancellation. Persist isolation labels through replay/replacement. Buffer ≤128 MiB unacknowledged events; reconnect backoff 1–30 seconds plus jitter never extends monotonic lease. Redact secrets; logs download as escaped text.

  • [ ] Commit: feat: persist runner events and reconcile measured usage.

Task 13: Relay questions and permissions with scoped tools

Files: Runner questions/tools/toolsocket and tests; minimal `cmd/equipo-runner/{main,maintest}.go; app questions, migration 0016; internal/equipotest/questions_test.go`; protocol/copy.

Interfaces: Question retains ID/task/agent/session/permission/kind/attempt/fence/revision/raw bounded request/AnsweredBy. AnswerQuestion(actor, questionID, revision, answer); DeliverAnswer(client, agent, question, answer). PermissionResponse retains PermissionID, Behavior, UpdatedInput. ServeTools(input, output, socketPath, capabilityPath) speaks harness stdio MCP and forwards typed socket requests; ServeAttemptSocket(socketPath, ToolBinding). Binding includes instance/task/attempt/fence/tool names/current lease/journal request IDs; validate every call, capability expires with lease.

  • [ ] Tests: TestQuestionPermissionID, TestQuestionStaleAnswer, TestQuestionBrowserAuthority, TestAgentToolScope, TestToolVerbUnderFakeHarness, TestToolSocketIsolation. AskUserQuestion answers use Respond with original ID/updated answers, never Send; conversational follow-up explicitly uses Send. Cancel/restart/replaced permission invalidates answer. Exact replay has one effect, changed replay conflicts. Only current requester/current owner answers; injection cannot widen tools. No cross-task reads, publish, check attestation, budget edits or runner API authority. Fake harness spawns real equipo-runner tool with creation MCP config, initializes and submits over stdio; runner sees one socket request. Reject wrong attempt, expired lease/fence, changed request payload, malformed/oversized frame, missing file/disconnected socket. Capability sentinel absent from argv/logs.
  • [ ] Red/green: go test ./internal/runner ./internal/equipotest -run 'TestQuestion|TestAgentTool|TestToolVerb|TestToolSocket' -count=1; green also migration check. Build real tool binary under $TMPDIR, test and remove it. Mutate Respond→Send. Use sanitized Claude/Codex fixtures; unsupported shapes remain pending until live proof.
  • [ ] Implement: POST /tasks/{id}/questions/{question}/answer uses session Actor/current roster/revision/CSRF. Persist full bounded sanitized permission input; outbound authenticated answer polling. Errors/unknown formats never imply approval. Creation tools are submitreproduction, submitcandidate, submitreview, askperson, narrowed by capability; typed submissions are validated by runner, which derives session/isolation provenance. No coordinator/settlement tools.

Create 0700 <StateDir>/attempts/<opaque-id>/, private socket and atomic 0600 capability file. MCP uses fixed executable, args ["tool"], type stdio, env paths EQUIPOTOOLSOCKET/EQUIPOTOOLCAPABILITY_FILE and nonsecret attempt marker only. Capability bytes never enter argv/agent env/prompt/config/logs. Trusted tool opens without symlink following, checks owner/mode, authenticates each bounded request; runner also checks peer UID, which alone grants nothing. Durable request-ID dedup precedes ACK. Check socket path length before creation. Invalidate on fence/lease change; remove socket/file after containment; recreation requires fresh authority. Claude must be denied state-directory reads; acknowledged Codex carries the explicit unconfined risk, not a false unreadability assertion. Follow-up turns need fresh budget admissions; permission answers cannot launch hidden turns. Expired waits release/contain and invalidate permission ID.

  • [ ] Commit: feat: relay fenced questions and permission responses.

Task 14: Publish only the verified review commit

Files: Runner forge implementation/tests; app runneradapters, `internal/equipotest/publishtest.go`; protocol tickets/receipt lookup/description provenance.

Interfaces: forge.Publisher implements team.Adapter Classify/Execute/Reconcile. Payload repository/ref/head/candidate_hash from Task 4 plus immutable description/provenance digest. DispatchTicket includes Dispatch/Scope/Handle/Incarnation/ExpiresAt, issued by Admit. Instance adapters reconcile durable runner observations; Execute refuses instance-local effects. Provider actions are unsafe to replay without proof; forge publication is reconcilable.

  • [ ] Tests: TestPublishQualifiedRef, TestPublishExactEvidence, TestPublishLostReceipt, TestPublishCredentialIsolation, TestPublishCancelRace. heads/main maps to refs/heads/heads/main. Saved default, forged repo/ref, tags, changed candidate, stale ticket/wrong runner/missing evidence refuse before Git. Local receive hook sees exact commit. Lost Admit recovers same authorized ticket; duplicate delivery dispatches once. Lost push reply reconciles matching remote commit without second push; mismatch conflicts, query failure stays uncertain. Cancel before dispatch prevents push; after dispatch reconciles in-flight effect without branch deletion. TestPublishExactEvidence also checks runner-wide labels on publication and executor evidence, including a confined task on a tainted runner, description ordering/readback and the incomplete state during any push-to-description window; Task 16 later adds the combined surface test.
  • [ ] Red/green: go test ./internal/runner/forge ./internal/equipotest -run 'TestPublish' -count=1; mutate ref/identity/retry guards; retain core replay/receipt-conflict tests.
  • [ ] Implement: ReadyToPublish before Intend, revalidate at Admit and immediately before Git. Verify deadline/incarnation/target/local immutable objects and isolation lineage. Credential-isolated Git, canonical HTTPS remote, hooks/helpers off, refspec <commit>:refs/heads/<Ref>. First creation uses --force-with-lease=refs/heads/<Ref>: expecting absence; never authorize replacement using an existing old head or unguarded force. Retry accepts only identical existing commit. Durable dispatch precedes Git; exact-target readback recovers receipt with disclosed agent identity; lack of visibility is not proven absence.

Construct review branch description from persisted evidence, listing runner taint and unconfined steps/evidence/connections/provider versions, including executor evidence and confined connections on a tainted runner. Use amadan branch describe with the runner-held agent credential and verify its installed argument/readback contract during implementation. Describe the branch before the push, or atomically with it if Amadan supports that ordering. If Amadan requires the remote ref first and offers no atomic operation, the window is from successful push until description confirmation; the branch can be visible without its label during that window. Persist the pending description before pushing, apply it immediately afterward, and keep publication incomplete/uncertain until readback confirms it. No invented API or person credential. Include description identity in durable reconciliation, so lost replies cannot lose the label or duplicate publication. A pushed ref without confirmed required description is incomplete/uncertain, never delivered success. Default-branch changes/manual merges grant no push authority. Tests use bare local Git plus fake supported description transport.

  • [ ] Commit: feat: publish verified commits to qualified review refs.

Task 15: Drive the workflow and prove containment

Files: Runner supervisor/service/processlinux and tests, journal/protocol; app cancel, `internal/equipotest/canceltest.go`.

Interfaces: Supervisor.Run(claim), Cancel(scope, handle) → ContainmentProof, Recover(). Proof retains attempt/fence/server/agent/workspace/BootID/process identities/CheckedAt/Empty. ProcessIdentity is host PID/start ticks/boot ID. ProcessInspector.Track(owner), Remaining(owner) → ProcessInventory, Stop(identity); owner binds attempt/marker/agent/workspace/executor groups. Inventory contains processes/terminal IDs/CoverageKnown. Production NewLinuxProcessInspector(procRoot, client, journal) is built here. Extend client ListTerminals(workspace)/KillTerminal(exact ID).

  • [ ] Tests: TestRunnerBugWorkflow, TestCancelStopsArchivesThenVerifies, TestCancelSurvivingBackgroundChild, TestRunnerLeaseLoss, TestRunnerRestartDoesNotDuplicate, TestProcessIdentityReuse, TestLinuxInspectorEnvironmentStrippedChild, TestLinuxInspectorUnknownCoverage, TestBugPreparationIntegration; repeat TestBugPreparationCrash with real protocol/local Git. Order stop → archive agent → stop owned checks → archive workspace → verify absence → contain. Surviving child/unknown inventory blocks acknowledgement/reclaim. Namespace PID never signals host; PID reuse must not kill control process. Rollback/suspend exhaust deadline; outage cannot extend authority. Completion-before-containment crash cleans up without new agent.

Production-inspector subprocess fixture: marked parent spawns environment-stripped detached child retaining attempt cwd, then exits. Remaining finds child and refuses Contain; exact-identity stop enables empty proof and dependent claim. A tracked child later changing cwd remains owned. Unreadable same-user /proc, PID reuse/interrupted inventory stays unknown; unrelated controls survive.

  • [ ] Red/green: go test ./internal/runner ./internal/equipotest -run 'TestRunnerBugWorkflow|TestCancel|TestRunnerLease|TestRunnerRestart|TestProcessIdentity|TestLinuxInspector|TestBugPreparationIntegration|TestBugPreparationCrash' -count=1. Green uses fake client with real owned subprocesses; mutate cleanup order/process verification. Retain TestTimeChargeWaitsForContainment, cancellation/late-receipt regressions.
  • [ ] Implement: Wire preparation outbox/assignment/immutable fetch/baseline capture; replace fake validators with Tasks 11–13. Persist transitions/IDs before effects. Reproduce: create scoped agent, Ready, admit/send, freeze, executor verifies expected base failure. Implement: fresh agent returns clean candidate. Review: fresh different family submits verdict on exact candidate. Verify/publish are runner-only. Every model turn gets fresh admission and isolation/ack check; observed session precedes artifacts. Register while handle valid, Complete then archive/verify/Contain before dependents. After each unconfined containment, complete Task 8’s bearer/cleanup-token rotation before further admission; recovery resumes an unfinished rotation without reopening old credentials. Failed review/checks ends fixed run without publication or invented replanning. After all attempts contained, Conclude verifies publication and app waits for merge owner.

Renew every 15 seconds; stop with 10-second margin on 60-second lease using Linux elapsed/boot clock including suspend. Restart treats old authority expired pending instance validation; never reuse cached tickets. Cancel transaction fences/revokes first, reports requested until verified stopped; retain separate in-flight uncertainty. Graceful shutdown drains reports or leaves durable cleanup for service restart.

Set EQUIPOATTEMPTMARKER in agent/executor/tool env, track before first prompt. Scan same-user /proc/<pid>/{stat,environ,cwd} plus boot_id for marker/canonical workspace/descendants; retain known ancestry/groups. Persist PID/start/boot before signals and recheck immediately before each signal. Rescan after archive, include executor groups and exact Paseo terminals, stop owned IDs only. Lost attribution before observation, inaccessible same-user entries, failed terminal list or monitoring gaps mean unknown coverage. Exclude unreadable entries only with known unrelated UID. No broad pkill, guessed PID, other-user kills or daemon shutdown. Missing ownership coverage blocks dispatch; idle/timers never prove absence.

  • [ ] Commit: feat: supervise bug steps and verify cancellation containment.

Task 16: Show live tasks, connections and recovery in the existing shell

Files: App taskviews/taskhandlers/live; templates tasks/task/taskform/taskcard/connections/enrol/recovery and specialist/chrome/index/project/layout; handlers/app/navigation/render/copy/copytest/static/equipo.css; `internal/equipotest/taskpages_test.go`, browser/perf tests. Wire notifier into job-changing services from Tasks 2–15.

Interfaces: Store TaskView(actor, taskID), Journey(actor), SpecialistWork(actor, key). Views contain ordered step cards, questions, selected/actual identity, isolation provenance, usage availability, evidence, cancellation and merge owner. Lists cover all active/waiting and this week's finished tasks, no pagination. Specialist counts/usage retain known flags. Durable app projection/core Events supply reads. Add page Live live.View; keep existing template map and call live.Render(w, r, status, pages[name], "layout", data) for live pages.

  • [ ] Tests: TestTaskPages, TestTaskPagesUnknownCounts, TestTaskFormsCSRFAndRevision, TestTaskLiveRefresh, TestTaskLayoutRules, TestUnconfinedLabelEverySurface. Scriptless form-to-detail, shared-member reads/current-actor writes, real counts across five specialists/rail, family wait, distinct requested/stopped, escaped descriptions/questions/refs/logs. Count errors return unavailable/503, never zero. Chips beside cards use category/action/model/account and non-color state, no task table/percentages/initials/accent borders. Test literal unconfined in card, each affected Journey chip, task detail/evidence and published description; confined controls on runners with no taint have no false label, while concurrent confined tasks and executor evidence on a tainted runner are labelled, and replay/restart/expiry cannot strip history. Include a forged Codex confined report for an unlisted tuple: acknowledgement is still required and every affected surface still says unconfined.

TestTaskLiveRefresh covers Journey, all specialists and detail: authorized job notification refetches regions from the same URL/handler; forged other-team/job topics deny and other-team writes cause no wake. Removed member/DB error denies next fragment and stream reconnect. Rollback causes no notification; every committed job-changing path notifies after data is readable. Cover task detail before a job exists following the team collection and switching to the job topic after preparation, new job/list membership, completion/weekly expiry, restart boot ID, write-during-render, unknown counts, and scripts-off full GET. No meta-refresh/custom event feed. Browser editing/focus survives updates.

  • [ ] Red/green: go test ./internal/equipotest -run 'TestTaskPages|TestTaskForms|TestTaskLive|TestTaskLayout|TestUnconfinedLabelEverySurface|TestReleaseCopyReviewed' -count=1. Browser go test -tags browser ./internal/equipotest -run TestRunnerTaskBrowserWalk -count=1, plus EQUIPO_BROWSER_NO_JS=1 variant, widths 1280/390. Test long names, keyboard/focus and overflow; inspect normal motion. Add every new private GET to TestPerfScreens with sign-in/setup; explicitly exclude streams, long-poll and downloads; make perf.
  • [ ] Implement live: One live.New(live.Config{Path: "/live", Topics: ..., Lifetime: 30*time.Second}) hub per app. Middleware precedes all handler reads. Mount Handler only when hub exists, behind existing requireMember; topic Allow also validates current roster and stored team/job association, denying lookup errors. Wire Options.Live for shutdown; embedded test servers close hub before Shutdown. Allow runs at stream open, so the 30-second lifetime bounds stale open-stream notices; every fragment read independently rechecks current authority immediately.

Topic name jobs; key is 64-character lowercase SHA-256 of canonical typed (teamID, jobID) tuple, within live's single-key grammar. Never concatenate raw IDs with another slash. Team collection uses a distinct typed (teamID, collection) key; job creation/preparation without JobID wakes that collection. Task detail with no JobID subscribes to the team collection; once preparation creates a job, the next render subscribes to that job. Journey/specialist list regions subscribe to their team's collection, avoiding live's 64-topic limit with unpaginated lists. For Allow, build the hash-to-job lookup from persisted task/job rows and their stored Team.ID association, computing the same canonical hashes for the current member’s team; derive its collection key from that stored Team.ID. Resolve the requested hash through this lookup and recheck membership/association, denying missing mappings or query errors. Never derive team authority from caller-supplied IDs. Every job mutation notifies exact job plus team collection after commit in the same service path: preparation/assignments, leases/state, events/usage/evidence, questions/answers, cancel/contain, publication/merge acknowledgement, recovery and connection/ack changes affecting jobs. Inject a notifier into shared write services; deduplicate touched keys, publish nothing on rollback. Schedule weekly-window/staleness changes with NotifyAt and reconstruct schedules at boot. No global unkeyed wakeups.

Templates define stable region:<name> wrappers/IDs using hub.View(r).Attrs(...); Head uses framework translated paused/unconfirmed keys. These framework-owned live strings remain in Rastrillo locale packs, exempt from the app-owned copy.go inventory and release-copy gate. Include always-present region:notice. Render only through full-page handlers/checks; live.Render handles no-store/Vary, fragment status/headers and navigation. Take flash only when its data callback says takeFlash; never drain it on background refresh. Use vendored live.js from Task 0, no handwritten EventSource/fragment engine. Keep answer/edit forms on separate ordinary pages and all links/forms functional without scripts. Scriptless pages reflect state at load; no timed whole-page refresh.

Rastrillo v0.30.0 live docs exclude hibernating routes: enable hub only for an explicitly always-on deployment. On a hibernating instance use nil hub/static pages; do not silently prevent sleep. Task 18's live UI acceptance uses always-on configuration; Task 17's hibernation/witness tests retain the static mode.

  • [ ] Implement pages/copy: GET /tasks/new, POST /tasks, GET /tasks/{id}, POST cancel/acknowledge-merge; replace Journey/Needs you/Connections/specialist activity. Owner recovery GET/POST /settings/recovery[/release]; personal project choice POST /projects/{id}/connections; owner-only POST /connections/{id}/acknowledge-unconfined and /revoke-isolation-acknowledgement. Show connection/provider versions and explicit acknowledgement meaning; retain personal opt-in separately. Merge acknowledgement requires current saved merge owner/revision/person-supplied Amadan reference; owners cannot impersonate them. Statuses 303/422/409/403/503 through copy keys.

Journey groups needs-person/in-progress/queued/finished-week with failure/cancel labels; Needs you is current person's questions/merge steps. Keep specialist settings, real checked account/project totals, one aria-current and phone back links. Conversation is a form/card entry point, no coordinator claims.

Inventory runtime copy before writing it: forms, waits/errors, permission/evidence/usage/isolation/accessibility and CLI/service diagnostics. Include task.wait.family, task.wait.setup, task.cancel.requested, task.cancel.stopped, usage.counted_turns, usage.allowance_unknown, recovery.unknown_charged, runner.preflight.unavailable, isolation.unconfined and acknowledgement/expiry keys. Flag each draft in copy.go; review before release. Export RunnerText(key). TestReleaseCopyReviewed and copy-release-check block both releases with pending keys. No unapproved mockup wording or README edits.

  • [ ] Commit: feat: show live bug tasks and runner status in the app.

Task 17: Package and wire the runner user service

Files: Expand runner command; runner connections/config/client and tests; packaging/equipo-runner.service; app config/app/execution, main, Makefile/CI; internal/equipotest/runner_startup_test.go, runnerreleasetest.go.

Interfaces: Runner Config includes Origin, StateDir, PaseoHome, NodePath, BridgePath, AmadanCredentialPath, AccountBindingsPath, CodexPath. LoadConfig(getenv), Enrol(cfg, output), Run(cfg); verbs enrol/run/preflight/tool/version. App adds ExecutionEnabled/ExecutionMarkerPath and explicit live always-on configuration. OpenExecution(d, path, cfg, store), Close; AppWithExecution/RouterWithExecution append Execution argument, old constructors remain disabled.

  • [ ] Tests: TestRunnerConfig, TestRunnerHTTPClient, TestRunnerServiceLifecycle, TestExecutionStartupClosed, TestRunnerReleaseContract, TestExecutionHibernateWitness, TestRunnerServiceUsesLinuxInspector, deferred discovery TestConnections* and TestAccountFailoverStops. No TCP/inet listener/root; 0700 state/0600 credentials, atomic token writes/process lock. Reject cross-origin redirects/TLS failures before bearer reuse. Expiry needs enrolment; rotation cannot revive revoke. Disabled app opens no core/adapter. Enabled app shares writer, migrates/syncs budgets/Resume before dispatch; witness mismatch allows recovery only. Failure/SIGTERM closes core before DB. Clean stamped release includes exact dependencies and reviewed copy. Real service inspector repeats surviving-child test; fake-only wiring fails. Discovery honors bindings, no-failover, observed accounts and the confined/acknowledged-unconfined distinction, and normalizes forged confinement reports against the instance build’s verified tuple list. TestAccountFailoverStops uses the Task 15 supervisor: an actual pre-prompt account/family mismatch sends zero prompts; a mid-step account/family change fences and stops work, verifies containment, and prevents reassignment until containment completes. Task 6’s TestAccountFailoverSelection remains the report/selection test. Exercise create/turn refusal after acknowledging-owner removal/demotion or observed tuple changes. Repeat token-rotation tests through the real containment/service wiring and assert crash recovery cannot admit before rotation completes.
  • [ ] Red/green: go test ./cmd/equipo-runner ./internal/runner ./internal/equipotest -run 'TestRunnerConfig|TestRunnerHTTP|TestRunnerService|TestExecutionStartup|TestRunnerRelease|TestRunnerServiceUsesLinuxInspector|TestExecutionHibernateWitness|TestConnections|TestAccountFailover|TestIsolationAcknowledgementLapses|TestUnconfinedContainmentRotatesTokens' -count=1; green also CGO_ENABLED=0 go build ./cmd/equipo ./cmd/equipo-runner, make runner-adapter-test, make migration-check. Fake executables inspect packaging/service commands; do not install service.
  • [ ] Implement: EQUIPO_EXECUTION_ENABLED=1 opts in. Resolve activation, open one DB, apply app schema, attach execution, clear opts.DBPath; stop reconciliation then close core/DB. External witness/lock need stable storage across oficina hibernation, separate from DB history and not rolled back with backup. Preserved witness wakes normally; lost witness quarantines. Downtime cannot extend leases. Human deployment records actual storage survival; inability to preserve it requires quarantine, never auto-release.

Explicit local config leaves provider homes unchanged. State holds machine key/bearer/journal/capabilities/sockets; operator-provisioned forge credential opens only in fetch/publish boundary. Enrol prints reviewed browser address/code, starts no browser server. Wire real Linux inspector, discovery/account bindings and command-sandbox version checks. Missing coverage/capability blocks dispatch; automatic acknowledgement expiry is enforced on startup/reports from the observed tuple and current acknowledging-owner role, regardless of claimed ReadIsolation. Load the immutable verified tuple list from the instance build; reports cannot extend it. Claude becomes eligible as confined only after its exact Task 18-passed tuple is included in that list.

Systemd user unit: Type=simple, explicit executable/config, Restart=on-failure, bounded shutdown. Runner release is Linux/amd64 for docs-t1, with bridge/locked production Node packages including server 0.14.0; instance remains Linux/arm64 default. The instance build embeds the exact (provider, provider version, Paseo server version, config hash) tuples that passed Task 18’s sentinel gate; record the same list and gate evidence in the release manifest. TestRunnerReleaseContract checks build/manifest equality and rejection of unlisted true reports. The manifest also records Node v24.19.0 and Codex 0.165.0 command-sandbox prerequisite, refusing unverified versions. CI provisions/checks both; no skipped success or provider login required for command-only sandbox tests. Human installs/enables after Task 18. No shared-daemon modification or autonomous deployment.

  • [ ] Commit: build: package the outbound runner and wire guarded startup.

Task 18: Verify the complete slice and prepare human acceptance

Files: internal/equipotest/runner_flow_test.go, internal/runner/paseo/live_test.go; browser/perf tests and Make/CI as required. Controller report accompanies implementation review, not README.

Interfaces: TestRunnerEndToEnd starts real HTTP instance/Go runner with fake Paseo and local bare forge. TestPaseoLiveContract/ReadIsolation/TurnCalibration require tag paseolive, `EQUIPOLIVE_PASEO=1`, operator-selected disposable repository and enrolled connections; ordinary CI does not count them.

  • [ ] Acceptance tests: TestRunnerEndToEnd enrols Paul/second member, configures personal connections/budgets, then reproduce → fix → review → checks → publish → merge-owner wait. Verify exact remote checked/reviewed commit, frozen base-fail/candidate-pass, repository counts, independent-family provenance and label surfaces. Second member reads but cannot use Paul's connection; one family waits with zero dispatch. A build-verified Claude connection plus Codex unconfined-acknowledged satisfies the two-family gate if all other capabilities pass; the shared runner is tainted, so both families’ steps, all executor evidence and publication carry unconfined. Include a concurrent confined task and verify its labels and token continuity through required rotations. Unacknowledged Codex fails before creation/dispatch; version change invalidates ack. Exercise resubmission, crash after dispatch, lost event/receipt, instance restart/older-DB restore with newer/missing witness, budget lowering, roster/project edits, permission-wait/background-process cancellation. At most one publication, never false stopped/succeeded.
  • [ ] Red: go test ./internal/equipotest -run 'TestRunnerEndToEnd|TestUnconfinedConnectionRequiresAcknowledgement|TestIsolationAcknowledgementLapses|TestUnconfinedLabelEverySurface' -count=1. Missing integration fails, skipped fixtures do not pass.
  • [ ] Implement: Complete existing contracts only. Live assertions cover structured events/recovery, both providers' permission replies, per-agent MCP, observed credential-home/account, no-failover, usage completeness and stop/archive/process cleanup. Name missing upstream capability and failing assertion; no invented interface or test-only auth. Verify live views on always-on mode and scripts-off static fallback.
  • [ ] Offline green: After targeted tests, run make ci once, browser walk scripts on/off, then once go test -race ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipotest ./internal/runner/.... Race verification may use required CGO; shipped builds remain CGO_ENABLED=0. Confirm all build/vet/format/staticcheck/govulncheck/gitleaks/budget/tests/migration/perf and adapter gates ran. New packages use budget TestMain, size limits unchanged. Report mutations/restoration; no full-suite loops without new failures/changes.
  • [ ] Authorized live gate: EQUIPO_LIVE_PASEO=1 go test -tags paseo_live ./internal/runner/paseo -run 'TestPaseoLiveContract|TestPaseoLiveReadIsolation|TestPaseoLiveTurnCalibration' -count=1. Preserve others' agents/projects/daemon. Claude must pass ReadIsolation: unique nonsecret sentinels in actual runner state, Amadan credential location, Paseo and each routed credential home, ~/.ssh; readable workspace control. For the credential file use disposable test credential under identical rule, never overwrite/read real secrets. Exercise shell cat, native Read/search, symlink aliases and sandbox/policy escape requests for every protected path. Trusted tool still authenticates. Unknown/skipped/readable protected sentinel fails Claude confinement. Repeat after restart/every enabled confined mode; clean only owned sentinels. Record each passing exact provider/provider-version/observed-daemon-server-version/config-hash tuple and gate evidence for Task 17’s final instance build and release manifest. A skipped or failed tuple never enters that list; live validation before the list is populated runs only as this bounded opt-in gate, not ordinary dispatch.

Codex subcase explicitly asserts ReadIsolation=false, current exact owner acknowledgement and unconfined provenance; it cannot be counted as a successful deny-read sentinel test. Unsupported reads alone no longer block this pair. Missing acknowledgement or any other capability still blocks; once supported per-agent Codex profiles ship, require its full sentinel gate through Task 9's restoration path. Both families must prove account routing/reconnect and absence of owned agent/background/terminal processes after cancel. Executor sentinel gate remains mandatory independently of agent status.

TestPaseoLiveTurnCalibration measures representative turn per eligible family with provider/model/config hash, uncached/cached input/output and completeness flags. Prior Claude 18 input +29,591 cached +404 output is historical, not calibration. Set each input/output reservation to twice the largest corresponding measured total, rounded up to 1,000 with checked arithmetic; job funds at least 23 reservations, project/team explicit period headroom. Never silently raise existing lower operator limits; report required funding if blocked. Calibration uses explicit bounded reservations recorded separately, not uncalibrated production dispatch. Test unknown-usage reservation then known completed turn with headroom, and exhaustion. Record limits/overruns; later overrun stays charged before further work stops. No offline fixture substitutes for live proof; this planning session runs none of these gates.

  • [ ] Commit/human acceptance: test: verify the runner workflow and live compatibility gate. Clean reviewed commit: make release, make runner-release; verify stamps/manifests. Human deploys versioned oficina CARLOS release and installs/enables user service, chooses always-on live mode, enrols, confirms origin/machine, records per-connection ack where needed, submits bounded bug, follows Journey/specialists, reads evidence/labelled Amadan branch and merges personally. Repeat active cancel and inspect containment. Stop test processes/remove owned scratch; only human-installed service persists.

Decisions and review coverage

No open product questions. Subscription calls count dispatched turns; provider-internal usage is recorded when observable without claiming a hard subscription cap. Paul accepts temporary acknowledged Codex read exposure for his repositories; Claude confinement and all other capabilities remain gates. Unsupported account pinning/identity/no-failover, timeline recovery, process coverage or check adapters require owning-product support, not permission to invent contracts. No project/account deletion or tito-studio enrolment is needed.

Review focus remains: lost replies cannot duplicate submission/creation/publication (7/12/14); stale/wrong-person authority cannot dispatch or answer (5/6/8/13); rollback/sleep/PID reuse cannot retain authority or fake containment (2/15); reconnect cannot undercharge or invent completion (12); candidate changes/check tampering/deleted tests cannot pass evidence (4/10/11). Spec coverage: specialists/fixed plan (4/6/7/15), live views (16), outbound lifecycle (5–15/17), publish/evidence (4/10/11/14), authority/budgets/recovery (1–3/8/12/15/17), personal selection (6/16), acceptance (18).

Round 1 dispositions

  • P1-1: Tasks 13/17, private Unix socket/0600 capability, actual tool subprocess; no TCP/inet listener.
  • P1-2: Tasks 15/17, production Linux inspector and real environment-stripped child, unknown coverage refuses.
  • P1-3: Superseded only by Paul's R1b acknowledgement rule; Claude sentinel gate remains, Codex is explicitly unconfined.
  • P2-1: Task 2 fences changed grants only; global roster epoch still stales its grants.
  • P2-2: Task 9 pins exports including daemon-control and cancelAgent.
  • P2-3: Tasks 8/14 atomically persist/recover admission ticket; one dispatch.
  • P2-4: Task 11 requires passing baseline superset; deleted/skipped tests fail.
  • P2-5: Task 11 separate reproduction scratch and collision refusal preserve candidate.
  • P2-6: Tasks 6/7/8 defer integration to 15/17; no forward implementation dependency.
  • P2-7: Tasks 2/3/7/8 own ordered core versions 4/5/6/7 and parity/upgrades.
  • P2-8: Tasks 3/12/18 bounded reservations, cache accounting and measured calibration.
  • P3 carry 7: Task 6 pins absent deletion and existing ASCII/non-ASCII labels.
  • P3 reproduction identity: Task 11 distinguishes base commit/candidate artifact subjects.
  • P3 writer DSN: Task 1 requires one writer connection.
  • P3 hibernation: Task 17 preserves witness or quarantines.
  • P3 CI Node: Tasks 9/17 check/provision Node and package manifest.
  • P3 MCP type: Tasks 9/13 retain stdio and real spawn contract.
  • P3 cleanup accounting: Task 8 prevents revoked cleanup refunds; corroborated owner settlement only.
  • P3 account routing: Tasks 9/17 reject ZeroSub automatic failover without supported guarantees.
  • Cut cross-machine transfer: single docs-t1 runner/local immutable staging/bounded blobs.
  • Cut enrolment-response recovery: fresh browser approval, hashes only.
  • Cut EventSource/pagination: R1b replaces page refresh with Rastrillo live; no custom event feed or Journey pagination.
  • Cut owner allowlist: deferred to plan 4; personal opt-in and independent family retained.

No Round 1 P3 decision/test is dropped. Original conflicting contracts remain resolved: structured SDK events, permission-ID answers, verified containment, family independence, distinct artifact/Git identity, separate repository checks and borrowed activation writer. Definitions/base precede job creation; reproduction freeze precedes candidate; uploads/recovery use distinct authorization.

Round 1b changes

  • Added first Task 0: Rastrillo v0.30.0/Go 1.26.0 upgrade, source-checked API inventory, locale/assets/browser migration and full Foundation/CI safety net. Existing Task 18 remains numbered 18; total 19 tasks.
  • Applied Paul's Codex ruling: owner-only connection acknowledgement with actor/time/provider/version audit, automatic version expiry, truthful capability, historical unconfined provenance and labels on every required surface. Added refusal/expiry/label tests and future supported-profile confinement gate.
  • Replaced timed page refresh with Rastrillo live regions, authorized team/job keys, post-commit notifications, scriptless fallback, stream shutdown and always-on deployment constraint.
  • Consolidated repeated rationale/assertion snippets into interfaces, tests, commands and shared rules; retained named tests, numerical bounds, migration ownership, security decisions and review dispositions.
  • Verification for this planning revision: inspected repository HEAD and local Rastrillo tag/docs/source; compared old/new test inventories and checked task references, command selections and diff whitespace. Product tests, upgrades and live gates above remain future implementation work. Only this plan is edited; no agents, services, commits, pushes or deployment were started.

Round 2 dispositions

  • N1: The instance build and release manifest carry only Task 18 sentinel-passed isolation tuples. Tasks 6/9/17 use observed provider, provider version, daemon server version and config hash; unlisted true reports remain unconfined. Forged Codex confinement still needs acknowledgement and labels. Claude becomes confined only when its passing tuple is listed.
  • N2: The ruling and Tasks 8/11/14 apply runner-wide taint to every step, evidence item (including executor evidence) and publication. Concurrent confined tasks are labelled. After each unconfined containment, rotate bearer and cleanup tokens; Tasks 15/17 wire and recover that transition.
  • P2-6: Task 6 runs TestAccountFailoverSelection against seeded reports for binding mismatch, unavailable pins and missing no-failover guarantees. Task 17 runs TestAccountFailoverStops for actual pre-prompt refusal, mid-step containment and reassignment ordering with Task 15’s supervisor.
  • P3 / Task 0: Require the TestFoundationFailsClosed/private_routes redirect update to /signin?return_to=%2F and its targeted regression command.
  • P3 / Task 6: Acknowledgement lapses on its owner’s removal/demotion; PaseoVersion means observed daemon server version. Each connection acknowledgement covers every project in Paul’s team under his “own repos” ruling.
  • P3 / Task 14: Name amadan branch describe, require description before or atomically with push where supported, and state the visible-but-unlabelled window otherwise. Delivery stays incomplete until description readback succeeds.
  • P3 / Task 16: Jobless task detail follows the team collection, then switches to its job. Allow derives hash-to-job mappings from persisted task/job/team associations. Framework live strings remain exempt from copy.go.
  • Verification: Reviewed the plan against every R2 decision, checked task/test ownership and stale conflicting claims, and ran git diff --check. Only this plan is edited. Product tests and live gates remain future implementation work; no agents, processes, commits or pushes were started.