oficina / equipo Public

Merge main into the GitHub connection plan

Co-Authored-By: Codex GPT-6-Astra <noreply@openai.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 5e4ca58e42b2016f6d3cf364681c70720f3f7365 parent 461c4c3parent 33fd866
9 files changed, +353 −5
  • .rastrillo/budgets.txt +2 −2
  • cmd/equipo/budget_test.go +10 −0
  • cmd/equipo/check_github.go +73 −0
  • cmd/equipo/check_github_test.go +148 −0
  • cmd/equipo/main.go +12 −2
  • docs/superpowers/plans/CONTROLLER-REPORT-github-egress-check.md +102 −0
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +1 −0
  • internal/equipo/copy.go +3 −0
  • internal/plan3test/plan3_release_test.go +2 −1
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 2376ac0f..41646f4b 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -14,7 +14,7 @@ perf GET /* skip Unknown private paths render 404; this fallback contains no scr
time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial reruns measured 18.079s and 22.031s. Keep migration, recovery, accounting and concurrency assertions; 60s leaves 30 percent headroom above loaded CI.
time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage.
-size internal/equipo 22109 - Proposal failure details for Engineering and Copy with Luna-reviewed words; measured 22109 source lines.
+size internal/equipo 22112 - One Luna-reviewed output format for the GitHub egress diagnostic; measured 22112 source lines.
size internal/wire 6830 - Successful-push proposal diagnostic in existing Reason fields; measured 6830 source lines.
size internal/equipotest - 12017 Task 21 repairs historical migration and conversation fixtures after Plan 3, and the Rastrillo upgrade contract comparing served assets with what Assets serves; measured 0/12017 source/test lines.
time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded);
@@ -30,7 +30,7 @@ size internal/runner/provider 5715 - Fable follow-up: base and diagnostic gates,
time internal/plan3test 300s Initial cap for combined browser and runner acceptance; measure at both usable stops.
-size internal/plan3test - 11899 Add the controller-approved Luna proposal copy key to release inventory; measured 11899 test lines, source cap unchanged.
+size internal/plan3test - 11900 Add the controller-approved Luna egress diagnostic key to release inventory; measured 11900 test lines, source cap unchanged.
time internal/runner/forge 20s Plan 3 CI repair measured 10.527s for the full package (controller CI 10.407s).
time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full package (controller CI 10.709s);
diff --git a/cmd/equipo/budget_test.go b/cmd/equipo/budget_test.go
new file mode 100644
index 00000000..8199fdf8
--- /dev/null
+++ b/cmd/equipo/budget_test.go
@@ -0,0 +1,10 @@
+package main
+
+import (
+ "os"
+ "testing"
+
+ "amadan.net/rastrillo/rastrillo/budget"
+)
+
+func TestMain(m *testing.M) { os.Exit(budget.Main(m)) }
diff --git a/cmd/equipo/check_github.go b/cmd/equipo/check_github.go
new file mode 100644
index 00000000..249d2bcf
--- /dev/null
+++ b/cmd/equipo/check_github.go
@@ -0,0 +1,73 @@
+package main
+
+import (
+ "context"
+ "crypto/tls"
+ "fmt"
+ "io"
+ "net"
+ "net/http"
+ "net/http/httptrace"
+ "sync"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/equipo"
+)
+
+func runCheckCommand(args []string, out io.Writer, transport http.RoundTripper) (bool, int) {
+ if len(args) != 1 || args[0] != "check-github" {
+ return false, 0
+ }
+ return true, checkGitHub(context.Background(), out, transport)
+}
+
+func githubCheckClient(transport http.RoundTripper) *http.Client {
+ if transport == nil {
+ // Direct egress: no environment proxy, cookies or ambient credentials.
+ transport = &http.Transport{
+ DialContext: (&net.Dialer{Timeout: 5 * time.Second}).DialContext,
+ TLSHandshakeTimeout: 5 * time.Second,
+ MaxResponseHeaderBytes: 16 << 10,
+ DisableKeepAlives: true,
+ }
+ }
+ return &http.Client{
+ Transport: transport,
+ Timeout: 5 * time.Second,
+ CheckRedirect: func(*http.Request, []*http.Request) error {
+ return http.ErrUseLastResponse
+ },
+ }
+}
+
+func checkGitHub(ctx context.Context, out io.Writer, transport http.RoundTripper) int {
+ started := time.Now()
+ peer := "-"
+ var peerMu sync.Mutex
+ trace := &httptrace.ClientTrace{GotConn: func(info httptrace.GotConnInfo) {
+ if conn, ok := info.Conn.(*tls.Conn); ok && len(conn.ConnectionState().VerifiedChains) > 0 {
+ peerMu.Lock()
+ peer = conn.RemoteAddr().String()
+ peerMu.Unlock()
+ }
+ }}
+ req, _ := http.NewRequestWithContext(httptrace.WithClientTrace(ctx, trace), http.MethodGet, "https://api.github.com/meta", nil)
+ client := githubCheckClient(transport)
+ defer client.CloseIdleConnections()
+ resp, err := client.Do(req)
+ status := 0
+ reachable := false
+ if resp != nil {
+ status = resp.StatusCode
+ reachable = resp.TLS != nil && len(resp.TLS.VerifiedChains) > 0
+ // No response body is read, including error and redirect bodies.
+ _ = resp.Body.Close()
+ }
+ peerMu.Lock()
+ _, writeErr := fmt.Fprintf(out, equipo.CopyGitHubEgress, reachable, status, time.Since(started).Round(time.Millisecond), peer)
+ peerMu.Unlock()
+ if err != nil || writeErr != nil || !reachable || status < 200 || status >= 300 {
+ return 1
+ }
+ return 0
+}
diff --git a/cmd/equipo/check_github_test.go b/cmd/equipo/check_github_test.go
new file mode 100644
index 00000000..70cdcb57
--- /dev/null
+++ b/cmd/equipo/check_github_test.go
@@ -0,0 +1,148 @@
+package main
+
+import (
+ "bytes"
+ "context"
+ "crypto/tls"
+ "errors"
+ "io"
+ "net"
+ "net/http"
+ "net/http/httptest"
+ "strings"
+ "sync/atomic"
+ "testing"
+ "time"
+)
+
+func githubTestTransport(t *testing.T, handler http.HandlerFunc) (*http.Transport, string) {
+ t.Helper()
+ s := httptest.NewTLSServer(handler)
+ t.Cleanup(s.Close)
+ tr := s.Client().Transport.(*http.Transport).Clone()
+ tr.TLSClientConfig = tr.TLSClientConfig.Clone()
+ tr.TLSClientConfig.ServerName = "example.com"
+ tr.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
+ if addr != "api.github.com:443" {
+ t.Errorf("unexpected destination %q", addr)
+ }
+ return (&net.Dialer{}).DialContext(ctx, network, s.Listener.Addr().String())
+ }
+ t.Cleanup(tr.CloseIdleConnections)
+ return tr, s.Listener.Addr().String()
+}
+
+func TestCheckGitHubCommand(t *testing.T) {
+ var calls atomic.Int32
+ tr, peer := githubTestTransport(t, func(w http.ResponseWriter, r *http.Request) {
+ calls.Add(1)
+ if r.Method != "GET" || r.URL.RequestURI() != "/meta" || r.Host != "api.github.com" || r.Header.Get("Authorization") != "" || r.Header.Get("Cookie") != "" {
+ t.Errorf("unexpected request: %s %s host=%s", r.Method, r.URL.RequestURI(), r.Host)
+ }
+ w.Header().Set("X-Secret", "response-header-secret")
+ _, _ = io.WriteString(w, "response-body-secret")
+ })
+ var out bytes.Buffer
+ handled, code := runCheckCommand([]string{"check-github"}, &out, tr)
+ if !handled || code != 0 || calls.Load() != 1 {
+ t.Fatalf("handled=%v code=%d requests=%d output=%q", handled, code, calls.Load(), out.String())
+ }
+ if !strings.Contains(out.String(), "reachable: true; status: 200; latency: ") || !strings.Contains(out.String(), "TLS peer: "+peer) || strings.Count(out.String(), "\n") != 1 || strings.Contains(out.String(), "secret") {
+ t.Fatalf("unsafe or incomplete output: %q", out.String())
+ }
+ for _, args := range [][]string{nil, {"serve"}, {"check-github", "https://evil.invalid"}} {
+ if handled, _ := runCheckCommand(args, io.Discard, tr); handled {
+ t.Fatalf("unexpected command match: %q", args)
+ }
+ }
+}
+
+func TestCheckGitHubBypassesBoot(t *testing.T) {
+ t.Setenv("EQUIPO_ORIGIN", "")
+ t.Setenv("EQUIPO_INSTANCE_KEY", "")
+ tr, _ := githubTestTransport(t, func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) })
+ var out, diagnostics bytes.Buffer
+ if code := commandMain([]string{"check-github"}, &out, &diagnostics, tr); code != 0 || !strings.Contains(out.String(), "status: 200;") || diagnostics.Len() != 0 {
+ t.Fatalf("code=%d output=%q diagnostics=%q", code, out.String(), diagnostics.String())
+ }
+}
+
+func TestCheckGitHubRefusesRedirect(t *testing.T) {
+ var calls atomic.Int32
+ tr, _ := githubTestTransport(t, func(w http.ResponseWriter, r *http.Request) {
+ calls.Add(1)
+ http.Redirect(w, r, "https://api.github.com/private-location-secret", http.StatusFound)
+ })
+ var out bytes.Buffer
+ if code := checkGitHub(context.Background(), &out, tr); code != 1 || calls.Load() != 1 || !strings.Contains(out.String(), "status: 302;") || strings.Contains(out.String(), "secret") {
+ t.Fatalf("code=%d requests=%d output=%q", code, calls.Load(), out.String())
+ }
+}
+
+func TestCheckGitHubDoesNotReadBody(t *testing.T) {
+ tr, _ := githubTestTransport(t, func(w http.ResponseWriter, r *http.Request) {
+ w.WriteHeader(http.StatusOK)
+ w.(http.Flusher).Flush()
+ <-r.Context().Done()
+ })
+ ctx, cancel := context.WithTimeout(context.Background(), time.Second)
+ defer cancel()
+ start := time.Now()
+ if code := checkGitHub(ctx, io.Discard, tr); code != 0 || time.Since(start) >= 500*time.Millisecond {
+ t.Fatalf("body was read: code=%d duration=%v", code, time.Since(start))
+ }
+}
+
+func TestCheckGitHubFailureIsBoundedAndPrivate(t *testing.T) {
+ tr, _ := githubTestTransport(t, func(w http.ResponseWriter, r *http.Request) { <-r.Context().Done() })
+ ctx, cancel := context.WithTimeout(context.Background(), 30*time.Millisecond)
+ defer cancel()
+ var out bytes.Buffer
+ if code := checkGitHub(ctx, &out, tr); code != 1 || strings.Contains(out.String(), "deadline") || !strings.Contains(out.String(), "reachable: false; status: 0;") {
+ t.Fatalf("code=%d output=%q", code, out.String())
+ }
+ client := githubCheckClient(nil)
+ if client.Timeout <= 0 || client.Timeout > 5*time.Second || client.Jar != nil {
+ t.Fatalf("unbounded or stateful client: %+v", client)
+ }
+ transport := client.Transport.(*http.Transport)
+ if transport.Proxy != nil || transport.TLSHandshakeTimeout <= 0 || transport.MaxResponseHeaderBytes != 16<<10 || (transport.TLSClientConfig != nil && transport.TLSClientConfig.InsecureSkipVerify) {
+ t.Fatal("unsafe production transport")
+ }
+}
+
+func TestCheckGitHubRequiresVerifiedTLS(t *testing.T) {
+ tr, _ := githubTestTransport(t, func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) })
+ tr.TLSClientConfig = &tls.Config{ServerName: "wrong.invalid"}
+ var out bytes.Buffer
+ if code := checkGitHub(context.Background(), &out, tr); code != 1 || !strings.Contains(out.String(), "reachable: false; status: 0;") || !strings.Contains(out.String(), "TLS peer: -") || strings.Contains(out.String(), "certificate") {
+ t.Fatalf("code=%d output=%q", code, out.String())
+ }
+}
+
+func TestCheckGitHubUnverifiedPeerAndHTTPFailure(t *testing.T) {
+ for _, status := range []int{http.StatusOK, http.StatusServiceUnavailable} {
+ tr, _ := githubTestTransport(t, func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(status) })
+ if status == http.StatusOK {
+ tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} // Test a peer with no verified chain.
+ }
+ var out bytes.Buffer
+ if code := checkGitHub(context.Background(), &out, tr); code != 1 {
+ t.Fatalf("status=%d code=%d output=%q", status, code, out.String())
+ }
+ if status == http.StatusOK && !strings.Contains(out.String(), "TLS peer: -") {
+ t.Fatalf("unverified peer reported: %q", out.String())
+ }
+ }
+}
+
+type brokenCheckOutput struct{}
+
+func (brokenCheckOutput) Write([]byte) (int, error) { return 0, errors.New("output-secret") }
+
+func TestCheckGitHubOutputFailure(t *testing.T) {
+ tr, _ := githubTestTransport(t, func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) })
+ if code := checkGitHub(context.Background(), brokenCheckOutput{}, tr); code != 1 {
+ t.Fatal("successful exit despite failed output")
+ }
+}
diff --git a/cmd/equipo/main.go b/cmd/equipo/main.go
index 6b63bc68..76657c2b 100644
--- a/cmd/equipo/main.go
+++ b/cmd/equipo/main.go
@@ -2,7 +2,9 @@ package main
import (
"context"
+ "io"
"log/slog"
+ "net/http"
"os"
"os/signal"
"syscall"
@@ -15,12 +17,20 @@ import (
)
func main() {
+ os.Exit(commandMain(os.Args[1:], os.Stdout, os.Stderr, nil))
+}
+
+func commandMain(args []string, out, diagnostics io.Writer, transport http.RoundTripper) int {
+ if handled, code := runCheckCommand(args, out, transport); handled {
+ return code
+ }
started := time.Now()
- logger := slog.New(slog.NewTextHandler(os.Stderr, nil))
+ logger := slog.New(slog.NewTextHandler(diagnostics, nil))
if err := run(logger, started); err != nil {
logger.Error(equipo.BootLog, "err", err)
- os.Exit(1)
+ return 1
}
+ return 0
}
// Returning to main lets the database close on failed app construction too.
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-github-egress-check.md b/docs/superpowers/plans/CONTROLLER-REPORT-github-egress-check.md
new file mode 100644
index 00000000..335cb829
--- /dev/null
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-github-egress-check.md
@@ -0,0 +1,102 @@
+# GitHub egress check, 2026-11-23
+
+Base: main `f623151c`. Branch: `github/egress-check`.
+
+The command `equipo check-github` runs before configuration, database, mail
+and serving. It sends one unauthenticated GET to
+`https://api.github.com/meta`, directly, with a five-second overall timeout.
+It refuses redirects, verifies TLS, bounds response headers to 16 KiB and
+reads no response body. It has no configurable target, credentials, cookies,
+environment proxy or retry. No production command has been run by this branch.
+
+Output contains only verified TLS reachability, numeric HTTP status, elapsed
+time and the connected TLS peer's IP and port. Status is zero without an HTTP
+response; peer is `-` without a verified TLS connection. Reachability means a
+response over verified TLS, including a refused redirect or HTTP failure.
+Exit zero additionally requires HTTP 2xx and successful output. All other
+outcomes exit one, without printing raw errors, headers or body text.
+
+## Run after the controller deploys this version
+
+```sh
+carlos run --app equipo --account oficina \
+ --console https://console.carloku.com \
+ --instance equipo.bds.oncarlos.com --timeout 15s -- check-github
+```
+
+The values are `APP`, `ACCOUNT`, `CONSOLE` and `HOST` in
+`scripts/upgrade-thin.sh:47`. `carlos run --help` confirms that `--instance`
+takes the instance host and arguments following `--` go to the app binary.
+The public alias is not used as the instance identifier. The separate staging
+values live in `scripts/staging-thin.py:48` (app `equipo-staging`, account
+`bds`, host `equipo-staging.bds.oncarlos.com`). This branch neither deploys
+nor claims that CARLOS egress has passed; the controller records that result.
+
+## Tests and mutations
+
+Tests were written before implementation. Against compiling empty stubs,
+`TestCheckGitHubCommand`, `TestCheckGitHubRefusesRedirect`,
+`TestCheckGitHubDoesNotReadBody` and `TestCheckGitHubRequiresVerifiedTLS`
+failed at runtime. The entry-point test first failed with the normal missing
+instance-key boot refusal, then passed with command dispatch before boot.
+
+Commands use `GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0`. Each mutation is applied
+alone, run with `go test ./cmd/equipo -run '^<test>$' -count=1 -timeout=20s`,
+and restored. Compilation failures do not count.
+
+| Mutation | Killing test |
+| --- | --- |
+| Match `serve` instead of `check-github` | `TestCheckGitHubCommand` |
+| Change the fixed path to `/zen` | `TestCheckGitHubCommand` |
+| Send POST instead of GET | `TestCheckGitHubCommand` |
+| Follow redirects | `TestCheckGitHubRefusesRedirect` |
+| Copy the response body to output | `TestCheckGitHubCommand` |
+| Drain the response body | `TestCheckGitHubDoesNotReadBody` |
+| Remove the overall timeout | `TestCheckGitHubFailureIsBoundedAndPrivate` |
+| Use the environment proxy | `TestCheckGitHubFailureIsBoundedAndPrivate` |
+| Remove the response-header bound | `TestCheckGitHubFailureIsBoundedAndPrivate` |
+| Accept a TLS response without a verified chain | `TestCheckGitHubUnverifiedPeerAndHTTPFailure` |
+| Report an unverified TLS peer | `TestCheckGitHubUnverifiedPeerAndHTTPFailure` |
+| Omit the resolved peer | `TestCheckGitHubCommand` |
+| Accept HTTP 503 as success | `TestCheckGitHubUnverifiedPeerAndHTTPFailure` |
+| Ignore failed output | `TestCheckGitHubOutputFailure` |
+| Run boot before the diagnostic | `TestCheckGitHubBypassesBoot` |
+
+Fake servers bind loopback and use generated test TLS certificates. No real
+GitHub App, key or token is used. The tests also check absent authorization
+and cookies, one request, one output line, no header/body sentinel, TLS
+certificate rejection, cancellation and the exact command argument boundary.
+
+## Copy
+
+Only `CopyGitHubEgress` is new:
+
+```text
+GitHub reachable: %t; status: %d; latency: %s; TLS peer: %s\n
+```
+
+It was marked pending with `scripts/copy-status.py pending`. The controller
+returned Luna's verdict in message `08a0554d-dcc7-4ef9-8aa6-0121e13a9a88`:
+
+> Luna: APPROVED as is. Mark it `// COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)`, then carry on.
+
+The exact accepted value, inventory row and bounded release-test key reflect
+that verdict. The `accept` command was not invoked.
+
+## Gates
+
+Results are recorded below before handoff. No device routes, OpenAPI changes,
+wire fields, protocol changes, migrations or connector behavior are added.
+Only measured size ceilings change: equipo 22109 to 22112 source lines for
+copy; plan3test 11899 to 11900 test lines for the accepted key. No time budget
+changes. Existing test assertions and names are unchanged.
+
+- All 15 mutations above failed at runtime; restored tests passed.
+- `make fmt-check budget migration-check copy-release-check lanes-check spacing`: passed.
+- `make gitleaks`: passed on base history; repeated after committing below.
+- `go test -tags testbuild ./cmd/equipo ./internal/equipo ./internal/equipo/chat ./internal/thintest -count=1`: passed (1.210s, 31.465s, 5.717s, 171.974s).
+- `go test -tags testbuild ./internal/plan3test -run 'TestPersonAPI|TestPlan3Release' -count=1`: passed (12.877s).
+- `go test ./internal/testci -run TestBudgetRecordsAreShort -count=1`: passed.
+- `go vet ./cmd/equipo` and pinned staticcheck v0.7.0 for that package: passed.
+- `python3 native/scripts/check-fixtures.py`: passed (11 API fixtures, 3586 Markdown fixtures, 32000 seeded differential cases).
+- Post-commit reference scan, committed-history secret scan and Linux CI are reported with the pushed SHA in the handoff.
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index 0f12520d..bc02f046 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -6844,6 +6844,7 @@ records remain unchanged.
| `work.reason.no_further_changes` | it made no further changes to the candidate | Task page: fills "Engineering stopped: %s" when an Engineering step ended no_changes and an earlier round already pushed a candidate (stop reasons, 2026-11-23) | Runtime; COPY APPROVED (Paul, 2026-11-23, copy-review eavqvil43jg2zs3wxx3kxp3bpm, unchanged) |
| `work.reason.tools_refused` | Equipo refused the commands it needed to run | Task page: fills "Engineering stopped: %s" when an Engineering step committed nothing after Equipo refused tool requests it made (stop reasons, 2026-11-23) | Runtime; COPY APPROVED (Paul, 2026-11-23, copy-review eavqvil43jg2zs3wxx3kxp3bpm, unchanged) |
| `work.reason.proposal_failed` | the branch was pushed, but the review request could not be created | Successful push diagnostic (GitHub seam, 2026-11-23; Luna, house rules) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23) |
+| `CopyGitHubEgress` | GitHub reachable: %t; status: %d; latency: %s; TLS peer: %s<br> | GitHub egress check (2026-11-23; Luna, house rules) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23) |
## Task 21
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go
index 40979234..b6dba594 100644
--- a/internal/equipo/copy.go
+++ b/internal/equipo/copy.go
@@ -68,6 +68,9 @@ const (
// BootLog is the shared diagnostic used by the command entry point.
const BootLog = "Equipo could not start."
+// CopyGitHubEgress is the one-shot connectivity check's bounded output.
+const CopyGitHubEgress = "GitHub reachable: %t; status: %d; latency: %s; TLS peer: %s\n" // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)
+
// COPY APPROVED BY DELEGATION (Luna pass, 2026-11-01, house rules).
var pageCopy = map[string]string{
"api.repo_not_allowed": "Your runner can't reach this project's repository. Make sure the repository is available, then try again.", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)
diff --git a/internal/plan3test/plan3_release_test.go b/internal/plan3test/plan3_release_test.go
index ea13c803..82300e9b 100644
--- a/internal/plan3test/plan3_release_test.go
+++ b/internal/plan3test/plan3_release_test.go
@@ -198,12 +198,13 @@ func plan3CopyInventory(t *testing.T) {
// Paul, 2026-11-22: Luna verdicts and the controller clarification are this slice's review.
acceptedAPIErrors := slices.Contains([]string{"api.repo_not_allowed", "api.card_answered", "api.card_stale", "api.confirmation_required", "api.coordinator_busy", "api.hold_bar", "api.idempotency_conflict", "api.models_not_allowed", "api.not_active", "api.not_askable", "api.not_mergeable", "api.not_retryable", "api.question_ended", "api.runner_offline", "api.task_busy", "api.task_ended", "api.task_merging", "api.turn_ended"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)")
acceptedNativeProjects := slices.Contains([]string{"projects.new_request", "projects.remove_selection"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)")
+ acceptedGitHubEgress := key == "CopyGitHubEgress" && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)")
acceptedForgeSeam := key == "work.reason.proposal_failed" && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)")
acceptedCardNames := slices.Contains([]string{"projects.carried_selection", "projects.remember_name", "projects.name_to_remember", "projects.use_title", "docs/api/equipo-v1.md / Projects and starting a request"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)")
acceptedProjects := slices.Contains([]string{"projects.amadan", "projects.yours", "projects.can_add", "projects.add_reachable", "projects.names", "projects.names_hint", "projects.details", "projects.title", "projects.description", "projects.save", "projects.context", "projects.found", "projects.selected", "projects.owner_add", "projects.selection_lost", "projects.other", "projects.name_question", "projects.personal_names", "projects.forget_name", "docs/api/equipo-v1.md / Projects and starting a request"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-22)")
acceptedAgentAccess := slices.Contains([]string{"copyAgentConfig", "copyAgentForbidden", "copyAgentNotFound", "copyAgentUnavailable", "copyAgentTooLarge", "copyAgentInvalid", "copyAgentMedia", "copyAgentUnauthenticated", "agent.equipo_projects_list", "agent.equipo_tasks_list", "agent.equipo_task_get", "agent.equipo_needs_you", "docs/api/equipo-v1.md / Delegated read-only operations"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-20)")
acceptedCopy := strings.TrimSuffix(cells[3], " |") == "COPY ACCEPTED BY DELEGATION (Copy, record-bound) sha256:"+copydesk.Hash(rows[key])
- if !acceptedForgeSeam && !acceptedAPIErrors && !acceptedNativeProjects && !acceptedInjection && !acceptedMail && !acceptedPush && !acceptedAgentAccess && !acceptedProjects && !acceptedCardNames && !acceptedAccess && !acceptedPlacementEdges && !acceptedPlacement && !acceptedReportActions && !acceptedRoster && !acceptedCopy && !strings.Contains(cells[3], "COPY REVIEW REQUIRED") && !acceptedAll && !acceptedGuide && !acceptedRound2 && !acceptedStarter && !acceptedDelegation && !approvedPublish && !approvedAssistant && !approvedJobs && !approvedOficina && !approvedFailedReplies && !approvedStopReasons {
+ if !acceptedGitHubEgress && !acceptedForgeSeam && !acceptedAPIErrors && !acceptedNativeProjects && !acceptedInjection && !acceptedMail && !acceptedPush && !acceptedAgentAccess && !acceptedProjects && !acceptedCardNames && !acceptedAccess && !acceptedPlacementEdges && !acceptedPlacement && !acceptedReportActions && !acceptedRoster && !acceptedCopy && !strings.Contains(cells[3], "COPY REVIEW REQUIRED") && !acceptedAll && !acceptedGuide && !acceptedRound2 && !acceptedStarter && !acceptedDelegation && !approvedPublish && !approvedAssistant && !approvedJobs && !approvedOficina && !approvedFailedReplies && !approvedStopReasons {
t.Fatal("entry has no copy review status or applicable acceptance", key)
}
}