oficina / equipo Public

Merge remote-tracking branch 'origin/plan-2b' into plan-3

claude agent, operated by paul@keymail.dev eb73d7c04f563f4a4994d0b42ecfc697254f86a4 parent 569e431parent 019907e
6 files changed, +119 −10
  • .gitleaksignore +2 −0
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md +83 −0
  • internal/directlive/driver.go +0 −1
  • internal/equipotest/direct_cutover_test.go +8 −0
  • internal/runner/containment/linux_test.go +19 −2
  • scripts/runner-reference-allowlist.json +7 −7

CI failed — run details

diff --git a/.gitleaksignore b/.gitleaksignore
index 76305197..bc86d81a 100644
--- a/.gitleaksignore
+++ b/.gitleaksignore
@@ -1,3 +1,5 @@
# Expired, randomly generated capability from an offline rejection-test mutation.
# The disposable fixture was removed; this is not a provider or service key.
64da7c8b90dcf3134dc1afa08b169560c880d038:docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md:generic-api-key:15868
+# Literal plan3-fixture instance key in an offline test router, not a service key.
+be8095ed7616ca7d571295398abb63d79815f06d:internal/plan3test/harness_test.go:generic-api-key:51
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md
index 216e2cff..e571656f 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md
@@ -24619,3 +24619,86 @@ CGO_ENABLED=0 TMPDIR=/home/paulca/t/e2b go test ./internal/equipotest -run '^Tes
The first form-CSRF mutation survived the original status-only check; requiring the middleware response made it fail.
Full cause analysis, exact `/tmp` wrapper, mutation edits/output, copy inventory and cleanup: `.superpowers/sdd/2026-11-03-equipo-plan-2b-direct/ci-fix2-report.md`. No live gate or push.
+
+
+## Branch gate repair (2026-11-03)
+
+Baseline: clean `plan-2b` at `6d1901d`. Removed the unused `exercise.frames` field; turn-local frames and journal capture remain unchanged. Corrected two exact reference-inventory entries and added `TestDirectDeadReferencesRepository`. Added one exact historical secret-scan exception for a literal offline fixture value. No runtime behavior or app-owned strings changed.
+
+All commands ran from `/home/paulca/amadan.net/oficina/equipo-plan-2b`, with `CGO_ENABLED=0`, on-disk `TMPDIR=/home/paulca/t/e2b`, and default Go caches unless explicitly noted.
+
+RED/GREEN/mutation evidence:
+
+```sh
+CGO_ENABLED=0 make -C /home/paulca/amadan.net/oficina/equipo-plan-2b staticcheck
+# RED: exit 2, internal/directlive/driver.go:174:2: field frames is unused (U1000).
+# GREEN after field removal: exit 0.
+# Mutation: restored only the field; same command exited 2 with the same U1000.
+# Removed the field again before committing; subsequent full gates pass this step.
+CGO_ENABLED=0 go test ./internal/equipotest -run '^TestDirectDeadReferencesRepository$' -count=1
+# RED: exit 1, missing namespace-mount classification and stale release-test allowance.
+CGO_ENABLED=0 go test ./internal/equipotest -run '^TestDirectDeadReferences' -count=1
+# GREEN: exit 0, 1.249s.
+CGO_ENABLED=0 go test ./internal/equipotest -run '^TestDirectDeadReferencesRepository$' -count=1
+# Mutation 1: removed only the new mount entry; exit 1, one unclassified reference.
+# Restored the mount entry before mutation 2.
+# Mutation 2: restored only the stale release-test entry; exit 1, one stale allowance.
+CGO_ENABLED=0 go test ./internal/equipotest -run '^TestDirectDeadReferences' -count=1
+# Restored GREEN: exit 0, 0.836s. Both mutations compiled and failed the named test.
+CGO_ENABLED=0 make runner-dead-references
+# Exit 0: reference scan: 536 text files, 972 matches, 0 failures.
+CGO_ENABLED=0 make gitleaks
+# RED in full gate: exit 2, leaks found: 1.
+# Inspected the redacted finding and historical test: literal synthetic instance key.
+# GREEN with its exact fingerprint ignored: exit 0, no leaks found.
+# Mutation: removed only that fingerprint; exit 2, leaks found: 1.
+# Restored GREEN: exit 0, no leaks found.
+```
+
+Interpretation: the static-analysis check and secret scan are the executable regression checks for a dead-field deletion and exact fixture-data exception; no artificial runtime test was added. The reference-inventory fix has a new Go regression test. The user-authorized full gate is rerun after each newly exposed failure, with only the failing step rerun during its repair. The temp-path test is deferred until the corrected full gate passes. Existing live-certification limits remain outside this offline task.
+
+The full test step also exposed two outdated containment fixtures after the Task 11b executable-pin change. The startup-failure fixture now constructs its manager with the intentionally non-acknowledging executable, so it reaches startup. The admission test now expects executable rejection during pinned-file validation and checks that refusal creates no attempt state. Only test code changed.
+
+```sh
+CGO_ENABLED=0 go test ./internal/runner/containment -run '^(TestNamespaceStartupFailure|TestNamespaceDirectPolicyAdmission)$' -count=1
+# RED: exit 1, startup intent or exit proof missing; changed direct launch passed attestation.
+# An initial state assertion also failed on the fixture's pre-existing homes directory.
+# Corrected the assertion to compare state-directory entry counts before and after refusal.
+# GREEN: exit 0, 0.714s.
+CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceStartupFailure$' -count=1
+# Mutation: replaced the initial persist call/condition with if false.
+# Exit 1: startup intent or exit proof missing; only the exit proof remained.
+# Restored persistence before the next mutation.
+CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceDirectPolicyAdmission$/runner$' -count=1
+# Mutation: replaced the namespace digest mismatch condition with if false.
+# Exit 1: changed namespace executable bypassed pinned digest check.
+CGO_ENABLED=0 go test ./internal/runner/containment -run '^(TestNamespaceStartupFailure|TestNamespaceDirectPolicyAdmission)$' -count=1
+# Restored GREEN: exit 0, 0.623s. Both mutations compiled.
+git -C /home/paulca/amadan.net/oficina/equipo-plan-2b diff --exit-code -- /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/containment/linux.go
+# Exit 0: production containment code restored byte-for-byte.
+```
+
+Final gate commands and results:
+
+```sh
+CGO_ENABLED=0 make ci
+# Invocation 1: exit 2 at reference scan; invocation 2: exit 2 at secret scan.
+# Invocation 3: exit 2 at the two outdated containment tests.
+CGO_ENABLED=0 make test
+# Repaired failing step: exit 0, 17 packages, zero failures, 3m41.316s.
+CGO_ENABLED=0 make ci
+# Invocation 4: exit 0, all steps complete. Tests: 17 packages, zero failures, 4m4.125s.
+# Adapter, namespace, migration and performance checks passed.
+# Worst screen 22.878ms/150ms; median cold boot 84ms/500ms.
+mktemp -d /tmp/e2b-gate.XXXX
+# Created /tmp/e2b-gate.XWG7 after the full gate passed.
+TMPDIR=/tmp/e2b-gate.XWG7 CGO_ENABLED=0 make test
+# Exit 0: 17 packages, zero failures, 2m13.201s; no package timing warnings.
+# Python try/finally removed this exact directory afterward; absence verified.
+```
+
+The shell cleanup trap was rejected before execution for containing recursive forced deletion. The replacement Python wrapper used the requested mktemp command, set TMPDIR only for the Make child, captured its exit status, and removed only its newly created directory with `shutil.rmtree` in `finally`.
+
+Concerns: on-disk full tests reported forge-package timing overruns (18.143s, 10.613s and 12.189s against 10s). Those are warnings locally but enforced in CI. The `/tmp` run reported none. No timing budget was changed. Existing live-certification gaps remain outside this offline run. No app strings or copy.go entries changed; new diagnostics are test-only and listed in the full report.
+
+Full report, captured outputs and interpretations: `.superpowers/sdd/2026-11-03-equipo-plan-2b-direct/gate-report.md`. All fixes are separate commits; no push or live provider operation occurred.
diff --git a/internal/directlive/driver.go b/internal/directlive/driver.go
index af0457ef..80438443 100644
--- a/internal/directlive/driver.go
+++ b/internal/directlive/driver.go
@@ -171,7 +171,6 @@ type exercise struct {
proxy *runner.ToolProxy
binding runner.ToolBinding
sequence int
- frames [][]byte
}
func (d *driver) exercise(ctx context.Context, b provider.DirectLiveBinding, role, root string) (e provider.DirectEvidence, err error) {
diff --git a/internal/equipotest/direct_cutover_test.go b/internal/equipotest/direct_cutover_test.go
index 981be854..cf8a65ff 100644
--- a/internal/equipotest/direct_cutover_test.go
+++ b/internal/equipotest/direct_cutover_test.go
@@ -209,6 +209,14 @@ func TestDirectReleaseContract(t *testing.T) {
}
}
+func TestDirectDeadReferencesRepository(t *testing.T) {
+ script, err := filepath.Abs("../../scripts/runner-dead-references.py")
+ executionMust(t, err)
+ if out, err := exec.Command("python3", script).CombinedOutput(); err != nil {
+ t.Fatalf("repository reference inventory: %v\n%s", err, out)
+ }
+}
+
func TestDirectDeadReferences(t *testing.T) {
script, err := filepath.Abs("../../scripts/runner-dead-references.py")
executionMust(t, err)
diff --git a/internal/runner/containment/linux_test.go b/internal/runner/containment/linux_test.go
index 3962ff8c..03bc1929 100644
--- a/internal/runner/containment/linux_test.go
+++ b/internal/runner/containment/linux_test.go
@@ -423,7 +423,12 @@ func TestNamespaceStartupFailure(t *testing.T) {
m, l := fixture(t)
// The helper cannot acknowledge PID 1, so no process is returned and no
// harness side effect is possible. The incomplete intent remains durable.
- m.cfg.RunnerBinary = "/usr/bin/true"
+ cfg := m.cfg
+ cfg.RunnerBinary = "/usr/bin/true"
+ m, err := New(cfg)
+ if err != nil {
+ t.Fatal(err)
+ }
p, e := m.Start(context.Background(), l, []string{"/usr/bin/touch", "/workspace/prompt-sent"})
if e == nil || p != nil {
t.Fatal("missing readiness accepted")
@@ -803,6 +808,10 @@ func TestNamespaceDirectPolicyAdmission(t *testing.T) {
}
reached := false
m.beforePin = func() { reached = true }
+ before, err := os.ReadDir(m.cfg.ScratchRoot)
+ if err != nil {
+ t.Fatal(err)
+ }
p, e := m.Start(context.Background(), l, argv)
if e == nil {
p.(*process).kill()
@@ -812,9 +821,17 @@ func TestNamespaceDirectPolicyAdmission(t *testing.T) {
p.Stderr().Close()
t.Fatal("changed direct launch accepted")
}
- if reached {
+ if kind == "runner" {
+ if !reached || e != errStartup {
+ t.Fatalf("changed namespace executable bypassed pinned digest check: reached=%v err=%v", reached, e)
+ }
+ } else if reached {
t.Fatal("changed direct launch passed attestation")
}
+ entries, err := os.ReadDir(m.cfg.ScratchRoot)
+ if err != nil || len(entries) != len(before) {
+ t.Fatalf("changed direct launch created attempt state: %v %v", entries, err)
+ }
})
}
}
diff --git a/scripts/runner-reference-allowlist.json b/scripts/runner-reference-allowlist.json
index 8086144d..35ee1034 100644
--- a/scripts/runner-reference-allowlist.json
+++ b/scripts/runner-reference-allowlist.json
@@ -5823,13 +5823,6 @@
"count": 2,
"reason": "Task 11b controller evidence of offline packaging, refusal tests and unresolved release prerequisites; no execution dependency."
},
- {
- "path": "internal/equipotest/runner_release_test.go",
- "line_sha256": "7505eaaaebad7760bd30565337711651f6f27702a5ac396f0db6f5b34ce75a35",
- "match": "equipo-runner",
- "count": 1,
- "reason": "Retained runner executable, versioned package or user-service path in Task 11b release tooling, tests or draft operator steps."
- },
{
"path": "internal/equipotest/runner_release_test.go",
"line_sha256": "48b4a08ba0a705c90cd2d29589c35de5b1bf3579cf2a0dc8ce4bb41a32b79d82",
@@ -5864,5 +5857,12 @@
"match": "equipo-runner",
"count": 1,
"reason": "Direct runner executable used by the bounded fake CLI certification fixture, not historical daemon orchestration."
+ },
+ {
+ "path": "internal/runner/checks/namespace.go",
+ "line_sha256": "54f493b37bb09696c8e34cbaa7b3b7e551ba2008d40e56c5de041f2fd18deeb1",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Retained namespace executable mount for isolated repository checks."
}
]