Skip to content

Commit b4bbf28

Browse files
committed
revert: undo stray formatter output across docs and scripts
Three separate `oxfmt <path>` runs in this branch reformatted files the repo's `format` script deliberately excludes: 55 files under scripts/maestro-conformance plus scripts/perf, sync-mcp-metadata and the slow-test reporter, and 12 markdown files including six ADRs and docs/agents/. All of it was whitespace, quote style and markdown table padding — no content — but it inflated the diff a reviewer has to read and would have rewritten prose ownership across files this change has no business touching. All 70 are back to their origin/main content, so the diff outside src/ is now exactly this change's scope: three docs, scripts/layering, the Fallow baseline, and five provider integration tests. The rule this violated is now in AGENTS.md: run `pnpm format`, never `oxfmt <path>`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bfu8HofkhybiAm5LECfqur
1 parent f7054d7 commit b4bbf28

70 files changed

Lines changed: 283 additions & 437 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/adr/0003-daemon-command-registry.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,28 +58,28 @@ owns the rationale so future changes do not need to infer it from agent instruct
5858

5959
A later proposal (the `CommandDescriptor` direction, now [ADR 0008](0008-command-descriptor-registry.md)) unifies a command's
6060
declarations so the public catalog, capability matrix, CLI/MCP projections, batch allowlist, and this
61-
daemon registry are _derived_ from one registration site, to remove the cross-table drift that several
61+
daemon registry are *derived* from one registration site, to remove the cross-table drift that several
6262
of these surfaces are kept aligned against by convention.
6363

64-
**This ADR's decision stands.** Its boundary is about _ownership_ and the _predicate interface_, not
64+
**This ADR's decision stands.** Its boundary is about *ownership* and the *predicate interface*, not
6565
about the physical file a trait is typed in. "Separate source of truth" means separately owned and
6666
exposed through named predicates — a property that survives a projected/derived backing table. A
6767
derived daemon registry is therefore permitted **only if** it preserves all of the following invariants:
6868

6969
1. **Daemon-owned declaration.** Route and request-policy traits are declared in a daemon-owned facet
70-
(under `src/daemon/`) and _composed_ into the registration — never inlined as fields on the public
71-
command contract in `src/commands/**` or `src/command-catalog.ts`. Co-locating a registration _call_
72-
is fine; co-locating _ownership_ of daemon policy in the public surface is the contamination this ADR
70+
(under `src/daemon/`) and *composed* into the registration — never inlined as fields on the public
71+
command contract in `src/commands/**` or `src/command-catalog.ts`. Co-locating a registration *call*
72+
is fine; co-locating *ownership* of daemon policy in the public surface is the contamination this ADR
7373
rejected (see Alternatives, "Keep daemon groups in `src/command-catalog.ts`").
7474
2. **Predicate interface unchanged.** Consumers keep asking daemon-policy questions through the named
7575
predicates (`getDaemonCommandRoute`, `isLeaseAdmissionExempt`, `shouldLockSessionExecution`, …). The
76-
daemon registry remains their sole exposer; derivation changes how the backing table is _built_, not
77-
how it is _read_.
76+
daemon registry remains their sole exposer; derivation changes how the backing table is *built*, not
77+
how it is *read*.
7878
3. **No leakage into public projections.** The catalog/CLI/MCP/help/capability projections must be
7979
type-prevented from reading daemon-only traits, and the daemon registry must still not define CLI
8080
grammar, Node.js options, MCP schemas, user-facing help, or capability support.
8181
4. **One declaration per concern, enforced by types.** The single registration site must make a missing
82-
or duplicated daemon trait a _compile error_ — replacing today's "aligned by convention". This is the
82+
or duplicated daemon trait a *compile error* — replacing today's "aligned by convention". This is the
8383
structural improvement that justifies derivation over a separately hand-authored table.
8484

8585
A single flat public descriptor whose daemon fields leak into public views is **not** permitted — that is

‎docs/adr/0011-interaction-guarantee-contract.md‎

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ read/wait surfaces built on the same resolution machinery) reach the device
1111
through several dispatch paths, each of which chose its latency-vs-semantics
1212
trade-offs independently:
1313

14-
| Path | What it is | Why it exists |
15-
| ----------------------- | ---------------------------------------------------------------------- | --------------------------------------------- |
16-
| `runtime-selector` | daemon tree capture → `resolveSelectorChain` → guards → coordinate tap | full semantics |
17-
| `runtime-ref` | session snapshot → ref lookup → guards → coordinate tap | full semantics |
18-
| `direct-ios-selector` | selector sent to the XCTest runner, which queries and taps natively | saves a full snapshot round trip |
19-
| `native-ref` | `backend.tapTarget`/`fillTarget` for `click @ref` / `fill @ref` | saves resolution round trips |
20-
| `coordinate` | raw x/y tap | escape hatch; semantics intentionally minimal |
21-
| replay/maestro variants | `allowNonHittableCoordinateFallback`, replay-heal | third-party compat |
14+
| Path | What it is | Why it exists |
15+
| --- | --- | --- |
16+
| `runtime-selector` | daemon tree capture → `resolveSelectorChain` → guards → coordinate tap | full semantics |
17+
| `runtime-ref` | session snapshot → ref lookup → guards → coordinate tap | full semantics |
18+
| `direct-ios-selector` | selector sent to the XCTest runner, which queries and taps natively | saves a full snapshot round trip |
19+
| `native-ref` | `backend.tapTarget`/`fillTarget` for `click @ref` / `fill @ref` | saves resolution round trips |
20+
| `coordinate` | raw x/y tap | escape hatch; semantics intentionally minimal |
21+
| replay/maestro variants | `allowNonHittableCoordinateFallback`, replay-heal | third-party compat |
2222

2323
Over one week of fixes, every interaction bug we shipped or caught was the same
2424
shape — a guarantee enforced on one path and silently absent on a sibling:
@@ -36,8 +36,8 @@ shape — a guarantee enforced on one path and silently absent on a sibling:
3636
`snapshot` — same failure mode — preserved the daemon (#1075).
3737

3838
The guarantees themselves are small and well-implemented. What is missing is
39-
any structure that _knows the full set of paths and the full set of
40-
guarantees_ and can therefore notice an unfilled cell. Reviews catch cells
39+
any structure that *knows the full set of paths and the full set of
40+
guarantees* and can therefore notice an unfilled cell. Reviews catch cells
4141
only when a reviewer happens to hold both axes in their head; dogfooding
4242
catches them one production incident at a time.
4343

@@ -63,14 +63,14 @@ every cell to be classified:
6363

6464
```ts
6565
export const INTERACTION_GUARANTEES = [
66-
'disambiguation', // visible > deepest > smallest; ties fail
67-
'occlusion', // covered targets are refused
68-
'offscreen', // tap point (rect center) must lie in the root viewport
69-
'nonHittable', // promotion + targetHittable/hint annotation
70-
'responseConstruction', // one shared response construction site (Layer 2)
71-
'responseIdentity', // refLabel/selectorChain availability on this path
72-
'verifyEvidence', // --verify baseline + post-action digest
73-
'errorTaxonomy', // no-match/ambiguous/offscreen codes, messages, hints
66+
'disambiguation', // visible > deepest > smallest; ties fail
67+
'occlusion', // covered targets are refused
68+
'offscreen', // tap point (rect center) must lie in the root viewport
69+
'nonHittable', // promotion + targetHittable/hint annotation
70+
'responseConstruction', // one shared response construction site (Layer 2)
71+
'responseIdentity', // refLabel/selectorChain availability on this path
72+
'verifyEvidence', // --verify baseline + post-action digest
73+
'errorTaxonomy', // no-match/ambiguous/offscreen codes, messages, hints
7474
] as const;
7575
```
7676

@@ -89,10 +89,11 @@ selector diagnostics and hints — because direct runner paths can close codes
8989
long before full diagnostics.
9090

9191
```ts
92+
9293
export type GuaranteeEnforcement =
93-
| { kind: 'runtime'; via: string } // shared TS implementation (symbol name)
94+
| { kind: 'runtime'; via: string } // shared TS implementation (symbol name)
9495
| { kind: 'runner'; via: string; parityTable?: string } // Swift twin; parityTable optional until Layer 3, required once the cell claims parity
95-
| { kind: 'delegated'; to: InteractionPathId } // path defers (e.g. direct → runtime on ELEMENT_OFFSCREEN)
96+
| { kind: 'delegated'; to: InteractionPathId } // path defers (e.g. direct → runtime on ELEMENT_OFFSCREEN)
9697
| { kind: 'waived'; reason: string; trackingIssue?: string }; // explicit, reviewed waiver; gap waivers must carry a tracking issue
9798

9899
export const INTERACTION_DISPATCH_PATHS: Record<
@@ -102,9 +103,7 @@ export const INTERACTION_DISPATCH_PATHS: Record<
102103
commands: readonly string[];
103104
guarantees: Record<InteractionGuarantee, GuaranteeEnforcement>;
104105
}
105-
> = {
106-
/* every path, every cell */
107-
};
106+
> = { /* every path, every cell */ };
108107
```
109108

110109
Because `guarantees` is a `Record` over the guarantee union, **tsc fails** the
@@ -194,7 +193,7 @@ guarantee needs:
194193
prove the success path too.
195194
- **A shared runtime preflight for the native-ref path**: the ref came from a
196195
daemon snapshot, so the node is already in hand — check offscreen /
197-
occlusion / non-hittable against it _before_ calling
196+
occlusion / non-hittable against it *before* calling
198197
`tapTarget`/`fillTarget`. A backend fast path can silently "succeed", so
199198
delegation-on-error would never trigger there.
200199

@@ -222,7 +221,7 @@ the daemon there destroyed every healthy app session the daemon owned.
222221

223222
## Consequences
224223

225-
- Adding a dispatch path or a guarantee becomes a _forced_ whole-matrix
224+
- Adding a dispatch path or a guarantee becomes a *forced* whole-matrix
226225
decision: tsc will not compile an unclassified cell, and the gate will not
227226
pass an untested one. Silent erosion is structurally impossible; explicit
228227
waivers remain possible but visible and linkable to issues.

0 commit comments

Comments
 (0)