Skip to content

Name prima's artifacts on every envelope, and free status from the browser - #166

Open
DavertMik wants to merge 1 commit into
mainfrom
fix/prima-status-artifacts
Open

Name prima's artifacts on every envelope, and free status from the browser#166
DavertMik wants to merge 1 commit into
mainfrom
fix/prima-status-artifacts

Conversation

@DavertMik

Copy link
Copy Markdown
Contributor

Two fixes from a session where prima's recorded files were reachable in principle and invisible in practice.

Every command names what it recorded

aria.yml and page.html were written on every prima command, but ### Artifacts only rendered when a check came back with a CONTRADICTION. The envelope offered a hash and nothing to suggest a page tree was on disk, so a question it did not answer cost another verify or ask rather than one grep. docs/reference/commands.md already documented Artifacts as always present — this closes that drift.

  • successEnvelope / failureEnvelope / reportEnvelope attach artifacts, covering do, ask, check, verify, research, go and pw.
  • do names its per-step captures by file — page after each step: <dir>/<n>-<step>.{aria.yaml,html,diff.yaml} — so the diff.yaml recording what a step changed is reachable from the envelope.
  • readArtifacts() reports what is actually on disk, so status also lists anything else kept under the hash.
  • toolFailureEnvelope is unchanged: nothing was captured on that path, so there is nothing honest to name.

prima status no longer needs a browser

status only reads recorded files, but it ran through runPrima, which called start() → discovery → resolveBrowser, and failed with "No browser to drive" exactly when you came back to inspect a finished run. It now has its own handler modelled on report.

It also looks the hash up across every recorded site instead of assuming the most recent one. On the machine this was found on, hashes live under two sites and neither is the one that ran last, so latest-site resolution missed. A hash that really is missing now names the directory it searched.

Verified with every browser closed: a hash under a non-latest site resolves, a hash under the latest site still resolves, and an unknown hash reports the directory it looked in.

Also

runPrima's record flag is dropped — status was its only false caller.

Tests

boat/prima/tests/ 135 pass, prima integration 14 pass, tests/unit 1120 pass, format and lint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_014iD669V8Y9g4b3Syc1g5mi

…owser

Every prima command already wrote aria.yml and page.html for the page it
left behind, but the envelope only named them when a check came back with
a CONTRADICTION. The result was a hash and no hint that a page tree was on
disk worth reading, so a question the envelope did not answer cost another
verify or ask instead of one grep. ### Artifacts now renders on do, ask,
check, verify, research, go and pw, and do names its per-step captures by
file so the diff.yaml of each step is reachable from the envelope.

prima status only reads recorded files, yet it went through the same
startup as the driving commands: it opened a session and failed with "No
browser to drive" exactly when you came back to inspect a finished run.
It now resolves the hash without a browser, looks it up across every
recorded site rather than assuming the most recent one, lists whatever
else was kept under the hash, and names the directory it searched when
the hash really is missing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014iD669V8Y9g4b3Syc1g5mi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant