Answer prose round 1: 0 🔴, 6 🟡 (0 misread); the codec's docstring and the decision say which pair the loop uses and why, the entry sits in order, and item 395 names its parts once
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
It runs @larvit/adf-codec, a Node package, in a throwaway container that holds node_shim/shim.mjs; the shim's header says what its exit status means.
|
||||
|
||||
adf-codec has two pairs of calls, and each function here names the one it runs:
|
||||
- The lossless pair, `*_lossless`, for a document that already exists in Jira or Confluence and is edited and saved back. It keeps each block's localId and the empty paragraphs Jira uses for spacing, so a document read and saved unedited comes back identical.
|
||||
- The portable pair, with no suffix, for new text written from scratch, and for markdown shown to a person. It drops the localId and the empty paragraphs, so saving a document that exists changes it.
|
||||
- The portable pair, with no suffix, which the loop's tools use. It drops each block's localId and the empty paragraphs Jira uses for spacing, so saving a document read by it changes the document; a tool that saves one unedited sends nothing instead (`docs/decisions.md` → `project config: the loop shows a Jira description and a Confluence page as adf-codec's portable markdown, …`).
|
||||
- The lossless pair, `*_lossless`, which keeps both, so a document read and saved unedited comes back identical. Its markdown wraps every block in `!adf:` marker lines, so no tool reads by it yet.
|
||||
"""
|
||||
import contextlib
|
||||
import dataclasses
|
||||
|
||||
@@ -186,7 +186,7 @@ class JiraPlan:
|
||||
return Failure(f"cannot convert the item's detail to a Jira description: {description.reason}") if isinstance(description, Failure) else description
|
||||
|
||||
def shows(self, issue: Issue, detail: str) -> bool:
|
||||
"""Whether detail is the issue's description as a read shows it. An edit leaves such a description as Jira holds it: converting the markdown back would drop the localIds and spacing paragraphs that the markdown a read shows leaves out."""
|
||||
"""Whether detail is the issue's description as a read shows it. An edit leaves such a description as Jira holds it, since converting the markdown back would drop each block's localId and Jira's spacing paragraphs."""
|
||||
if issue.description is None:
|
||||
return not detail.strip()
|
||||
texts = self.to_markdown([issue.description])
|
||||
|
||||
@@ -518,7 +518,7 @@ class Editing(unittest.TestCase):
|
||||
self.edit(34, {"E": "3"})
|
||||
self.assertEqual([body for _, _, body in self.writes()], [{"fields": {"summary": "Count every run."}}, {"properties": [{"key": "plan-item", "value": PROPERTY | {"E": 3}}]}])
|
||||
|
||||
def test_a_detail_as_the_description_reads_leaves_the_description_as_jira_holds_it(self):
|
||||
def test_a_detail_unchanged_since_the_read_leaves_the_description_as_jira_holds_it(self):
|
||||
# Jira's own spacing paragraph and localIds, which a description converted back from markdown would lose.
|
||||
held = {"type": "doc", "version": 1, "content": [{"type": "paragraph", "attrs": {"localId": "p-1"}, "content": [{"type": "text", "text": "Why it counts."}]}, {"type": "paragraph", "attrs": {"localId": "p-2"}}]}
|
||||
self.open = [issue("ABC-34", scores=PROPERTY, description=held)]
|
||||
|
||||
@@ -21,7 +21,7 @@ SHAPE = "not in the shape Confluence Cloud's REST API version 2 documents"
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Seen:
|
||||
"""The page's version number and title as a read found them or a write left them, and the digest of the markdown it found or sent. A write needs all three, so a Held's version holds them, as JSON."""
|
||||
"""The page's version number and title as a read found them or a write left them, and the digest of the markdown it found or sent. A write needs the version and title, and sends nothing where its text has that digest, so a Held's version holds all three, as JSON. The digest is None where the version came from a request that held no text."""
|
||||
version: int
|
||||
title: str
|
||||
digest: str | None = None
|
||||
@@ -88,7 +88,7 @@ class ConfluencePage:
|
||||
seen = self.seen_of(over)
|
||||
if isinstance(seen, Failure):
|
||||
return seen
|
||||
# The markdown a read shows drops the localIds and spacing paragraphs Confluence holds, so writing the text a read found back would lose them: leave the page alone. No write means no 409, so the version is read instead: a save over a teammate's edit refuses whether or not the text changed.
|
||||
# A read's markdown leaves out the localIds and spacing paragraphs Confluence holds, so a write of the same text back would drop them: send nothing. Without a write Confluence answers no 409, so read the version to refuse where a teammate saved since.
|
||||
if over is not None and seen.digest == digest_of(text):
|
||||
current = self.fetched("")
|
||||
if isinstance(current, Failure):
|
||||
|
||||
+5
-5
@@ -24,9 +24,9 @@ Each project principle states one rule that the decisions below apply; their ent
|
||||
- principles: about seven things per level, four or five where they act on each other, more where a reader finds them by name; crossing a limit asks for a grouping or a recorded reason
|
||||
- project config: a record may name a Confluence Cloud page as `confluence:` and its address, the loop reads and writes it as markdown, and a write never overwrites a save made since the loop's read
|
||||
- project config: a tool that reads a file's commits says where it does not support that file, and the work goes on
|
||||
- project config: the loop shows a Jira description and a Confluence page as adf-codec's portable markdown, and a save that hands back the text it showed leaves the document as Jira or Confluence holds it
|
||||
- project config: `language` names the prose's language by its English name, and `commit-title`, `pull-request-title` and `branch` are brace templates over `{id}` and `{summary}`
|
||||
- project config: `plan` may name a Jira Cloud epic as `jira:` and its address, the plan is its open child issues in backlog order, and an issue's number is the item's ID
|
||||
- project config: the loop shows a Jira description and a Confluence page as adf-codec's portable markdown, and a save whose text is the text a read showed leaves the document as Jira or Confluence holds it
|
||||
- project config: `tooling-on-host = true` lets a project with no container setup run its language runtime, package manager, tests and task runner on the host
|
||||
- review: a release review fixes its findings in the release it reviews, and files under that release only a finding that needs a human answer, adds a feature or outlasts its five rounds
|
||||
- review: a reviewer or comprehension seat that rules the work below standard may ask to rerun once, one rung up, in the same round; the ruling that stands is an escalation trigger for the worker unless the fix changes only prose, and never for the judge
|
||||
@@ -324,10 +324,6 @@ Valid while the later fixes per finished chunk, which `score-outcomes` and the r
|
||||
- **A store keeps no version: its caller hands each write the version it writes over.** lilleman chose this on 2026-11-16, when 0.11.0's release review found the version kept as the store's hidden state, which made a write rest on whichever read came before it. `project-record` keeps the version `open` read in a file beside its copy, `~/.local/state/project-record/<key>/<worktree>/<record>.version`, since `save` runs in a later process, and each save keeps the version it left for the next. Every other tool writes over the version its own read gave, so a read by another tool, such as larv-review's, never moves the version an edit in `project-record` rests on. The folder `<worktree>` is named for the worktree that ran `open`, and `open` removes the folders of worktrees git no longer lists, so a chunk's copy doesn't outlive its worktree.
|
||||
- **The page holds ADF, which adf-codec converts both ways**, so a teammate reads the record as Confluence renders it. Where adf-codec cannot convert the markdown, the write fails with adf-codec's error. A node markdown cannot hold reads as text: a mention as its name, a macro as `_(<macro> not included)_`. So the next write replaces it with that text, and a record page should hold only what markdown can.
|
||||
|
||||
## project config: the loop shows a Jira description and a Confluence page as adf-codec's portable markdown, and a save that hands back the text it showed leaves the document as Jira or Confluence holds it
|
||||
|
||||
2026-11-17, claude, through item 391. Serves goal 1.6: a team's own spacing and block ids stay in its Jira and Confluence, and agents, the judge and people still read the text easily (goal 1.4's reading cost). adf-codec's lossless pair keeps each block's localId and Jira's spacing paragraphs, but wraps every block in `!adf:` marker lines, which triples a short detail's lines (larvit/adf-codec#185). So reads stay on the portable pair, and a save leaves the document alone where its text is the text a read showed: `JiraPlan.shows` compares a new detail with the description converted again, and `ConfluencePage` keeps the digest of the text it read in the version a write names. Valid while every edit replaces a whole document: an edit that changes one line still rewrites it by the portable pair, dropping the localIds and spacing paragraphs everywhere, until `todo.md` item 395 keeps each block the edit didn't change.
|
||||
|
||||
## project config: a tool that reads a file's commits says where it does not support that file, and the work goes on
|
||||
|
||||
2026-11-13, larv-review. Serves goal 1.6: a client's plan and records live in the config's folder, and the loop still runs there. A file the config puts outside the checkout has no commit in the project's history, so a tool that needs the file's commits cannot do its job for it. No such tool blocks the loop or a merge, and each says what it leaves undone:
|
||||
@@ -369,6 +365,10 @@ Messages keep each file's usual name, such as `todo.md`, as its label, since the
|
||||
- **`todo-item edit --comment` carries the comment, and a plan in a file takes the flag and keeps no comment**, so one command works in every project, as goal 1.3 asks. A bench of readers picked the spelling: three fresh readers, seated as the consultant who runs the loop in a client's project, each picked `--comment` over `--reason`, `--why` and `--because`. Only it says the text is posted where the team reads it, and `--reason` read as `--exempt`'s reason.
|
||||
- **The store finishes an item with the transition that the config's `jira-finish-transition` names**, which must lead to the status `jira-finish-status` names, since each Jira workflow differs (lilleman's call, 2026-11-12); any open child of the epic may move. It refuses a status outside Jira's done status category: the read counts an issue as finished only in that category, so the item would stay in the plan. Where the issue's present status has no direct transition to the status `jira-finish-status` names, `todo-item finish` fails and a person moves the issue in Jira: the store never walks an issue through other statuses to reach it. lilleman answered on 2026-11-15: "If it is possible to move it to done without a transisiont, that should happen. If not, fail." The implementer read "without a transition" as "without a transition in between". `rank_todo.py` refuses to rank a plan in Jira, and its `--check` passes, since Jira's backlog ranks it; rule-hook's rank check skips it. Each read first asks Jira for the epic itself, since a search under an epic the account cannot see answers no issues, as a finished plan does.
|
||||
|
||||
## project config: the loop shows a Jira description and a Confluence page as adf-codec's portable markdown, and a save whose text is the text a read showed leaves the document as Jira or Confluence holds it
|
||||
|
||||
2026-11-17, claude, through item 391. Serves goal 1.6: a team's Jira and Confluence keep each block's localId and the empty paragraphs Jira uses for spacing, and agents, the judge and people still read the text easily, which keeps goal 1.4's reading cost down. adf-codec converts markdown and ADF by two pairs of calls, as `bin/adf_codec/convert.py` says. The lossless pair keeps the localIds and spacing paragraphs, but wraps every block in two `!adf:` marker lines: a five-line detail became 17 lines in a trial (larvit/adf-codec#185). The portable pair drops both. So the loop reads by the portable pair, and leaves a document alone where a save's text is the text a read showed. `JiraPlan.shows` compares a new detail with the description converted again. `ConfluencePage` keeps the digest of the text it read in the version a write names, and checks that the page still holds that version. Valid while the lossless markdown wraps every block in marker lines. A save that changes one line still rewrites the whole document by the portable pair, and so drops every localId and spacing paragraph, until `todo.md` item 395 keeps each block the save didn't change.
|
||||
|
||||
## project config: `tooling-on-host = true` lets a project with no container setup run its language runtime, package manager, tests and task runner on the host
|
||||
|
||||
2026-11-12, lilleman, through todo item 358. Serves goal 1.6: a legacy product may have no container setup, and the loop works in it without its owners adding one. `CLAUDE.md`'s container rule and the stability reviewer follow the setting. rule-hook checks only how a container starts, its memory limits and its image's pin, never where a runtime runs, so it needs no change. A decision may still put one tool on the host where the project has containers, as this repo's `bin/` decision does. Readers seated as the person who writes the config picked the key, 2 of 3. Valid while the loop runs on the machine that holds the checkout.
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
| 193 | 0.14.0 | | | **Narrow `numbered`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy.** | 1 | 1 | 3 | 3 | 1 | 1.1 by 2 | 0.9 |
|
||||
| 194 | 0.14.0 | | | **Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 0.9 |
|
||||
| 265 | 0.14.0 | | | **Archive each wait that costs a chunk wall time, for a usage limit, low memory, a failed worker start or a heavy slot, with its start and end stamps, so goal 1.5's hours split waiting from work.** | 3 | 2 | 2 | 5 | 4 | 1.5 by 3 | 0.8 |
|
||||
| 395 | 0.14.0 | | decision | **Keep each block a save didn't change as Jira or Confluence holds it, with its localId and spacing paragraphs.** | 3 | 2 | 2 | 5 | 5 | 1.6 by 4 | 0.8 |
|
||||
| 395 | 0.14.0 | | decision | **Keep each block a save didn't change, with its localId, and the spacing paragraphs beside it as Jira or Confluence holds them.** | 3 | 2 | 2 | 5 | 5 | 1.6 by 4 | 0.8 |
|
||||
| 169 | 0.14.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 0.7 |
|
||||
| 197 | 0.14.0 | | | **Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`.** | 2 | 2 | 3 | 5 | 2 | 1.5 by 1 | 0.4 |
|
||||
| 1 | 0.15.0 | | question | **Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 1 | 2 | 1 | 2 | 1 | | 0.0 |
|
||||
@@ -578,9 +578,9 @@ Found by review of PR #317. The black-box test, `bin/loop_claude/test_black_box.
|
||||
|
||||
No record holds these waits today. An outcomes file holds verdicts, stops, step-ups and the judge's cost (`bin/transcript_archive/outcomes.py`), and `~/.local/state/run-heavy/` holds only the slots' lock files. loop-claude waits out a usage limit and low memory in `bin/loop_claude/cycle/retry.py`; run-heavy waits for a slot in `bin/run_heavy/`. A heavy slot's wait happens inside a worker's Bash call, so loop-claude doesn't see it; run-heavy would write it where the archive can find it.
|
||||
|
||||
### 395. Keep each block a save didn't change as Jira or Confluence holds it, with its localId and spacing paragraphs.
|
||||
### 395. Keep each block a save didn't change, with its localId, and the spacing paragraphs beside it as Jira or Confluence holds them.
|
||||
|
||||
Today a Jira detail edited in one line, or a Confluence record with one entry appended, is written back whole by adf-codec's portable pair, so every block loses its localId and Jira's spacing paragraphs go. A save whose text is unchanged already leaves the document alone (`docs/decisions.md` → `project config: the loop shows a Jira description and a Confluence page as adf-codec's portable markdown, …`). Match the saved markdown's top-level blocks against the held document's, as the portable pair reads each, and send the held block where they match. The decision's "Valid while" ends with this item.
|
||||
Today a Jira detail edited in one line, or a Confluence record with one entry appended, is written back whole by adf-codec's portable pair, which drops each block's localId and the empty paragraphs Jira uses for spacing. A save whose text is the text a read showed already sends nothing (`docs/decisions.md` → `project config: the loop shows a Jira description and a Confluence page as adf-codec's portable markdown, …`). Match the saved markdown's top-level blocks against the held document's, each as the portable pair reads it, and send the held block where they match. The decision's limit on partial saves ends with this item.
|
||||
|
||||
### 169. Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user