oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

1# Changed files facts
2
3Branch changes/facts starts at origin/main 18fb5be4 in its own physical TMPDIR
4worktree. Slice 5b is excluded: no diff endpoint, contents, or native diff view.
5No new GET route or performance exemption is needed.
6
7## Report and device contract
8
9The controller approved ProtocolChangeFiles = 31 on 2026-11-26. The separate
10optional change_files field carries Engineering presentation facts on
11StepReport and the device Step. Existing wire.ChangeFacts, Review measurement,
12acceptFacts and merge authority are unchanged.
13
14Facts bind the accepted step's base and candidate. Entries contain only path,
15status (added/modified/deleted/renamed), old path for a rename, additions,
16deletions and a binary flag. MaxChangeEntries is 200; encoded facts are also
17bounded to 96 KiB. Totals cover the complete scan, including omitted entries;
18truncated means entries were omitted. Each raw/numstat listing is bounded to
191 MiB. A failed, malformed, mismatched or clipped scan supplies no facts,
20rather than invented totals. Paths retain spaces and Unicode; invalid/control
21paths are refused. No file contents, tokens, or new network calls are added.
22
23Engineering measures its local candidate/base pair during publication, including
24republish. It reuses Review's NUL-safe raw and numstat parsers. A first commit
25with no base is measured only after proving it is a root commit; a missing base
26on a later commit remains unknown. Review retains its existing handling.
27
28The additive chat_steps.change_files column stores only accepted Engineering
29facts. Attempt and runner authority use the existing report path; acceptance
30also checks protocol, role, specialist, exact base/candidate and bounds. The
31device projection validates stored facts again and hides them while the step
32is no longer done. Task-read visibility is inherited unchanged. Encode removes
33change_files below protocol 31. Older runners remain usable; native links out.
34
35The OpenAPI schema includes the optional field, entry statuses, nonnegative
36counts and the 200-entry limit. The full native task fixture round-trips the
37new nested field. A runner-to-device contract covers protocol 31 and protocol
3830, exact mapping, and the absence of merge-authority/private fields.
39
40## Native presentation and copy
41
42Changed files selects the last Engineering step for the task's current
43candidate, with matching facts SHA/base. Missing, invalid or older facts keep
44the existing web link. The bounded list shows per-file counts and status,
45renames with the old path, and non-text files. Lists longer than ten entries
46group by folder. Empty totals remain real zeroes only when the scan completed.
47
48File taps build the known Amadan repository page with fixed host and ref/path
49query parameters, then use the existing allowlisted opener. Amadan's actual
50route was verified in its local internal/hub/browse_render.go. Candidate SHA
51pins ordinary files; deleted files use the base. Spaces, Unicode, plus signs,
52query delimiters and fragments are encoded as path data. Non-Amadan repository
53identifiers and traversal paths cannot construct a file URL. iPhone uses the
54existing Safari sheet; Mac uses the default browser.
55
56Luna approved native.changes.* on 2026-11-26:
57- added: Added
58- modified: Changed
59- deleted: Deleted
60- renamed: Renamed
61- binary: Non-text file
62- renamed_from: Renamed from %@
63- truncated: Showing the first %lld files. Open on Amadan for the full list.
64- total: %lld files, %lld lines added, %lld removed
65
66Both generated catalogs carry the review comment. Catalog substitutions
67pluralize files and lines independently. The checker verifies that the ordinary
68plural forms still match the reviewed English source. Native tests pin
69"1 file, 1 line added, 0 removed" and all singular/plural combinations. Compact
70row counts stay numeric; their accessibility label uses the reviewed plural
71phrases.
72
73## Test-first and authority proof
74
75Initial commands, with GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0:
76- go test ./internal/runner/thin -run
77 'TestEngineeringChangeFiles|TestChangeFilesBounds' -count=1:
78 red for missing API, then green. Real git tests cover spaces, Unicode,
79 rename, deletion, non-text data and 203 files bounded to 200.
80- go test ./internal/wire -run 'TestProtocol31|TestChangeFilesValidation':
81 red for missing protocol/field, then green. A frozen main StepReport key set
82 strictly rejects the new field in every downgraded protocol 1 through 30.
83- go test ./internal/equipo/chat -run
84 '^TestEngineeringChangeFilesAcceptance':
85 red for missing acceptance/storage/projection, then green.
86- go test ./internal/runner/thin -run '^TestChangeFilesInitialCommit$' -count=1:
87 red (nil facts) before the proven-root path, then green.
88- swift test --package-path native/apple --filter ChangeFilesTests:
89 red for missing decoding/presentation APIs, then green.
90
91A detached worktree of clean main 18fb5be4 captured sixty Review gate decisions:
92fifteen input cases at protocols 27, 28, 30 and 31. Cases cover approval,
93checks, hold, size, binary/special/signing changes, gate files, shortened review,
94missing/incomplete evidence, ask policy and a person's decision. The frozen
95testdata/presentation-gate.json is compared byte for byte by
96TestPresentationFactsLeaveReviewGateUnchanged on this branch. It passes.
97A separate real-git test also compares Review facts and its decision before
98and after collecting display facts. The detached worktree was removed.
99
100Additional focused commands pass:
101- go test ./internal/thintest -run '^TestContractEngineeringChangeFiles$' -count=1
102- go test ./internal/equipo/mergegate ./internal/runner/thin ./internal/wire
103 ./internal/plan3test -run
104 'TestPresentationFactsLeaveReviewGateUnchanged|TestSandboxMasksPublish|TestProtocol31|TestPersonAPIDeviceContract'
105 -count=1
106- go test ./internal/equipo -run
107 'TestMigrationModels|TestConversationMigrationSnapshot' -count=1
108- swift test --package-path native/apple --filter
109 'ChangeFilesTests|TaskDetailTests.fullWire'
110
111## Mutations
112
113Scripts changes-facts-mutate-go.py and changes-facts-mutate-native.py run one
114mutation at a time, require an actual test assertion failure (not a compile
115error), and restore the source in finally. All 43 are killed.
116
117Server/runner (23): downgrade boundary; wire entry bound; wire byte bound;
118wire exact totals; truncation consistency; runner entry bound; runner byte
119bound; clipped scan; ancestor requirement; proven root requirement; matching
120raw/numstat paths; additions; binary flag; rename old path; publication mapping;
121acceptance protocol; role; specialist; base; candidate; device step state;
122device mapping; persistent storage.
123
124Native (20): current candidate; latest matching step; Engineering specialist;
125done state; facts SHA; facts base; valid facts; folder grouping; repository
126shape; file path; deleted-file base ref; plus encoding; count argument order;
127entry bound; byte bound; truncation consistency; binary counts; duplicate paths;
128server slash escaping; server HTML escaping.
129
130The first current-candidate mutation survived because the old step fixture
131still carried the new candidate's facts. The fixture now binds that old
132measurement to its own candidate. The mutation then fails, as do all others.
133The clipped-scan fixture ends the bounded prefix exactly on a valid raw record,
134so ignoring clipping cannot pass merely because a parser rejects a partial row.
135
136## Validation and evidence
137
138Go build, vet, staticcheck v0.7.0, govulncheck, copy release, references, lanes,
139formatting, spacing, gitleaks and migration checks pass. Vet and staticcheck
140target linux/amd64, as instructed for macOS toolproxy compatibility. The size
141gate first reported the expected added lines; existing package exemptions now
142record the exact measured source/test sizes and the scope that added them.
143The corrected budget gate passes. No timing budget was increased.
144
145native/scripts/check-native.sh passes: 325 tests in 42 suites, one existing
146known issue, 327 byte-identical web strings, references, Mac and iOS Simulator
147builds. The eight new native entries retain Luna's approved wording.
148
149Two TaskViewUI tests pass on an iPhone 18 Pro / iOS 27 simulator: the list and
150old-runner fallback, and accessibility extra-large text. Screenshots from this
151branch are in polish-audit/equipo-daily-driver/site/build/slice5/:
152- iphone-changed-files.png
153- iphone-changed-files-large.png
154- iphone-changed-files-old-runner.png
155- mac-changed-files.png
156
157The Mac capture uses the built debug app and the same offline fixture transport.
158Both platforms retain the existing pinned decision. The screenshots were
159inspected; paths wrap at large text sizes. The fixture app and simulator were
160closed and the temporary simulator removed.
161
162Main c74fd0ac (landed Needs you) was merged normally before publishing. String
163conflicts keep both reviewed catalogs; existing size exemptions include the
164merged done_at mapping and tests. Final results are recorded below; the exact-head
165Linux verdict is saved in the screenshot validation directory.
166
167Final self-review added a test-first JSON byte-bound regression: Swift normally
168escapes slashes, whereas Go leaves them literal and escapes HTML characters.
169Native now measures the server's snake-case JSON representation with the same
170escaping. A valid 200-entry nested-path listing is accepted, while a shorter
171HTML-character listing over the server's byte bound is rejected. The test
172failed both assertions before the fix; removing either encoding rule is killed
173by changes-facts-mutate-json.py. The seven focused ChangeFiles tests pass.
174
175Final native gate after the main merge and byte-bound fix passes: 350 tests in
17646 suites, one existing known issue, 330 web-parity strings, Mac and Simulator
177builds. Post-merge budget, formatting and focused device/runner contract tests
178also pass. Post-commit runner-dead-references passes.
179
180The full local macOS `make test` is not green: toolproxy requires unix.O_PATH,
181browser tests have no Chromium, and existing runner/provider checks fail.
182Representative TestOnboardingClaudeHeadlessBrowserLogin and
183TestPublishCoreAuthorizationContract failures were reproduced unchanged on
184clean origin/main c74fd0ac in a detached worktree, then that worktree was removed.
185No platform bypass or test weakening was added. Linux hub CI is the final gate;
186its full result is archived beside the screenshots in validation/ci-final.json.
187
188Local `make perf` runs TestPerfScreens and TestPerfBoot, but the target fails
189while building the same Linux-only toolproxy dependency (`unix.O_PATH`). The
190Linux CI performance target must pass; no performance exemption was added.
191The validation directory preserves both local failure logs and all passing
192focused, mutation, native and screenshot-test logs for review.
193
194The first final-head Linux run (4d654482) exposed three wire contract omissions:
195TestInjectionProtocolDowngrade still expected 30 when negotiating 99;
196TestEnumsAreTheWireConstants needed the ChangedFile status constant family;
197and TestConnectionTypesCarryNoSecrets needed exact exceptions for
198ChangedFile.path and ChangedFile.old_path. These are validated repository-relative
199names; the audit still rejects every other secret-shaped field. The status
200values now use shared wire constants. All `go test ./internal/wire/...` tests
201pass after the fixes. The failed CI log is retained as ci-4d654482-failed.json;
202the subsequent exact-head verdict is in ci-final.json.
203
204## Fable review follow-up, 2026-11-26
205
206The device detail read now opts into file facts when building the view.
207Ordinary task and step projections omit them, including the Coordinator tool,
208lists, snapshots, events and action responses. GET /tasks/{id} uses TaskDetail,
209with the same current-member and task-read authorization as Task. The OpenAPI
210field description and schema generator explicitly say detail only.
211
212The new 45-file, three-round fixture first failed on every ordinary projection
213and on the Coordinator's clipped JSON. After the change, the complete tool
214answer decodes and retains both verdict=approve and needs_you=merge. The
215runner-to-device contract also checks that /tasks and /snapshot omit facts,
216while detail retains them for protocol 31 and omits them for older runners.
217
218Go and native share internal/wire/testdata/change-paths.json. Both reject Cc,
219U+200E/F, U+202A–202E and U+2066–2069, and accept other format characters,
220including a ZWJ emoji filename. Invalid facts are rejected by the existing
221acceptance validation before storage. Native validates the optional field at
222decode or assignment and discards invalid facts without losing the task;
223rendering no longer repeats the validation and JSON byte measurement. Legacy
224payloads and valid facts still round-trip.
225
226Test-first commands and results:
227
228- GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0 go test ./internal/wire ./internal/equipo/chat ./internal/runner/thin -run 'TestChangeFiles|TestChangePath' -count=1
229 failed before implementation: bidi paths accepted, invalid facts accepted
230 for storage, ordinary projections leaked facts, Coordinator JSON truncated.
231 Runner guard regression cases passed before mutation.
232- swift test --package-path native/apple --filter ChangeFilesTests
233 failed before implementation: ZWJ rejected, bidi accepted, invalid
234 decoded/assigned facts retained. All 10 tests passed after implementation.
235- The focused final Go run includes wire, chat, runner/thin, thintest and
236 plan3test, matching ChangeFiles, ChangePath, EngineeringChangeFiles,
237 ContractEngineeringChangeFiles, PersonAPIDeviceContract and
238 OpsAreWhatTheHandlersWrite. All pass after merging main.
239
240All 27 follow-up mutations were killed by assertion failures, then restored:
241
242- Go validation: absolute path, backslash, invalid UTF-8, binary line counts,
243 candidate and base commit length, binaries greater than files, Cc characters, bidi characters.
244- Server projection: acceptance validation removed; default task view includes
245 facts; detail opt-in removed; HTTP detail calls ordinary Task; active and
246 retired step opt-in guards removed.
247- Runner: final validation removed; commit-pattern guard removed; type-change
248 mapping removed; non-Engineering publication includes facts.
249- Native: empty/leading path segments, Cc characters, backslash, old-path
250 validation, bidi characters, decode validation, assignment validation and
251 repository-name pattern removed.
252
253The executable mutation script, exact commands, exit statuses and per-mutation
254logs are saved in site/build/slice5/validation/review/. Run it from the worktree
255as python3 facts-review-mutations.py wire chat contract runner and
256python3 facts-review-mutations.py native, plus
257python3 facts-review-mutations.py extra-wire extra-chat. It restores each source
258after testing. The 45-file fixture includes one retired round as well as two
259active rounds, so both step collections are covered.
260
261Live link verification: curl -sI
262'https://amadan.net/oficina/equipo?ref=main&path=go.mod' returned HTTP/2 200 on
2632026-11-26. A GET returned the go.mod file viewer and its module line, not a
264repository listing or sign-in page. The existing /namespace/repo?ref=&path=
265shape is correct; the native tests retain commit-pinned refs and plus escaping.
266
267Main 7c113ac8 was merged normally in e0eeee7a. This includes the landed composer
268and merge-credential fixes. The native parity gate found main's two new reviewed
269stop reasons, work.reason.merge_credential and work.reason.amadan_unreachable;
270both were copied exactly from the web catalog (Paul's existing approval).
271No new wording or copy question was introduced. Measured size records cover the
272new projection/guard tests and the merged main changes; no timing budget changed.
273
274
275Final native gate passes: 356 tests in 47 suites, one existing known issue,
276332 web-parity strings, Mac build and iOS Simulator build. Linux-targeted
277make build and make vet pass with GOTOOLCHAIN=go1.26.11, CGO_ENABLED=0,
278GOOS=linux and GOARCH=amd64. Staticcheck v0.7.0 and govulncheck pass using
279make staticcheck / make govulncheck with their go-run -exec wrapper setting
280GOOS=linux GOARCH=amd64 for the analyser. Formatting, spacing, copy release,
281lane coverage, migration, measured size and gitleaks checks pass.
282
283The ordinary macOS make build and make perf hit the existing Linux-only
284toolproxy dependency (unix.O_PATH). TestPerfScreens and TestPerfBoot themselves
285passed; the full Linux hub gate remains authoritative. No platform bypass,
286new route or performance exemption was added.
287