Repository navigation
Commit 07d60c4
committed
🔒 Let the document decide what a composition failure means
`<Repository>`, `<Worktree>` and `<Dir>` each declared `printErrors`, which is a
statement about an entire invocation rather than about the refusals they own.
The settled contract asks them for fixed, sanitized diagnostics; it does not
authorize them to recover from every nonfatal exception that passes through
them. Under that declaration a document could carry on after invalid props, a
provider that was not installed, or a protocol answer that would not parse —
running later siblings as though a checkout existed.
The rule is now one rule: these components describe known refusals, and
document-authored regions decide whether to print and continue. A recognized
refusal is still a failed durable outcome against the unchanged Workspace root
and still surfaces as the same sanitized `RepositoryCompositionError` or
`WorktreeCompositionError` — it simply fails the operation it is part of, like
any other Effection work, unless an authored `<PrintErrors>` region says
otherwise for its whole region. Nothing selective was added in its place.
Unchanged in both directions: `RepositoryStaleStateError` is a durability
failure and stays fatal through every printing boundary, and a failure of
projected content stays the caller's, decided by the region that text is written
in.
The regressions now discriminate policy rather than diagnostic text. Each pair
puts a marker after the failing element and asserts on the marker: plain, the
run fails and the marker never renders; inside `<PrintErrors>`, exactly one
error is printed and the marker does render. That covers the invalid `<Dir>`,
the Repository refusal, the Worktree refusal with and without an enclosing
Repository, and — on the durable side — that a plain refusal leaves one `err`
outcome, publishes no root and retains nothing, while the printed one continues
without repeating the effect. Three more prove what these components must never
convert: a missing provider, an unexpected host failure, and a projected-content
failure through all three boundaries.
Schema v1, persistence layout, Git identity checks, target selection, core error
semantics and #294 behavior are untouched.
Refs #2931 parent 071baee commit 07d60c4
8 files changed
Lines changed: 445 additions & 96 deletions
File tree
- packages/workflow
- src/composition
- components
- tests
- specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | | - | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
24 | 38 | | |
25 | 39 | | |
26 | 40 | | |
27 | | - | |
| 41 | + | |
28 | 42 | | |
29 | 43 | | |
30 | 44 | | |
| |||
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
71 | | - | |
| 85 | + | |
72 | 86 | | |
73 | 87 | | |
74 | 88 | | |
| |||
89 | 103 | | |
90 | 104 | | |
91 | 105 | | |
92 | | - | |
| 106 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
58 | | - | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| |||
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
95 | | - | |
| 101 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
0 commit comments