oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

1# Projects up front: G12 Amadan slice
2
3Branch: `projects/up-front`. Base: `3ef3ec85`. This report belongs to the
4commit containing it; the final SHA and Linux CI verdict are reported after
5push. The controller will assign the code review against that fixed SHA.
6No merge, deployment, main push or GitHub integration is included.
7
8## What a person sees
9
10The Projects page has a filter, Your projects with personal stars first,
11and Available to add grouped under Amadan. Rows show the repository key,
12forge, description and existing activity. Owners can add reachable projects
13and edit a project's title, description and shared names. Learned names are
14private to the person who answered a placement card. Existing task, star,
15activity and quiet-project presentation remains available.
16
17Every Coordinator dispatch, including retries and job-thread Coordinator
18turns, receives a fresh block of up to 30 projects, starred then recently
19active. Its JSON rows quote and label bounded, redacted metadata; repository
20names and descriptions cannot determine placement. PersonText remains the
21person's original words.
22
23Exact trusted names, owner-set titles and repository identities share one
24code resolver for find, stars and task placement. An unknown or ambiguous
25name raises one placement card with code-built reachable active projects,
26starred first. Repeated find calls reuse the open card. A person's answer
27learns the phrase only if it appeared in their composer message, only for
28them, and replaces their previous meaning of that phrase. Repository-only
29matches remain quoted reference data. With no active reachable project to
30choose, the tool refuses instead of inventing a choice. Explicit repository
31keys outside the allowlist keep the existing access-request flow.
32
33## Device follow-up
34
35- GET /api/v1/projects retains items, allowed and home, and adds connections
36 and can_add. Project rows add starred, names, personal_names, title_source,
37 description_source, forge and connection_id. The connection is amadan;
38 its state reflects the stored primary-runner hello, not live connectivity.
39- PUT /api/v1/projects/{id}/star accepts {"starred":true/false}, checks current
40 membership, changes only that person's star and returns the project. It
41 needs no revision or idempotency key; repeating the value is safe.
42- PUT /api/v1/projects/{id}/details accepts revision, title, description and
43 names, for current team owners only. A stale revision returns 409
44 idempotency_conflict. Limits are title 120 bytes, description 500 bytes,
45 and 12 names of 120 bytes each, with valid UTF-8 and no newline or NUL.
46- SendMessage gains optional project_id on POST /api/v1/messages. Returned
47 messages and history retain it. The project must be active and reachable.
48 Unknown is 404; unreachable is 422 repo_not_allowed; reuse of an
49 idempotency key with a different project is 409 idempotency_conflict.
50 Selected-project messages get separate turns and bind task writes.
51- The Assistant send rejects project_id. SendJob rejects it too, but has no
52 device API route. Its web form does not bind the field.
53- docs/api/equipo-v1.md and the OpenAPI document describe the additions.
54 Existing native fixtures still pass. Native screens and project chips
55 are the controller's follow-up work, not implemented in this server slice.
56
57Migration 0100 is additive: project metadata provenance and description,
58message project_id, and chat_project_names. Names have project/person/name
59keys; an empty person is a team name. Project writes use the transaction
60handle, current roster and audit. Personal metadata is stripped from shared
61project events.
62
63## Tests and guard mutations
64
65Tests were written first. Initial failures included undefined metadata and
66wire APIs, a missing ProjectID in the returned message, missing Available to
67add/filter UI, and a repeated ambiguity after answering. The last added
68contract exposed repository-supplied names deciding find before any project
69was added, plus an unquoted catalog description. Both paths are now guarded.
70
71The mutation evidence is in
72[2026-11-22-projects-up-front-mutations.md](2026-11-22-projects-up-front-mutations.md).
73Each used a temporary Go overlay with Go 1.26.11 and CGO_ENABLED=0, observed
74the intended assertion fail, then removed the overlay. The 24 mutations:
75owner, roster-edit, revision, private-name, repository-title, ambiguity,
76remembered-choice, ask-once, typed-name, selected-reach, selected-active,
77replay-project, placement-bind, block-limit, block-redaction, block-quote,
78star-roster, event-private, empty-projects-resolution, catalog-redaction,
79owner-add, owner-restore, repository-case, fake-reference-steering.
80The add-owner mutation first passed because the public Store entry point
81already checks the owner. The final contract calls the internal helper to
82exercise its added guard independently. The first typed-name attempt did not compile because it made a variable
83unused; that was not counted. Its corrected overlay failed the intended
84assertion, as recorded.
85
86Existing envelope tests still assert the original exact text after a helper
87validates and removes the appended JSON project block. New dispatch contracts
88assert the block is actually present and updates after owner metadata edits.
89Existing explicit access tests now use repository keys; unknown product
90names exercise placement in the new contracts. No hosted-CI, merge or forge
91behavior was changed.
92
93Required local gates use GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0 and pinned gofmt:
94
95- make fmt-check gitleaks: pass; gitleaks scanned 1089 commits with no leaks.
96- make budget migration-check copy-release-check lanes-check: pass.
97- go test ./internal/equipo ./internal/equipo/chat ./internal/thintest
98 ./internal/wire/... -count=1: equipo 41.181s, wire 0.411s and wireschema
99 0.711s pass. The final chat/thintest rerun passes in 2.625s/154.717s.
100- go test ./internal/plan3test -run 'TestPersonAPI|TestPlan3Release' -count=1:
101 pass, 20.232 seconds. TestPlan3Release passed again in 5.646s after the
102 final reviewed API text was copied into the inventory.
103- python3 native/scripts/check-fixtures.py: seven fixtures pass.
104- git diff --check: pass.
105
106Size budgets were raised only to measured values: equipo 22027 source,
107chat 32946 source, wire 6814 source, plan3test 11893 test, thintest 33513 test
108lines. Reasons are on the corresponding budget rows. Linux CI remains the
109release gate; the requested macOS scope does not include the known
110internal/toolproxy vet/staticcheck limitations or a full make test.
111
112## Copy and API clarification record
113
114All 13 new runtime keys were initially marked pending with copy-status.py.
115Per the controller's explicit delegation instruction, Luna's exact verdicts
116were then applied with COPY ACCEPTED BY DELEGATION (Luna, 2026-11-22), matching
117main's agent-access precedent. Engineering did not invoke copy-status.py
118accept. The exact acceptedProjects allowlist includes only these 13 keys and
119the reviewed API section; other rows retain their existing status.
120
121The new keys and short strings are:
122
123- projects.amadan: Amadan
124- projects.yours: Your projects
125- projects.can_add: Available to add
126- projects.add_reachable: Add project
127- projects.names: Names people use
128- projects.names_hint: Separate names with commas. These names are shared with the team.
129- projects.details: Project details
130- projects.title: Title
131- projects.description: Description
132- projects.save: Save details
133- projects.context: the reviewed project-block instruction, exactly in copy.go.
134- projects.found: Amadan project %s. Quoted project metadata: %s
135- projects.selected: The person selected project %s for this request. Use that repository without asking where it goes.
136
137No additional runtime copy keys were added after Luna's review. The evidence
138[2026-11-22-projects-up-front-copy.md](2026-11-22-projects-up-front-copy.md)
139contains brief.md, result.md, brief2.md and result2.md verbatim.
140
141The API section matched brief2.md exactly before applying result2.md. Fields,
142paths, status codes and limits agree with the implementation. Exactly five
143factual clarifications were applied to Luna's revised section:
144
1451. Defined primary runner as the newest enrolled primary not revoked or
146 marked for removal, with execution requiring an active team owner;
147 defined hello as its stored repository and capability report.
1482. Scoped owner to this Equipo team.
1493. Named POST /api/v1/assistant/messages and the job-thread Store operation's
150 web route POST /jobs/{id}/messages; stated there is no device job route.
151 The Store rejects project_id; the web form does not bind that field.
1524. Defined repository keys as amadan.net/owner/name, also accepted as owner/name.
1535. Changed All writes to All project writes described here for the roster
154 sentence.
155
156## Decisions and follow-up
157
158No product decision is requested. Native Projects screens and the removable
159composer chip can follow this wire contract. The controller assigns code
160review after a green fixed SHA. Paul lands the branch.
161
162## First Linux CI run and corrections
163
1641251de8e failed four check shards: headless scenarios, two browser suites,
165and staticcheck. The fake Coordinator treated the appended project block
166as fixture commands and a second message. That changed exact creation
167commands and appended text after a markdown closing fence. A new failing
168fake process contract reproduced both steering and reply corruption. The
169fake now excludes reference data from its fixture-command parser and
170message count, while retaining the full prompt in its transcript. The
171contract passes; breaking that exclusion fails it again.
172
173Headless index/access scenarios now name explicit repositories, matching
174the product-name versus repository-key distinction already covered by the
175chat and thin-client contracts. Staticcheck found the old filterAbove
176constant unused because filtering is now always available; it was removed.
177This reduced equipo's measured source budget to 22027. No runtime copy was
178added or changed.
179
180The webread timeout failed once under load, passed its CI retry, and was not
181a failing shard. It was left unchanged. On macOS, the affected headless and
182browser compile stops at the documented internal/toolproxy unix.O_PATH
183limitation, so the next Linux CI run verifies those paths. Local fakeclaude
184passes (0.339s), the affected equipo contracts pass (3.026s), and formatting,
185budget, copy-release and lane checks pass. The post-commit reference scan
186and push are repeated for the correction commit.
187
188
189## Independent review follow-up
190
191Fable reviewed 1251de8e; these fixes build on 62e1977e. No GitHub implementation, merge or deployment.
192
193- P1.1: `add_project` and `record_task` return an owner-required tool result when a member cannot create or restore a project. Store.Apply frame regressions prove the runner remains valid. Status no longer advertises `can_add` to a member.
194- P1.2: Dispatch and tools release a selected project that was removed or became unreachable. A durable, single Coordinator notice records the release. The original `project_id` stays in history and the idempotency comparison. Runner contract tests cover removal and changed hello while another reply is active, retaining that reply and dispatching later turns. A released selection never silently rebinds when reachability returns.
195- P2.3: An unknown task passes the selected-project placement check so `start_task` can return its ordinary refusal.
196- P2.4: Unknown-name placement from `find` requires a person turn and an explicit work request naming a project. Move-in, explore and feature searches use discovery behavior without a placement card.
197- P2.5: Named cards cap repository candidates at five and labels at 80 bytes, with a sixth another-project action when needed. Stars lead, then name similarity and recent activity. Another-project keeps the same card open for a typed exact name or repository; no turn is sent until it resolves.
198- P2.6: A unique trusted match wins over a personal name. Learned names resolve zero or multiple trusted matches. Device `DELETE /api/v1/projects/{id}/names` and the web project page remove only the authenticated person's learned name.
199- P2.7: Added direct regressions for all eight listed surviving guards and deliberately mutated each. Detailed failing assertions are in the mutations evidence file.
200- P3 name learning: The person must have used the literal name in naming/placement language; names have at least three characters, stopwords and ordinary feature phrases are excluded, source capitalization or explicit quotation is required, and a model's partial proper name is rejected. Unicode matching preserves source text.
201- P3 trailing comma: Blank trimmed entries in the names input are ignored.
202- P3 provenance: Title and description retain their own provenance. A names-only edit cannot bless unchanged repository text. Additive migration 0101 copies existing provenance into separate fields.
203- P3 stars: Project events build a view for each recipient, and snapshots use the authenticated viewer, including their star and private names.
204
205The API docs and generated OpenAPI include the private-name removal body and route. All seven native fixture shapes still match. The another-project answer returns the updated open card and zero-value message/turn fields; native clients should render the updated card and wait for a valid text answer.
206
207The six runtime strings are exactly Luna's approved text: `projects.owner_add`, `projects.selection_lost`, `projects.other`, `projects.name_question`, `projects.personal_names`, `projects.forget_name`. No additional runtime keys were added. They were marked pending with copy-status, then received only the controller-authorized Luna markers and exact acceptedProjects entries. `copy-status.py accept` was not invoked.
208
209Luna's API revision and its six factual clarifications are recorded verbatim in the copy evidence. The two ownership checks use the same current team-owner role; matching Amadan connection/forge values are intentional; reachability uses one stored hello; displayed-value comparison uses the server's current project view; person and move-in turns are defined; and only the original requested name is saved after a valid final choice. No behavior was added to resolve the copy flags.
210
211An existing thintest fixture had relied on saving an unchanged repository title to bless it. It now adds an explicit owner-set team name instead, consistent with P3. The full run's other packages passed before this fixture adjustment.
212
213Size caps were raised only to rastrillo's measured values: equipo 22041, chat 33211, wire 6819 source lines; thintest 33631 test lines. Each budget entry gives the corresponding implementation or regression reason.
214
215
216Final focused checks also cover the persisted text-entry card, the person's literal typed name in history, Unicode source matching, whole proper names, common stopwords, and a new project event revision when removing a private name. Repeating removal leaves the revision unchanged. The final mutation series contains 37 killed mutations, including all eight Fable listed; every mutant was restored before the final suites.
217
218
219Final local gates: pinned gofmt/fmt-check, migration-check, copy-release-check, lanes-check, measured size budget, TestPersonAPI and all seven native fixtures passed. The full package suites and gitleaks are recorded after completion in the final controller message, together with the committed SHA, post-commit reference scan, push-helper outcome and Linux CI verdict.
220
221
222The final full Equipo suite passed in 88.108s and chat in 13.665s under concurrent local load. TestPlan3Release passed in 18.359s; TestPersonAPI in 31.252s. Gitleaks scanned 1091 commits with no leaks. Thintest and the final wire suites finish before commit.
223
224
225The final combined run passed wire (0.571s) and wireschema (1.144s). Thintest's project regressions passed, but its existing TestContractTransferTooLarge hit a 45-second send_pack deadline under concurrent host load. The isolated retry passed in 5.310s without code changes; a fresh full thintest run follows. No timeout or test expectation was weakened.
226
227
228The fresh full thintest suite passed in 225.975s. A final boundary regression proved that a trailing blank must not consume one of the 12 names: blank filtering now precedes the limit, while 13 real names still fail. Its limit guard was also mutated and killed. The final chat suite and focused project device/web contracts run after that adjustment; CI verifies the committed tree on Linux.
229
230
231Final adjustment verification passed: full chat suite 23.290s; focused project device/web and Coordinator-star contracts 11.031s. Formatting and the final measured budget passed. Final chat cap is 33211 source lines. There are no outstanding copy or product decisions. Commit, reference scan, helper push and Linux CI results are reported with the fixed SHA.
232
233
234## Linux CI on 0dba1b74
235
236Preparation, copy review and compilation passed. 28 of 29 check shards passed, including the full Equipo/chat/thintest suites, staticcheck, vet, budgets, migrations, native/API checks, gitleaks and reference scan. Headless `TestHeadless/2_find` failed twice because its earlier 62e fixture queried `oficina/sample` but still expected `calls itself Woodstar`. The catalog correctly returned `calls itself sample` for that query. With the reviewed discovery behavior restored, the fixture now queries `Woodstar` again; its quoted-reference, code-read and no-placement-question assertions remain. No production behavior or copy changed. This fixture is Linux-only because the Mac build stops at `internal/toolproxy`'s `unix.O_PATH`; the following Linux CI run is its runtime gate.
237