Skip to content

Show each output's state in lc view, from the engine - #265

Merged
EiffL merged 2 commits into
mainfrom
view-output-status
Oct 31, 2026
Merged

EiffL merged 2 commits into
mainfrom
view-output-status

Conversation

@EiffL

@EiffL EiffL commented Oct 31, 2026

Copy link
Copy Markdown
Member

Why

Opening an output in lc view showed Status unavailable, and the figure cards carried no freshness marker, even on a fully current project. The page filled astra-ui's renderProvenance slot with the recorded run but never its getOutputStatus slot (or the provenance panel's status), so astra-ui fell back to its unknown label.

What

  • One route, GET /lightcone/api/status, answered by materialize.status — the same call lc status makes — as {outputs: {"<universe>/<output id>": {state, detail}}}, run off the event loop since it hashes declared inputs. A project the engine cannot read is a 422 carrying the engine's message. Token-gated like every other route.
  • The page asks it after every resolution (whatever changed on disk may have changed a verdict) and hands the lookup to Inventory and the open output's provenance panel. A failed request shows no state rather than an error.
  • The browser still holds no copy of the classification rule, which is how jupyterlab-lightcone fills the same slot. CLAUDE.md's host-slot list is updated accordingly.

Tests

  • test_an_outputs_state_is_the_engines: a real project served, the route's JSON equals materialize.status(root) in-process.
  • test_a_project_the_engine_cannot_read_has_no_state: 422 on a directory that is not an lc project.
  • /lightcone/api/status added to test_every_route_needs_the_token.

Verified by hand on a materialized project: the dialog reads Status: Current with the run's time and revision.

🤖 Generated with Claude Code

The provenance panel read "Status unavailable" for every output, and the
figure cards carried no marker: the page filled astra-ui's run slot but
never its status slot. One route, `/lightcone/api/status`, now answers
with `materialize.status` — the call `lc status` makes — keyed
`<universe>/<output id>`, and the page asks it again after every
resolution. The browser still holds no copy of the classification rule;
a project the engine cannot read is a 422 and the page shows no state.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

✅ Eval

Metric Value
Outputs check success
Agent run success
Turns 8
Tool calls 6
Cost $0.11
Agent wall time 0m42s
Model claude-sonnet-5-5
lc status
  mode:    direct
  sandbox: landlock (fs: declared, network: allowed)
  crate:   up to date with the outputs

  · current  baseline/best_fit        ebed420
  · current  baseline/hubble_diagram  ebed420
  · current  baseline/residuals       ebed420

3 current
Confusion & pain points (Claude analysis)

Confusion & pain points

  • The run was essentially clean. There were no errored tool results, and the agent built all three outputs, validated the spec, and passed --check in 6 tool calls.

  • The agent never saw the output of its heaviest step and did not verify it. It ran spec editing, uv add, validation, git commit and lc compute launch in one chained command piped through tail -3. It never confirmed the commit succeeded or that the astra.yaml text replacement matched, and the final git status --short came back empty from view. Cause: tail hides failures, and the chain continues after a failed step. The final message admits that it did not confirm the working tree was clean or that ro-crate-metadata.json was committed. A materialize that exits 0 doesn't show the tree is clean, so lc materialize could print a one-line "tree clean / crate committed" confirmation.

  • The agent edited astra.yaml with a blind Python str.replace. It matched literal recipe:\n command: python scripts/... text to add format, inputs, decisions and the command. If the scaffold's whitespace had differed, nothing would have changed and no error would have been raised. Only the later astra validate pass shows it worked. This hints that the scaffold doesn't make completing a partial spec easy, for example with an astra command that fills in the missing output fields.

  • The agent had to discover format: and the license requirement itself. Every output needs format: because lc has nowhere to write the file without it. A [project].license is also needed to get the RO-Crate. The agent added both correctly, but the license edit used a fragile sed that deleted any existing license line and then inserted after version. Suggestion: the scaffold's pyproject.toml could include a commented license placeholder, and lc materialize could say when it skipped the crate for lack of one.

  • Cluster lifecycle is an extra manual step. The agent had to run lc compute launch --wait, then lc materialize local, then lc compute down local. Forgetting the last step leaves an allocation running. It handled all three correctly this time, but the sequence is easy to get wrong for an agent that has never seen it.

Full trace: agent-trace artifact on this run.

An unfetched input's verdict reads "changed"; only the report's warning
says it is merely not in this clone. The route now sends the warnings
with the verdicts and the page shows them above the inventory — the two
lines `lc status` prints. The status request moved inside the resolution
loop, so a burst of disk changes costs one classification walk, not one
per event. Also: the app docstring names the third route, and the thread
hop takes the function directly.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@EiffL EiffL left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

lgtm

@EiffL
EiffL merged commit 4ab4e90 into main Oct 31, 2026
11 of 12 checks passed
@EiffL
EiffL deleted the view-output-status branch October 31, 2026 19:07
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