Skip to content

greenfield 0.0.52: publish the Session's pages to the destination before opening them - #182

Merged
tbrownio merged 3 commits into
mainfrom
agent-farm-status-pages
Nov 12, 2026
Merged

tbrownio merged 3 commits into
mainfrom
agent-farm-status-pages

Conversation

@tbrownio

@tbrownio tbrownio commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

When a repository names a document destination (agent-farm's names Grain), Greenfield's orchestrator now publishes the Session status page there after every rewrite and files it in the same folder its workers use; outside Pane it publishes before it opens the page and opens the published URL. Until now the published copy was optional, because Pane's Session instructions say to keep documents local, and its folder name (sessions/<name> · <id>) didn't match the one workers were told (sessions/<name>). This is a wording change in the plugin's instructions, plus tests that hold it. Greenfield 0.0.51 → 0.0.52.

Rebased onto main at 762bdf5 (2026-11-12). Main meanwhile took greenfield 0.0.43–0.0.51, including the rendered status page (#200, #206): the local session/index.html is the canonical page and is what Pane's Session Overview tab shows. This PR keeps that. So in Pane nothing new opens: the pages are published after each rewrite, and the published page opens only when the person asks for it. Outside Pane, publish-then-open applies as before.

Visual Overview

Diagram drawn before the rebase, for the outside-Pane path (in Pane the Overview tab shows the local copy). Before: the orchestrator writes status.html and opens the file:// copy, so the destination folder never gets it. After: it settles sessions/<Session name>, publishes, opens the published URL, and on failure shows the local copy with one line and retries at each refresh.

This PR's own page (walkthrough and QA evidence) is a private Grain artifact: PR #182 walkthrough

Plan: the approved cover sheet "Grain publish wording" (decisions D-13, D-14, D-15; approved as D-22). It lives in the maintainers' private document destination.

Why this change exists

In an orchestrated Pane Session, the person should see the Session's status page in the document destination, next to the Session's plans and traces, and see a clear line if publishing fails. Two things stopped that:

  1. The host won. Pane's Session instructions ("Plans and documents") say to write HTML into the Session folder and open it as a file:// URL. Nothing in Greenfield said a destination named by the repository's workspace instructions overrides that, so the orchestrator never published.
  2. Two folder rules. The skill said sessions/<Session name> · <first 8 characters of the Session id>. agent-farm's .agent-farm/workspace.yaml told workers sessions/<session-name>. The status page and the workers' bundles would land in different folders. Also, "first 8 characters" of Pane's id __orchestration_session_ff064a78-… is __orches, which tells nobody anything.

Not changed here: Pane's own instructions, PR #177's status-page layout work, existing Grain folders, and any runtime check that a publish really happened.

Concepts and approach

  • Document destination: where a repository's workspace instructions (.agent-farm/workspace.yaml) say documents go: a file location, an artifact service or a bundle destination.
  • Session artifact: one private artifact holding the status page and item hubs for a whole Session. Its ledger entry is session.artifact.
  • Host: the app running the agents (Pane). It injects its own instructions.

The approach follows decision D-13: the plugin itself names no provider. The skill's old **Grain.** paragraph becomes a provider-neutral **Publishing.** paragraph, and provider details (organization, tools) stay in each repository's workspace file.

Behavior and diff walkthrough

Changed area Before → after
orchestrate-sessions/SKILL.md, folder rule sessions/<name> · <first 8 characters of the stable Session id> → the workspace's rule; when it gives none, sessions/<host Session name>, with · <short id> only if that folder already holds another Session's status page. The short id is the first 8 hex characters of the UUID in the Session id (ff064a78). Settled once before the first dispatch, recorded in the ledger, passed to every worker.
SKILL.md, new paragraph A named destination wins over a host instruction to keep documents local (Pane's "Plans and documents" named as the case). Local files are the working copy, and main's rule stays: the local session/index.html is the canonical page and Pane's Overview tab, so you publish alongside it, never instead of it. Fall back to local files alone only when no destination is named or while publishing fails.
SKILL.md, **Grain.** → **Publishing.** Publish after every rewrite of the local pages. In Pane, the Overview tab shows the local copy, so the published page opens only when the person asks for it (main's rule). Elsewhere, publish first, then open the published URL. On failure: open the file:// copy, show one line the first time ("Publishing the Session's pages to failed: ; showing the local copy."), record it in session.artifact.publish_error, and retry at each refresh. Before each retry, check the ledger's URL and look the artifact up in the destination so no second artifact gets created. When a retry succeeds, outside Pane, open the published URL and record it as opened_url, so later refreshes reuse that tab.
references/status-board.md On main, "you may also publish a copy … at material changes" → "also publish them after every rewrite". Outside Pane: publish first, then open the published URL (a file:// URL only with no destination or after a failed publish); each rewrite publishes again, then reopens the same URL so the tab is reused.
references/ledger.md artifact.path template follows the new rule; adds "publish_error": null.
instructions/coordination.md (both orchestrator agents read it) "…rewrite it after every ledger write, and publish it to the document destination after each write; in Pane it shows in the Session's Overview tab, and elsewhere you open the published URL beside the person…", plus one destination-wins sentence.
plugins/greenfield/README.md "names a destination service in one place only" → "The plugin names no destination service." In the status-page paragraph, main's "a published copy lives in … sessions/<Session name> · <first 8 characters of the Session id>" → the local file is the working copy and the Overview tab; the pages are also published to the Session's folder (new rule), before they are opened; the failure line; and the settled folder passed to workers.
.agent-farm/workspace.yaml Clash rule now reads "if that folder already holds another Session's status page, use sessions/<session-name> · <short ID>" and says which UUID.
tests/greenfield.test.mjs The "exactly one paragraph names Grain" test (from D-71/D-74) becomes "no Greenfield instruction names Grain" and asserts each Publishing rule. Folder-rule, status-board, ledger, README and coordination assertions move to the new phrases; new negative checks fail if the old folder phrase comes back. After the rebase, main's status-page assertions follow the merged wording, and the version assertion moves from main's 0.0.51 test to this PR's P-2 test.
plugin.yaml 0.0.51 → 0.0.52, the next free patch after the rebase.

Example, the Session this was built in ("Security Fixes", id __orchestration_session_ff064a78-…): the status page goes to sessions/Security Fixes in Grain; only if another Session's status page were already there would it go to sessions/Security Fixes · ff064a78.

With no destination named, nothing changes: local files and the existing one notice line.

Validation and limitations

Validation: full. The head is 43ff1b1, the rebase of 39c0723 onto main 762bdf5. Checks marked head ran on 43ff1b1; the rest ran before the rebase, on the heads named.

  • Rebase: git range-diff 88562c8..39c0723 origin/main..43ff1b1 pairs all three commits (with --creation-factor=95). The PR's own lines changed: yes, only where they met main's rewritten status-page text (SKILL.md's destination and Publishing paragraphs, status-board.md's write-and-open bullets, coordination.md's first paragraph, the README status-page paragraph, the matching test strings) and the version (0.0.43 → 0.0.52). The folder rule, the ledger entry, workspace.yaml, the failure line, the retry guard and the provider-neutral wording are unchanged.

  • C-1, build and tests (head): pnpm typecheck && pnpm test: 356 tests, 347 pass, 0 fail, 9 skipped (Windows-only). Before the rebase, on 39c0723: 316 tests, 307 pass; the new tests failed before the wording change and passed after.

  • C-2, one rule everywhere (head): rg -n 'first 8 characters|short ID|short id|sessions/<' plugins/greenfield .agent-farm README.md CONFIGURATION.md docs shows only the new rule (and the unchanged non-host fallback, "first 8 characters of an id you generate once"). No file under plugins/greenfield/{agents,skills,profiles,instructions} matches /grain/i.

  • C-3, version and rendering (head): with a temporary HOME and --config-root, after plugin install plugins/greenfield, inspect of greenfield/orchestrator and greenfield/orchestrator:codex reports 0.0.52, and both rendered instructions contain both new coordination sentences.

  • J-1, cold read (on ad7c01d; record with brief, inputs and verbatim answers: evidence/j1-cold-read.md): a fresh agent given only the rendered orchestrator instructions, the skill, agent-farm's workspace file and Pane's Session instructions answered: publish to sessions/Security Fixes first, then open the published URL; the failure line and retry guard; the destination wins over Pane's local-files rule; with no destination, local files plus the one notice. It flagged that the workspace file didn't show the · separator or say which UUID, which c1c4793 fixes. It also noted that nothing says what to do if the folder-clash lookup itself fails. That case is left open.

  • QA (independent qa-and-verify pass on c1c4793; record with brief, verbatim report and raw logs: evidence/qa-report.md): all five checks passed, run against temporary config: install, typecheck and tests; plugin install plus inspect of both greenfield/orchestrator and orchestrator:codex at 0.0.43 with both new sentences; the rg checks; a cross-file consistency read of the diff; workspace.yaml still parses. It found three wording gaps, fixed in 39c0723: after a failed publish, the published URL differs from the file:// one, so it is now recorded as opened_url for later tab reuse; the failure line shows once rather than on every retry; and the README now uses the skill's clash wording and lists the folder handed to workers. QA was not rerun on 39c0723 or on the rebased head; the full test run and the rg checks were (evidence/checks.txt).

  • Known gaps, not changed here: in a Session that spans repositories with different destinations, the skill doesn't say whose folder rule applies (this predates the PR). The README still mentions Grain where it isn't giving instructions: a link to the hosted guide, a sample's name, and a history note.

  • CI (head): all required checks green (check, test on ubuntu, macOS and Windows, windows-link-fallback, Socket). No review-bot comments.

  • J-2, live Session: not yet run. It needs the next orchestrated Session on this version (after release) to record session.artifact.published: true with a Grain URL in the workers' folder.

Review: the Codex review of 39c0723 found no Must-Fix and one Should-Fix (F-1): the J-1 and QA claims had no published records. Both records are now in the PR's artifact and linked above. The rebase to 43ff1b1 has not been reviewed: its only new wording is the merge with main's status-page text described under Rebase.

🤖 Generated with Claude Code

@tbrownio tbrownio left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review

Size: small because 8 files, 63 changed lines, and no risk trigger.

Issue context: No linked issue. Reviewed the approved “Grain publish wording” cover sheet (P-1/P-2, D-13–D-15; implementation handoff records approval D-22), including its checks and explicit deferrals.

Quality Gates

  • pnpm install --frozen-lockfile: PASS.
  • pnpm typecheck: PASS.
  • pnpm test: PASS, 316 tests / 307 passed / 9 skipped / 0 failed. Tests used a temporary home and config, with native Codex home and artifact-export settings removed. The first run inherited my review-bundle setting and failed two unchanged telemetry stderr assertions; the isolated rerun passed.
  • Scratch-config plugin install and inspect greenfield/orchestrator / inspect greenfield/orchestrator:codex: PASS; both render version 0.0.43 and the publish-before-open / destination-precedence sentences.
  • Folder/provider searches and workspace YAML parsing: PASS. The two new publishing/folder contract tests fail against a scratch copy of main’s instructions and pass in the full head suite.
  • GitHub head checks: PASS (check, Ubuntu/macOS/Windows tests, Windows link fallback, Socket). No OS-specific behavior changes or new cross-platform claim require additional OS workspaces.
  • Lint: N/A; no configured lint script or job.

Must-Fix (0)

none

Should-Fix (1)

F-1 — Attach the claimed cold-read and independent QA records · PR companion pr-body.md:55 (J-1 and QA claims on lines 55–56). The PR claims a fresh-agent cold read on ad7c01d and an independent five-check QA pass on c1c4793, but its published evidence does not contain either report. Failure scenario: a reviewer opens the walkthrough’s evidence links to verify planned J-1 and the independent QA claim; evidence/checks.txt contains only a later test summary and two searches, while the walkthrough, PR body and implementer status repeat the claims without the original inputs/results. The fresh reader’s answers and independent five-check outcome therefore remain unsupported. Fix: attach and link the sanitized cold-read questions/answers and independent QA report with their tested commits and per-check results, or qualify/remove those claims until the records are available. No full conversation export is needed.

Harm: medium (the stated validation overstates the evidence a reviewer can assess) · Reach: high (every reviewer of this PR) · Recovery: visible (attach the existing records or correct the claims) → Should-Fix

Scope: in (the PR’s planned validation and companion evidence) · Approach/scope: no (no implementation or plan change required)

Checked by: reading — opened the published plan, walkthrough, pr-body.md and evidence/checks.txt; searched the supplied task files and local authored evidence for original reports. No original J-1/QA record or link was found. This finding concerns the evidence, not a claim that the checks were never run.

Suggestions (0)

none

Principles

Ran: 4 No Anti-Patterns, 5 Single Way to Do Things, 12 Spec Fidelity, 13 Security Boundaries & PHI — four independent GPT-6.1 Sol / low reviews, all PASS. Skipped: 1 Reuse, 2 Clarity, 3 Scope, 8 Documentation, 14 Test Integrity, 15 Test Strategy — small-range policy; 6 Backend, 7 Frontend, 9 Query/Data/Hot-Path Cost, 10 Components, 11 Data Layer — no applicable runtime, UI, query or data-layer changes.

Earlier findings

none — no earlier GitHub reviews or inline comments were present.

Dropped

  • Two initial telemetry test failures — caused by my inherited AGENT_FARM_ARTIFACT_BUNDLE, which enabled fixture post-exit exports and changed stderr. Removing that setting produced a clean full run; no PR regression.
  • Version 0.0.43 versus main’s 0.0.41 — the PR explains the 0.0.42 overlap with open PRs #177/#181, and the approved plan requires the later merge to rebase/take the next free patch. Reconcile at merge time; no current code finding.
  • Missing live proof / runtime enforcement — J-2 is explicitly deferred until after release and nonblocking; runtime enforcement is explicitly outside the approved copy-only scope.
  • Multi-repository folder ambiguity and folder-lookup-failure handling — acknowledged limits rather than a verified regression or omitted approved requirement in this range.

Claims

  • C-1, install/typecheck/tests, 316 total / 307 pass / 9 skipped / 0 fail: supported by published evidence/checks.txt and independently reproduced on 39c0723 with isolated settings. New contract tests fail before the wording change: independently checked against main’s instructions in a scratch copy (both fail as expected), with the head’s full suite passing.
  • C-2, one folder rule and no provider in instruction trees: supported by the published searches and independent searches of the stated paths. The unchanged generated-id fallback is intentional.
  • C-3, 0.0.43 and rendered coordination sentences: independently supported by scratch-config plugin installation and both inspect outputs. The cover sheet’s “one patch above main at merge time” remains a merge-time condition, as the PR explains.
  • J-1, fresh-agent cold read on ad7c01d: unsupported by the linked evidence; only the author’s summary is available (F-1). Its reported wording fixes are present in the current diff.
  • Independent qa-and-verify, five checks on c1c4793: unsupported as an independent historical pass; the original report is absent (F-1). My checks support the current install/build/tests, profile rendering, searches, consistency and YAML parsing, but cannot establish that earlier independent run.
  • CI on 39c0723, including all three OS jobs / Windows fallback / Socket: checked against GitHub’s successful check runs. No review-bot comments: checked against empty review and inline-comment responses.
  • J-2, live Session after release: not claimed; explicitly deferred and nonblocking in the plan and PR.

Completeness

P-1/P-2 and D-13–D-15 are implemented within the approved eight-file wording/tests/version scope. Publishing remains private, uses the settled workspace folder, preserves artifact identity and retries with a lookup guard. The no-destination fallback remains specified. F-1 is the remaining evidence gap; no code defect or scope expansion was verified.

Summary

Reviewed origin/main...HEAD at 39c072316ec51b1b22ef5ab52a6efe4565630eea; it matches the requested branch head. No Must-Fix findings; one Should-Fix for unsupported validation evidence. Posted as COMMENT under the Session’s review policy; no fixes, pushes, approval, request-changes or merge.

Tyler Brown and others added 3 commits November 11, 2026 18:53
…ore opening them

The orchestrator now names no destination service (D-13). It uses the
workspace's Session folder rule, falling back to sessions/<Session name>
with the short id only on a clash (D-14), publishes the status page before
it opens the published URL, and on a failed publish shows the local copy
with one line and retries at each refresh without creating a second
artifact (D-15). A named destination wins over a host instruction to keep
documents as local files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… file

Found by the J-1 cold read: the workspace rule did not show the ' · '
separator or say which UUID the short ID comes from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the README

From QA: the published URL differs from the file:// copy, so record it as
opened_url for later tab reuse; show the failure line once, not on every
retry; README uses the skill's clash wording and lists the folder passed
to workers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tbrownio
tbrownio force-pushed the agent-farm-status-pages branch from 39c0723 to 43ff1b1 Compare November 12, 2026 02:55
@tbrownio tbrownio changed the title greenfield 0.0.43: publish the Session's pages to the destination before opening them greenfield 0.0.52: publish the Session's pages to the destination before opening them Nov 12, 2026

@tbrownio tbrownio left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review — follow-up after rebase

Size: small because this follow-up retains the earlier review's classification (eight files, no runtime changes); not resized.

Issue context: No linked issue. Checked the approved cover sheet (D-13–D-15, approved D-22) and D-48's rebase follow-up scope.

Quality Gates

  • pnpm install --frozen-lockfile, pnpm typecheck, pnpm build: PASS. The build plus isolated node --test tests/*.test.mjs runs the pnpm test checks: 356 total, 347 passed, 9 skipped, 0 failed. Temporary HOME/config; inherited native-home and artifact-export settings removed.
  • Scratch-config plugin install and both orchestrator inspect outputs: PASS, version 0.0.52, both coordination sentences present. Folder/provider searches, workspace YAML parsing and git diff --check: PASS.
  • GitHub head checks: PASS, including Ubuntu/macOS/Windows tests, Windows link fallback and Socket. No review-bot comments found. Lint: N/A, no configured gate. No OS-specific behavior changed or new cross-platform support claimed.

Must-Fix (0)

none

Should-Fix (0)

none

Suggestions (0)

none

Principles

Ran: 4 No Anti-Patterns, 5 Single Way to Do Things, 12 Spec Fidelity, 13 Security Boundaries & PHI — four independent GPT-6.1 Sol / low reviews, all PASS, using 762bdf5...43ff1b1 and git range-diff --creation-factor=95 88562c8..39c0723 762bdf5..43ff1b1 to isolate rebase changes. Skipped: 1 Reuse, 2 Clarity, 3 Scope, 8 Documentation, 14 Test Integrity, 15 Test Strategy — inherited small-range policy; 6 Backend, 7 Frontend, 9 Query/Data/Hot-Path Cost, 10 Components, 11 Data Layer — no applicable runtime changes.

Earlier findings

  • F-1, from review 5745665514: resolved by the published J-1 record and independent QA report, including inputs and raw QA logs. Opened both reports and supporting files; all 20 files match the published revision 5f78e494, and the repository inputs match ad7c01d. These records support their stated historical commits, not a fresh QA pass on this head. Checked by: reading and hash comparison.

Dropped

none

Claims

  • Rebase / D-13–D-15: supported by range-diff and cross-file reading. Repository destination precedence, provider neutrality, the settled folder, private artifact reuse, failure notice and retry guard survive. Main's renderer, canonical local session/index.html, Pane Overview, Notify and wrap-up instructions remain intact. In Pane, publishing accompanies the Overview; outside Pane, publish-before-open remains explicit.
  • C-1/C-2/C-3 on 43ff1b1: independently reproduced as above. Version 0.0.52 is one patch above base 0.0.51. The linked checks.txt records 39c0723; current-head support comes from this rerun.
  • J-1 on ad7c01d and independent five-check QA on c1c4793: supported by the newly attached records and logs (F-1 resolved). Their historical scope and the absence of a post-rebase QA rerun are correctly qualified in the PR. Earlier test-validation claims retain the evidence in the first review.
  • Current-head CI / no bot comments: checked against GitHub. J-2 live Session: not claimed; explicitly deferred until after release and nonblocking.

Completeness

The conflict resolutions preserve the approved publishing intent alongside main's renderer and host behavior. No verified fix-caused finding or new contradiction was found. No changes to the branch were applied.

Summary

Reviewed 43ff1b178737a4ea75cc3c84472d41ce0ec46f93, matching the requested head. Mergeable as is: yes. COMMENT only under the Session policy; no approval, request-changes, push or merge.

@tbrownio
tbrownio merged commit 535a6d0 into main Nov 12, 2026
7 checks passed
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