oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

1# Controller report: GitHub seam
2
3Base: `00d09aa7`, branch `github/seam`. Hub only; no GitHub client,
4credentials, migrations, device API changes or wire fields. The controller
5confirmed mechanical test substitutions are permitted and the protocol bump
6belongs with the future GitHub wire step.
7
8## Test preservation
9
10Every existing test name and assertion is unchanged apart from these approved
11mechanical substitutions. No test was deleted or renamed.
12
13- `HubMergeRequest` -> `MergeRequest`; `HubMergeResult` -> `MergeResult`.
14- Forge test-double `Remote` signatures add `Use` (or `thin.Use`).
15- Two old direct Remote calls add `Push`, preserving their prior write use.
16- The headless access wrapper forwards its new `use` argument.
17- New Host/Propose fixture methods are in new seam fixture files.
18
19Verification: read each old test from HEAD, apply only the substitutions
20above, run pinned gofmt, and compare the entire file byte for byte with the
21worktree. All 16 changed existing test files match. SHA-256 of each resulting
22file follows, so review can distinguish mechanical changes from new tests.
23
24| Existing test file | SHA-256 after mechanical substitution |
25| --- | --- |
26| `internal/headless/access_resume_test.go` | d0879525f43a2e6e66a8207207e8a80ca4ef91192fe8c5b4588c321eab3a71ba |
27| `internal/headless/merge_test.go` | 50cb66bcbbc11dd1085e7a9136d17b05c55e606a447ef1bdddffa171003d791e |
28| `internal/headless/projects_test.go` | 5f9234a1752fddb49a90c0a4f6b562e1aa08578aa36e8b326fb23faf1f9d3ea5 |
29| `internal/runner/forge/merge_detail_test.go` | 04b72e20e638d873b49be3d6f739c11a205fb1b4226e66a8419a1a044c34ffbb |
30| `internal/runner/forge/merge_test.go` | 0497d4e9d9b75e3c738e90707f94bab7e63dc6ad13d5ed68890d259d7a78cb86 |
31| `internal/runner/forge/merge_unborn_test.go` | 506a3b45ee16eb56ff795663978edcdfeac6076d7029faaa750488a81921ca5a |
32| `internal/runner/thin/access_review_test.go` | b275d965f9de779314a0eb0c5af24dd21ee96b31cdb3e8519a6ee85f7d806a42 |
33| `internal/runner/thin/copy_test.go` | fb58e71251109937899279bfad1fbdf24d5af572fc7ea2c19564da640fa81110 |
34| `internal/runner/thin/create_test.go` | c59d96f0ad8ff388ebac2f337483818111a17d793abfbb81377e267458700b25 |
35| `internal/runner/thin/index_empty_test.go` | d7f96a51d5ebf2037c90e4bda8ddc8ba1d25e49a12733c2c037c1f4ee249c1d0 |
36| `internal/runner/thin/judge_fetch_test.go` | a5a8fd366e67e1c22d7a22326da0cbbb02ad64e7223506c95428f419ed166d9d |
37| `internal/runner/thin/mergedetail_test.go` | 901ddcea525906ee9b0200490346b5a8bdc0507cb07b5f1f15c4e8c95469864c |
38| `internal/runner/thin/mergestep_test.go` | cc81279ce30d82f888b35e237a906b5865293e2adc1fe8ad1cf9f5aaf44dd860 |
39| `internal/runner/thin/relay_test.go` | ce1356717bc69d748b852bf018ec7c017c54d0822769c192f7810d68a9d2fe4c |
40| `internal/runner/thin/review_fixes_test.go` | 1affbe9ef6d9c91ad5669f3e51b03ea55b544c0a1f49e00ee975ba1a3c32c767 |
41| `internal/runner/thin/sandbox_masks_test.go` | 6abbae1bdf5f7a82e61ad25e4af375be55c4ab68a0ce4e5b5228ed5d63a87b83 |
42
43## New tests and test-first evidence
44
45- `go test ./internal/wire/forgekey`: failed with undefined Parse/Hub/Equal
46 before implementation; passed after adding the package.
47- `go test ./internal/runner/thin -run 'TestForges|TestHubProposal|TestRemoteUsername'`:
48 failed with undefined Use/Proposal/NewForges/MergeRequest before the seam;
49 passed after implementation.
50- `TestEngineeringProposesAfterPush` and `TestRelayProposesAfterPush` both
51 failed with zero proposals before inserting Propose calls; passed afterward.
52- `TestStartDefaultRequestsPushAuthority` failed with authority `[1]` (Read)
53 before changing initialization to Push; passed afterward.
54
55## Package changes
56
57- `wire/forgekey`: closed host parsing, hub shorthand and normalization,
58 host-aware display, GitHub spelling-preserving equality, shared hub-only
59 admission and new-repository rules. Recognition grants no execution.
60- `runner/thin`: explicit read/push use, host router with no fallback, optional
61 hosted-CI/access forwarding, hub proposal branch link without network writes,
62 proposal calls after direct and relayed pushes, hub-only production wiring.
63 Read grants still cannot obtain push credentials.
64- `runner/forge`: merge types renamed without field changes; shared hub key
65 checks; explicit GitUsername in branch push authentication. Hub transport
66 names, merge reasons, publication audit provider and old engine stay intact.
67- `runner/workspace`: optional GitUsername, defaulting to historical `x`, used
68 for clone authentication. Thin clone/fetch and forge push use the same default.
69- `equipo/chat`, `equipo/setup`: shared parsing/display helpers, keeping hub-only
70 admission. No database writes or user-visible behavior added.
71- `headless`: interface-only fixture substitutions and new fixture methods.
72
73## Copy
74
75No app-owned UI/model strings added or changed. One internal diagnostic is
76`forgekey.ErrKey`: `invalid repository key`. Reported to the controller.
77
78## Probe
79
80[Exact calls and sanitized answers](../specs/2026-11-22-equipo-github-connector-probe.md).
81Actions on App push is confirmed. Full merge table and CARLOS egress remain open.
82
83## Deliberate mutations
84
85Each mutation ran `GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0 go test <package> -run ^<test>$ -count=1`. Every result was a failing test, not a compilation failure. Each original was restored in a finally block. The clean targeted suite runs after these mutations.
86
87| Guard broken | File | Killing regression | Result |
88| --- | --- | --- | --- |
89| closed-hosts | `internal/wire/forgekey/key.go` | `TestRejectInvalidKeys` | FAIL, guard restored |
90| path-segments | `internal/wire/forgekey/key.go` | `TestRejectInvalidKeys` | FAIL, guard restored |
91| github-case | `internal/wire/forgekey/key.go` | `TestEqualityKeepsForgeRules` | FAIL, guard restored |
92| hub-case | `internal/wire/forgekey/key.go` | `TestEqualityKeepsForgeRules` | FAIL, guard restored |
93| hub-admission | `internal/wire/forgekey/key.go` | `TestHubAdmissionAndCreation` | FAIL, guard restored |
94| new-name-rule | `internal/wire/forgekey/key.go` | `TestHubAdmissionAndCreation` | FAIL, guard restored |
95| registration-duplicate | `internal/runner/thin/forges.go` | `TestForgesRouteWithoutFallback` | FAIL, guard restored |
96| registration-host | `internal/runner/thin/forges.go` | `TestForgesRouteWithoutFallback` | FAIL, guard restored |
97| route-host | `internal/runner/thin/forges.go` | `TestForgesRouteWithoutFallback` | FAIL, guard restored |
98| route-use | `internal/runner/thin/forges.go` | `TestForgesRouteWithoutFallback` | FAIL, guard restored |
99| catalog-host | `internal/runner/thin/forges.go` | `TestForgesCatalogAndHubIdentity` | FAIL, guard restored |
100| hub-proposal-host | `internal/runner/thin/forges.go` | `TestHubProposalIsOnlyALink` | FAIL, guard restored |
101| hub-proposal-branch | `internal/runner/thin/forges.go` | `TestHubProposalIsOnlyALink` | FAIL, guard restored |
102| hub-use | `internal/runner/thin/forge.go` | `TestFileForgeRejectsUnknownUseBeforeIO` | FAIL, guard restored |
103| read-push-separation | `internal/runner/thin/forge.go` | `TestAccessReadGrantCannotWrite` | FAIL, guard restored |
104| initial-push-authority | `internal/runner/thin/forge.go` | `TestStartDefaultRequestsPushAuthority` | FAIL, guard restored |
105| engineering-proposal | `internal/runner/thin/engineer.go` | `TestEngineeringProposesAfterPush` | FAIL, guard restored |
106| relay-proposal | `internal/runner/thin/relay.go` | `TestRelayProposesAfterPush` | FAIL, guard restored |
107| explicit-username | `internal/runner/workspace/workspace.go` | `TestRemoteUsername` | FAIL, guard restored |
108| default-username | `internal/runner/workspace/workspace.go` | `TestRemoteUsername` | FAIL, guard restored |
109| branch-username | `internal/runner/forge/branch.go` | `TestBranchGitUsesRemoteUsername` | FAIL, restored |
110| workspace-username | `internal/runner/workspace/workspace.go` | `TestWorkspaceFetchUsesRemoteUsername` | FAIL, restored |
111| registration-nil | `internal/runner/thin/forges.go` | `TestForgesRouteWithoutFallback` | FAIL, restored |
112| missing-forge | `internal/runner/thin/forges.go` | `TestForgesRouteWithoutFallback` | FAIL, restored |
113| optional-hosted-ci | `internal/runner/thin/forges.go` | `TestForgesForwardOptionalHubServices` | FAIL, restored |
114| optional-ci-status | `internal/runner/thin/forges.go` | `TestForgesForwardOptionalHubServices` | FAIL, restored |
115| optional-access | `internal/runner/thin/forges.go` | `TestForgesForwardOptionalHubServices` | FAIL, restored |
116| optional-poll | `internal/runner/thin/forges.go` | `TestForgesForwardOptionalHubServices` | FAIL, restored |
117
118## Local verification
119
120Pinned toolchain `GOTOOLCHAIN=go1.26.11`, `CGO_ENABLED=0`; pinned gofmt on PATH.
121Tests use the repository's `-tags testbuild`. TMPDIR is its physical path on
122macOS so fixture security checks do not reject the /var -> /private/var alias.
123The first untagged broad run was diagnostic, not a pass; its hanging thin
124fixture was stopped before the corrected run.
125
126Passed: fmt-check, gitleaks (1117 commits, no leaks), budget, migration-check,
127copy-release-check, lanes-check (18 lanes plus 5 browser lanes), spacing,
128TestPersonAPI, TestPlan3Release, TestBudgetRecordsAreShort, and native fixtures
129(11 API fixtures, 3586 markdown fixtures, 32000 differential cases).
130
131Full equipo, chat and thintest suites passed (68.917s, 15.294s and 245.031s on this shared Mac).
132The full runner package tree was run: forge passed (139.352s), workspace
133passed (98.009s); several provider/setup packages fail macOS policy checks.
134The thin package's long-running HTTP fixture was stopped with SIGQUIT after
135214s, retaining its stack evidence. No platform guards or existing tests were
136changed to make these pass. Linux CI is the full runner gate, as requested.
137
138Budget changes are measured only: thin 28436 source / 22414 test lines;
139headless 11349 test lines. The reasons name the router, authority seam,
140proposal regressions and mechanical fixture additions. No time budget raised.
141
142Twenty-eight deliberate mutations were killed by runtime test failures. Clean
143focused regressions were rerun after restoration. Two username tests inspect
144the actual git process environment in workspace fetch and branch push.
145
146[All 15 mapped hub assumptions](2026-11-23-github-seam-assumptions.md) include
147current file and line locations, the existing projects device star route,
148and each unchanged hub transport, policy, prompt, audit and preview path.
149
150The clean hub-focused run passed in 67.985s:
151
152```sh
153GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0 go test -tags testbuild \
154 ./internal/runner/thin \
155 -run 'Test.*(Forge|Merge|Hosted|Access|Propos|RemoteUsername|StartDefault)' -count=1
156```
157
158This includes existing forge, merge, hosted CI and access assertions plus the
159new routing/proposal regressions. The clean key and both git-username suites
160also passed after every mutation was restored.
161
162Linux headless compile also passed:
163`GOOS=linux GOARCH=amd64 go test -tags testbuild -c ./internal/headless`
164(with its output artifact kept in TMPDIR, outside the repository).
165
166## First CI and correction
167
168CI on `ab21a6e4` failed two of 29 shards; the other 27 passed, including
169Linux runner, merge, hosted CI and access tests.
170
171- Existing `TestProjectRejectsUnsafeBinding` caught `amadan.net/a` being
172 interpreted as bare owner/name inside legacy CanonicalRepository. Added
173 `TestCanonicalRepositoryRequiresFullHubKey`; it failed before the fix on
174 both `amadan.net/a` and `https://amadan.net/a`. CanonicalRepository now
175 requires the parsed spelling to equal its full host/path input, preserving
176 the existing complete-hub-key requirement. Removing that condition again
177 makes the new regression fail; restored and the new regression and existing
178 unsafe-binding test both pass. This is the 29th killed runtime mutation.
179- The new forgekey test package lacked Rastrillo's timing receipt. Added its
180 standard `TestMain` calling `budget.Main(m)`. `rastrillo budget test
181 ./internal/wire/forgekey` now passes and reports package timing.
182
183No existing test assertions or names changed in this correction. The complete
184setup and equipotest suites and release gates are rerun before committing it.
185
186Correction verification: all release gates passed again. Full setup passed
187in 8.251s. Full equipotest completed in 436.480s with only the two existing
188macOS release-packaging failures (`TestRunnerReleaseContractPackaging` and
189`TestReleasePinsAndProvenance`): their isolated PATH selects a Python whose
190hashlib has no file_digest. The project binding tests passed. Those packaging
191lanes passed on Linux in the first CI run; no unrelated packaging code changed.
192
193## Fable review follow-up after 176d61cb
194
195The fixes are new commits on github/seam. Earlier commits and all tests that
196predate this branch retain their names and assertions. Changes to test code
197in this follow-up are to seam tests introduced on this branch, new regression
198files, and the explicitly approved copy-release inventory list.
199
200### Findings and behavior
201
202- P2-1: Parse rejects two-part keys beginning with either known host. Both
203 amadan.net/a and github.com/a are rejected by key and no-fallback tests.
204 Equal no longer equates them with a prefixed hub key; Normalize preserves
205 the invalid input and parsing it still rejects it.
206- P2-2: a real NewFileForge, wrapped in NewForges, talks to the fake hub for
207 read and push credentials, merge, hosted CI/status, and access request/poll.
208 The test asserts its host and the exact authenticated HTTP paths.
209- P2-3: push redaction and Clones.Heads use Remote.Username(). The redaction
210 regression uses x-access-token with a deliberately short fixture password
211 so the generic long-token scrubber cannot hide a missing explicit scrub.
212 It checks both raw and encoded values in PushDetail's resulting log tail.
213- Push authority: both Engineering and relay tests assert exactly one Push
214 credential request. Changing either call to Read fails its regression.
215- Hub identity: fake forges now have different agents and create namespaces.
216 Routing either hostless identity call to GitHub fails the test.
217- Proposal failure: a successful push remains successful and is not retried.
218 The existing Reason field carries only proposal_failed. The instance keeps
219 the diagnostic for local and worker publication and the successful step
220 detail renders the approved fragment. No raw forge error reaches a person.
221 ProposalRef remains local and absent on error; there is no new wire field.
222- Error identities: rejected Remote, Exists/Create, Merge, CIHosted and
223 CIStatus keep their operation sentinel as well as ErrKey through errors.Is.
224 Invalid Use and duplicate registration have separate ErrForgeUse and
225 ErrForgeDuplicate identities. Neither is ErrKey.
226- Branch links: chat.BranchURL and hub Propose share forgekey.HubBranchURL,
227 preserving the literal branch slash in the existing hub URL spelling.
228- Probe: recorded the controller-confirmed organisation manifest flow,
229 with the external manifest_server.py's request/callback logic. The saved
230 workflow report has only git's generic final stderr line, not the remote
231 cause. Capturing the exact workflows-permission refusal remains open,
232 alongside the complete merge table and CARLOS egress.
233
234### Tests first
235
236Focused tests ran with GOTOOLCHAIN=go1.26.11, CGO_ENABLED=0, testbuild and a
237physical TMPDIR. Before fixes, regressions failed on malformed host inputs,
238normalization and equality, router fallback, operation error identities,
239escaped proposal URL, Heads' x username, and the non-default encoded header
240remaining in PushDetail. Engineering requested Push three times after a
241proposal error; relay returned Pushed:false / push_failed after one good
242push. The rendering regression had no diagnostic text. After repairing the
243chat test's missing RunnerRole fixture, its local path also demonstrated
244that the instance discarded the diagnostic, before that path was fixed.
245
246### Copy review
247
248The controller supplied Luna's replacement on 2026-11-23, message
249`e27ea4c2-0708-4c63-9507-febfb7d1d032`:
250
251> "work.reason.proposal_failed": "the branch was pushed, but the review request could not be created", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)
252
253The original proposed complete sentence did not fit the fragment grammar
254of work.reason.*. Luna also replaced "proposal" with "review request".
255The key was marked pending through copy-status.py, then recorded with the
256controller-authorized Luna marker and a bounded acceptedForgeSeam list.
257No accept command was run. Tests exercise reasonLine, "Stopped: %s", and
258successful-step detail; each rendered sentence has one final period.
259This is the only new app copy. ErrForgeUse and ErrForgeDuplicate are internal
260configuration diagnostics, not person-facing API text.
261
262### Review mutation checks
263
264All 26 review mutations failed a runtime assertion, then were restored. No
265compile failure counts as a kill. In particular, Fable's five surviving
266mutations (production Host, both Push call sites, Agent and CreateIn) now die.
267The swallowed-error mutation dies in both publication paths. These 26 checks
268are additional to the 29 recorded in the earlier implementation.
269
270Each command was `go test -tags testbuild ./<package> -run <test> -count=1`,
271with the pinned environment above.
272
273| # | Deliberate mutation | Package suffix | Killing test |
274| --- | --- | --- | --- |
275| 1 | reject truncated known host | `internal/wire/forgekey` | `TestRejectInvalidKeys|TestNormalizationAndEqualityAgree` |
276| 2 | production host identity | `internal/runner/thin` | `TestRouterWithProductionFileForge` |
277| 3 | push detail encoded username | `internal/runner/forge` | `TestPushDetailScrubsRemoteUsername` |
278| 4 | push detail raw password | `internal/runner/forge` | `TestPushDetailScrubsRemoteUsername` |
279| 5 | heads username | `internal/runner/thin` | `TestHeadsUsesRemoteUsername` |
280| 6 | engineering push authority | `internal/runner/thin` | `TestEngineeringProposesAfterPush` |
281| 7 | relay push authority | `internal/runner/thin` | `TestRelayProposesAfterPush` |
282| 8 | hub agent identity | `internal/runner/thin` | `TestForgesCatalogAndHubIdentity` |
283| 9 | hub create namespace identity | `internal/runner/thin` | `TestForgesCatalogAndHubIdentity` |
284| 10 | engineering proposal diagnostic | `internal/runner/thin` | `TestEngineeringProposalFailureKeepsPush` |
285| 11 | engineering successful push preserved | `internal/runner/thin` | `TestEngineeringProposalFailureKeepsPush` |
286| 12 | relay proposal diagnostic | `internal/runner/thin` | `TestRelayProposalFailureKeepsPush` |
287| 13 | relay successful push preserved | `internal/runner/thin` | `TestRelayProposalFailureKeepsPush` |
288| 14 | remote sentinel | `internal/runner/thin` | `TestRouterRefusalsKeepOperationIdentity` |
289| 15 | exists sentinel | `internal/runner/thin` | `TestRouterRefusalsKeepOperationIdentity` |
290| 16 | create sentinel | `internal/runner/thin` | `TestRouterRefusalsKeepOperationIdentity` |
291| 17 | merge sentinel | `internal/runner/thin` | `TestRouterRefusalsKeepOperationIdentity` |
292| 18 | hosted CI sentinel | `internal/runner/thin` | `TestRouterRefusalsKeepOperationIdentity` |
293| 19 | CI status sentinel | `internal/runner/thin` | `TestRouterRefusalsKeepOperationIdentity` |
294| 20 | invalid use identity sentinel | `internal/runner/thin` | `TestRouterRefusalsKeepOperationIdentity` |
295| 21 | duplicate identity sentinel | `internal/runner/thin` | `TestRouterRefusalsKeepOperationIdentity` |
296| 22 | branch link spelling | `internal/runner/thin` | `TestHubProposalIsOnlyALink` |
297| 23 | local step diagnostic | `internal/equipo/chat` | `TestProposalFailureKeepsSuccessfulPublication` |
298| 24 | worker step diagnostic | `internal/equipo/chat` | `TestProposalFailureKeepsSuccessfulPublication` |
299| 25 | step diagnostic displayed | `internal/equipo` | `TestProposalFailureDetailAndPunctuation` |
300| 26 | wire reason accepted | `internal/equipo/chat` | `TestProposalFailureKeepsSuccessfulPublication` |
301
302### Review verification
303
304Passed after restoration: fmt-check, gitleaks (1119 commits, no leaks), budget,
305migration-check, copy-release-check, lanes-check, spacing, TestPersonAPI,
306TestPlan3Release, TestBudgetRecordsAreShort and native fixtures (11 API,
3073586 markdown and 32000 seeded differential cases).
308
309Full suites passed: equipo 60.262s, chat 6.374s, thintest 208.968s, wire 0.367s,
310forgekey 0.249s and wireschema 0.739s. The focused thin forge, merge, hosted CI,
311access, proposal, router, username and initialization suite passed in 65.267s.
312The full runner tree was run with a four-minute per-package bound. Forge
313passed in 96.960s and workspace in 63.874s. As on the initial seam run, the
314Mac cannot pass the Linux containment/provider and host-policy fixtures;
315thin reached the four-minute timeout. These are not claimed as local passes.
316No platform guards or existing tests were weakened. Linux CI is the full
317runner gate.
318
319The six size exemptions changed only to measured counts: equipo 22105 source,
320wire 6830 source, plan3test 11899 test, thin 28446 source / 22619 test, and
321chat 8382 test with its existing source cap. Reasons name the diagnostic and
322regressions; no timing budget changed. Existing test files from main have no
323new substitutions in this review beyond the approved copy inventory list.
324
325### Shared Copy publication follow-up
326
327The shared Engineer.publish path also serves Copy. Before final handoff, a
328new regression demonstrated that the instance discarded proposal_failed on
329a successful Copy report. Copy now preserves the same diagnostic after its
330existing authorization and result validation, and its step detail shows the
331same approved fragment. No additional strings or wire fields were added.
332The successful Copy step remains done and pushed.
333
334Three more deliberate mutations were killed and restored, bringing this
335review's count to 29 runtime kills (58 including the earlier implementation):
336
337| Deliberate mutation | Killing regression |
338| --- | --- |
339| Drop Copy's successful-publication diagnostic | `chat.TestCopyProposalFailureKeepsSuccessfulPublication` |
340| Show Copy's diagnostic without a successful push | `equipo.TestCopyProposalFailureDetail` |
341| Add a Copy detail entry without a proposal diagnostic | `equipo.TestCopyProposalFailureDetail` |
342
343Both Copy regressions failed before the fix and passed after it. The full
344app, chat and thintest suites and release gates are repeated for this change.
345The runner code is unchanged from the preceding verified commit.
346
347The historical secret scan on 18594290 mistook the prose Equal/Normalize in
348this report for a credential. The sentence was rephrased and the exact
349commit/file/rule/line fingerprint was excluded in .gitleaksignore, with a
350reason. No credential was present, no broad rule was disabled and no history
351was rewritten.
352
353Follow-up verification passed: all release gates, PersonAPI/Plan3Release and
354budget-record checks. Repeated full suites: equipo 51.715s, chat 7.774s,
355thintest 219.940s. Final measured caps for the additional Copy path are equipo
35622109 source and chat 33348 source / 8399 test. All other caps above stand.
357The historical scan now passes over 1120 commits with no leaks. The first CI
358on 18594290 failed its secret-scan shard on the prose false positive; the
359narrow fingerprint correction is part of this follow-up commit.
360