Name prima's artifacts on every envelope, and free status from the browser - #166
Open
DavertMik wants to merge 1 commit into
Open
Name prima's artifacts on every envelope, and free status from the browser#166DavertMik wants to merge 1 commit into
DavertMik wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.ymlandpage.htmlwere written on every prima command, but### Artifactsonly rendered when acheckcame 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 anotherverifyoraskrather than onegrep.docs/reference/commands.mdalready documented Artifacts as always present — this closes that drift.successEnvelope/failureEnvelope/reportEnvelopeattachartifacts, coveringdo,ask,check,verify,research,goandpw.donames its per-step captures by file —page after each step: <dir>/<n>-<step>.{aria.yaml,html,diff.yaml}— so thediff.yamlrecording what a step changed is reachable from the envelope.readArtifacts()reports what is actually on disk, sostatusalso lists anything else kept under the hash.toolFailureEnvelopeis unchanged: nothing was captured on that path, so there is nothing honest to name.prima statusno longer needs a browserstatusonly reads recorded files, but it ran throughrunPrima, which calledstart()→ 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 onreport.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'srecordflag is dropped —statuswas its onlyfalsecaller.Tests
boat/prima/tests/135 pass, prima integration 14 pass,tests/unit1120 pass, format and lint clean.🤖 Generated with Claude Code
https://claude.ai/code/session_014iD669V8Y9g4b3Syc1g5mi