docs(adr): delete ADR 007's remaining open questions (improvise-cq1q.1)
The duplicate measure display follows from the profit-<n> rule and is stated as its consequence; where stored measures are listed is the format's existing concern; interactive typing is UI behaviour, not identity. The Open questions section now says None. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
committed by
Edward Langley
parent
4778d9741b
commit
c7f8d0a3cd
@@ -29,7 +29,7 @@ amendment is approved:
|
||||
| 12 | a typed name new to a formula edit is resolved against the document at commit | the client resolves it, ids first, and the wire carries only id-form text |
|
||||
| 12 | the regression test commits the **unedited** text after the concurrent renames | the test edits a non-name token and commits, because a client may pass unedited text as a no-op without resolving any name |
|
||||
|
||||
Three questions are open (last section).
|
||||
No questions are open.
|
||||
|
||||
## Context
|
||||
|
||||
@@ -112,8 +112,8 @@ the reservation needs no check in the grammar.
|
||||
declarations.** The loader recognises `_Measure`, `_Index` and `_Dim` by their
|
||||
hardcoded displays, and an old `## Category: _Measure` section is read for the
|
||||
stored measures it lists, not as a declaration of `_measure`. The first save writes
|
||||
`_measure` wherever the file refers to it. Where a new-version file declares the
|
||||
stored measures themselves (`Revenue`, `Cost`) is open question 2.
|
||||
`_measure` wherever the file refers to it. The stored measures themselves
|
||||
(`Revenue`, `Cost`) are listed as the format lists them today, each with its id.
|
||||
- **[Amendment] Records mode's synthetic positions are values, not ids.** The row
|
||||
coordinate under `_index` is a value of that virtual category. So, by the same
|
||||
reasoning, is the column coordinate under `_dim` (a column index, gotcha 1). They are
|
||||
@@ -140,8 +140,10 @@ one, for a derived dimension.
|
||||
the new formula is a second measure with a fresh id, `profit-<n>` from the shared
|
||||
counter (clause 4), like any colliding generated id. The stored measure keeps
|
||||
`profit` and its data. Removing the formula removes `profit-<n>` and leaves `profit`
|
||||
untouched. Both are displayed `Profit`, which clause 2's display-uniqueness rule
|
||||
does not allow; open question 1 asks how that is resolved.
|
||||
untouched. The formula keeps the display the user typed, so both are displayed
|
||||
`Profit` and are told apart by id: the formula panel shows the ids where the display
|
||||
is ambiguous (clause 6), and a typed `Profit` that matches both is refused with both
|
||||
ids listed (clause 12).
|
||||
- **[Amendment] A target outside `_Measure` is a real item**, with its own `ItemId`,
|
||||
and its formula has a separate `FormulaId`. A formula whose generated id would
|
||||
collide takes a suffix like any other generated id (clause 4): a formula `Tax` in
|
||||
@@ -188,9 +190,9 @@ human-typed name resolves to exactly one id within its scope, and a rename to a
|
||||
display already in use there is refused. An item's scope is its category, so two
|
||||
categories may each have an item displayed `Revenue`. Formula text crosses
|
||||
categories, so a display may be ambiguous there. The ids differ, so the formula panel
|
||||
shows the ids where a display is ambiguous. **[Amendment]** A formula and a stored
|
||||
measure may end up sharing a display (clause 1); whether that is an exception to this
|
||||
rule is open question 1.
|
||||
shows the ids where a display is ambiguous. **[Amendment]** The one exception is a formula
|
||||
whose measure shares a stored measure's display (clause 1): it is created anyway, and
|
||||
the two are told apart by id.
|
||||
|
||||
### 3. Ids are interned symbols
|
||||
|
||||
@@ -507,8 +509,6 @@ display that would otherwise read as display plus id:
|
||||
its display fails. A script gets a display only through a dedicated function such as
|
||||
`display_for(id)`.
|
||||
- **[Amendment] Interactive typing prefers ids and previews displays** (clause 12).
|
||||
Whether an interactive input still resolves typed text that matches no id by
|
||||
display is open question 3.
|
||||
- **A frame cannot address a thing it creates**, because it does not know the id the
|
||||
host will assign. A create-then-act compound becomes **one command**:
|
||||
`create-and-switch-view` sends `[CreateView, SwitchView]` today and becomes
|
||||
@@ -679,8 +679,7 @@ answers for those.
|
||||
- A typed name equal to an id names that id's thing, even where it is also another
|
||||
thing's display.
|
||||
- Otherwise a display that exactly one thing in scope has names that thing, and a
|
||||
display matching several things is refused with a list of their ids. Whether this
|
||||
display stage stays is open question 3.
|
||||
display matching several things is refused with a list of their ids.
|
||||
- A name that resolves to nothing is refused, and the refusal names it.
|
||||
- Ids are matched exactly, with no case folding.
|
||||
- **Typing prefers ids and previews displays.** A view-layer autocomplete turns typed
|
||||
@@ -716,8 +715,7 @@ without resolving any name (improvise-hexb).
|
||||
(`east`, `east-1`), type `east` into an editor, in text not captured at open:
|
||||
- it must bind A, and the test must fail under displays-first;
|
||||
- `east-1` must bind B;
|
||||
- a display that is nobody's id must still resolve by display (pending open
|
||||
question 3).
|
||||
- a display that is nobody's id must still resolve by display.
|
||||
|
||||
A fixture where no display equals an id proves nothing.
|
||||
|
||||
@@ -783,73 +781,4 @@ three things:
|
||||
|
||||
## Open questions
|
||||
|
||||
These are open, and nothing above depends on an answer except where it says so.
|
||||
|
||||
### 1. Two measures with the same display: is that allowed?
|
||||
|
||||
**The question.** A formula never merges into a stored measure (clause 1): with a stored
|
||||
`Profit` (id `profit`) in the document, adding the formula `Profit = Revenue - Cost`
|
||||
creates a second measure, `profit-1`. Both are displayed `Profit`. But clause 2 keeps
|
||||
displays unique within their scope, and both measures are in `_measure`'s scope.
|
||||
|
||||
**Why it matters.** Under the uniqueness rule, adding that formula would be refused,
|
||||
which contradicts clause 1.
|
||||
|
||||
**Options.**
|
||||
- **(a) Allow duplicate displays among measures only.** The formula panel already
|
||||
shows ids wherever a display is ambiguous (clause 6), and typing prefers ids
|
||||
(clause 12), so the two stay distinguishable.
|
||||
- **(b) Drop display uniqueness everywhere.** Ids carry identity, and every place that
|
||||
shows displays already falls back to ids when they clash.
|
||||
- **(c) Keep uniqueness and give the new formula a different display**, such as
|
||||
`Profit 1`, chosen by the host.
|
||||
|
||||
**Author's recommendation:** (a). It is the smallest change that makes clause 1 hold.
|
||||
|
||||
### 2. Where does a file declare the stored measures?
|
||||
|
||||
**The question.** `_measure` is never declared: it holds whatever meets its criterion,
|
||||
and its id and display are hardcoded (clause 1). But the stored measures in it, such as
|
||||
`Revenue` and `Cost`, are ordinary things with a user's display and a generated id, so
|
||||
the file must declare each one. Today they are listed under the virtual category's own
|
||||
header, which a new-version file no longer writes:
|
||||
|
||||
```
|
||||
## Category: _Measure
|
||||
- Revenue, Cost
|
||||
```
|
||||
|
||||
**Why it matters.** Without a declaration a stored measure has no display or id in the
|
||||
file, and a new-version file refuses any undeclared id (clause 5). The declaration is
|
||||
also what puts a stored measure into `_measure`'s criterion.
|
||||
|
||||
**Options.**
|
||||
- **(a) A dedicated section**, such as `## Measures`, with item lines
|
||||
(`- Revenue(revenue), Cost(cost)`). Being declared there is what makes something a
|
||||
stored measure.
|
||||
- **(b) A marker on an ordinary item line**, wherever the measure is listed, for
|
||||
example `- Revenue(revenue) [measure]`.
|
||||
|
||||
**Author's recommendation:** (a). It names what the section holds, and keeps the
|
||||
virtual category's header out of the file.
|
||||
|
||||
### 3. Does interactive typing still resolve a display name that matches no id?
|
||||
|
||||
**The question.** Only CSV import and the `.improv` loaders turn display names in input
|
||||
text into ids (clause 6). Interactive typing (the TUI's minibuffers and `:` line, the
|
||||
formula editor, the browser) prefers ids and shows the display as a preview
|
||||
(clause 12). Clause 12's resolver also has a display stage: typed text that matches no
|
||||
id but is exactly one thing's display names that thing. Does that stage stay?
|
||||
|
||||
**Why it matters.** Without it, a person typing `Revenue` in the formula editor must
|
||||
type or pick the id `revenue`. With it, a typed display still works, and interactive
|
||||
input is a third place that reads display names.
|
||||
|
||||
**Options.**
|
||||
- **(a) Keep the display stage** for interactive typing only. Command-language text
|
||||
from scripts never gets it.
|
||||
- **(b) Ids only.** Interactive inputs match ids; displays appear only as previews and
|
||||
autocomplete suggestions, which insert the id.
|
||||
|
||||
**Recommendation:** none. "Prefer ids" leaves room for (a); "only import and the
|
||||
loaders read display names" points to (b).
|
||||
None.
|
||||
|
||||
Reference in New Issue
Block a user