Skip to content

Commit 2c3a088

Browse files
author
gluck
committed
plans: form-deltas plan updates and the fork-on-a-form bug note (aria b2b0c543's working docs, committed to unblock the release)
1 parent 3edd6c6 commit 2c3a088

2 files changed

Lines changed: 55 additions & 43 deletions

File tree

‎plans/fork-on-a-form-bug.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This was cut from /home/gluck/dev/figaro-qua/main/plans/form-deltas-in-ui-ir.md for further review.
2+
3+
______________________________________________________________________
4+
5+
## 7. The fork-on-a-form bug, confirmed (same session, filed here for the same hand)
6+
7+
`fig fork @form` births a **figaro**, not a forked form: verified live, the
8+
child is `kind=conversation` with `aria_id` and `system.forked_from` on its
9+
board. So `fork` and `bind` on a form are SYNONYMS and one of the two names
10+
is a lie.
11+
12+
Cause, one line: `XwalStore.ForkWith` hard-codes
13+
`forkWithKind(..., kindConversation)`, while `forkWithKind`'s own comment
14+
says the caller chooses the child's species. The fork verb has no way to say.
15+
16+
**The form→form operation already exists and is already documented**:
17+
`CreateForm(parent, patch)` — *"Parent "" forks the null root; a form id
18+
duplicates that form's state into a fresh @id"* (`rpc.FormCreateRequest`).
19+
`createFormAndReport` even takes a `parent`. **Every CLI caller passes ""**,
20+
so nothing reaches it. `fig form new` while attended to a form mints a
21+
SIBLING off the null root and inherits nothing — verified.
22+
23+
So the fix is wiring, not mechanism: `fig fork` on a node of kind `form`
24+
routes to `CreateForm(parent)`. Two real questions with it:
25+
26+
1. a form's timeline is one ceremonial record, so `<id>:<turn>` addresses
27+
nothing — a form fork is always at the head, and the verb should say so
28+
rather than silently ignoring a coordinate.
29+
1. `CreateForm` REQUIRES a patch (*"a fork that transforms nothing is a fork
30+
nobody can name"*) and `fig fork` takes none. Either fork-a-form demands
31+
`-S`, or that rule is relaxed for this path. That is a ruling, not an
32+
implementation detail.
33+
34+
Recorded and NOT to be built (Gluck, explicitly): `cast` on a form with no
35+
argument minting a figaro, and a role fork meaning fork-both-and-recast.

‎plans/form-deltas-in-ui-ir.md‎

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Plan of record for the work Gluck specified on 2026-08-13. Written by aria
44
b2b0c543 (session 4) for the role holder who takes it; I am not that holder,
55
so this is a plan and not a claim about built code.
66

7-
---
7+
______________________________________________________________________
88

99
## 0. What this is
1010

@@ -62,8 +62,8 @@ The mechanism to copy (not to call) is `internal/provider/projection.go`:
6262

6363
1. each IR record carries cursors — `libretto:<sourceid>` for observed forms,
6464
the node's own form channel for the bound board;
65-
2. consecutive records bracket a window;
66-
3. the patches in that window come from `Libretto(source).PatchesBetween` for
65+
1. consecutive records bracket a window;
66+
1. the patches in that window come from `Libretto(source).PatchesBetween` for
6767
a studied form, and from the board's own `FormPatchesBetween` for the
6868
bound one.
6969

@@ -87,9 +87,9 @@ as the translator ignores them. An old transcript shows no form deltas.
8787

8888
Both are derived from ordinary deltas; neither needs a new channel.
8989

90-
| when | the TUI says |
91-
|---|---|
92-
| `aria_id` changes on the BOUND form | *This figaro has been forked from `<id>`* |
90+
| when | the TUI says |
91+
| ---------------------------------------------- | ---------------------------------------------- |
92+
| `aria_id` changes on the BOUND form | *This figaro has been forked from `<id>`* |
9393
| `target-aria` changes on a form of kind `role` | *Role `<formid>` recast to figaro `<aria id>`* |
9494

9595
The first is available today without inference: a fork's birth patch stamps
@@ -113,16 +113,25 @@ Global theming: take colours from the theme table rather than literals, and
113113
add a token (`stateDim` or similar) rather than reusing the comment colour by
114114
coincidence. One name, one meaning.
115115

116+
- note that each line should be truncated to the width of the screen. Use
117+
common sense and tui design skill for creating visually appealing tui indicators.
118+
Form id, path, and whatever event text we chose should be rendered in a visibly
119+
pleasing, but succinct way. Since the deltas will appear in a node patch,
120+
I do not expect them to be individually selectable. They should be selected
121+
and yanked alongside whatever node they are defined one. Selection / enter in TUI
122+
should expand it. Use the verbose fig show flag or whatever is appropriate for
123+
viewing them in standard out rather than in TUI alt screen.
124+
116125
## 5. Build order
117126

118127
1. **The types** (`livedoc.Node`, `aria.Turn`, `FormDelta`): additive,
119128
`omitempty`, nothing reads them yet. Wire-compatible with old clients.
120-
2. **The hub-side assembly**, behind a function with its own test: given a
129+
1. **The hub-side assembly**, behind a function with its own test: given a
121130
record range and a store, produce the deltas. This is where the cursor
122131
arithmetic lives and where the three inherited rules are enforced.
123-
3. **The projector** (`internal/uiir`) attaches them to nodes.
124-
4. **The TUI** draws them.
125-
5. **The two sentences**, last, because they are a rendering of (1)-(4) and
132+
1. **The projector** (`internal/uiir`) attaches them to nodes.
133+
1. **The TUI** draws them.
134+
1. **The two sentences**, last, because they are a rendering of (1)-(4) and
126135
not a mechanism.
127136

128137
Each step is independently testable, and 1-2 are safe to land alone.
@@ -142,36 +151,4 @@ Each step is independently testable, and 1-2 are safe to land alone.
142151
render twice, assert equality, and make it fail if anyone reaches for the
143152
provider cache to speed it up.
144153

145-
---
146-
147-
## 7. The fork-on-a-form bug, confirmed (same session, filed here for the same hand)
148-
149-
`fig fork @form` births a **figaro**, not a forked form: verified live, the
150-
child is `kind=conversation` with `aria_id` and `system.forked_from` on its
151-
board. So `fork` and `bind` on a form are SYNONYMS and one of the two names
152-
is a lie.
153-
154-
Cause, one line: `XwalStore.ForkWith` hard-codes
155-
`forkWithKind(..., kindConversation)`, while `forkWithKind`'s own comment
156-
says the caller chooses the child's species. The fork verb has no way to say.
157-
158-
**The form→form operation already exists and is already documented**:
159-
`CreateForm(parent, patch)` — *"Parent \"\" forks the null root; a form id
160-
duplicates that form's state into a fresh @id"* (`rpc.FormCreateRequest`).
161-
`createFormAndReport` even takes a `parent`. **Every CLI caller passes ""**,
162-
so nothing reaches it. `fig form new` while attended to a form mints a
163-
SIBLING off the null root and inherits nothing — verified.
164-
165-
So the fix is wiring, not mechanism: `fig fork` on a node of kind `form`
166-
routes to `CreateForm(parent)`. Two real questions with it:
167-
168-
1. a form's timeline is one ceremonial record, so `<id>:<turn>` addresses
169-
nothing — a form fork is always at the head, and the verb should say so
170-
rather than silently ignoring a coordinate.
171-
2. `CreateForm` REQUIRES a patch (*"a fork that transforms nothing is a fork
172-
nobody can name"*) and `fig fork` takes none. Either fork-a-form demands
173-
`-S`, or that rule is relaxed for this path. That is a ruling, not an
174-
implementation detail.
175-
176-
Recorded and NOT to be built (Gluck, explicitly): `cast` on a form with no
177-
argument minting a figaro, and a role fork meaning fork-both-and-recast.
154+
______________________________________________________________________

0 commit comments

Comments
 (0)