Skip to content

fix(console): label a deploying version from its deployment record - #3003

Merged
freeqaz merged 5 commits into
mainfrom
fix-1020b-version
Oct 20, 2026
Merged

freeqaz merged 5 commits into
mainfrom
fix-1020b-version

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

#2990 labels a deploying version "Deploying". Two read failures still leave that label disagreeing with the deployment record (finding 2085):

  • Agent reread fails after a completed deployment. The notice skips a success and waits for the Agent reread to make the version current. When that reread fails, nothing re-renders, so the page shows "Deploying version · … It becomes the current version only if its deployment completes." beside "v2 · Completed", indefinitely.
  • One status read fails mid-deploy. One failed deployment status read while v2 is still running nulls the status, so the notice flips to "Historical version", which is the finding 2065 mislabel. The deployment panel also stops polling on any read error, so it stays Historical after the API recovers.

Two mutants of the label also survived: a queued deployment and an older version browsed during a deploy were untested (finding 2088).

Change

agents/detail.mjs:

  • The version notice labels the newest version from its last deployment record read. A failed read keeps that label instead of falling back to Historical.
  • When the deployment completed but the Agent reread failed, the notice now says "Deployed version · read-only admitted snapshot. Its deployment completed, but the current version could not be refreshed." It no longer says Deploying. "Deployed" needs a succeeded record for this activity, a failed Agent reread, and no known newer current version the viewer cannot read; otherwise (a stopped Agent, a reread that never ran, a hidden current version) the label stays Historical. A later successful reread makes it "Current version" as before.
  • The deployment panel keeps polling a pending record after a transient read failure: no answer, 408, 429 or 5xx. A refusal or missing record (other 4xx) still ends polling and drops the remembered record, so the label falls back to Historical rather than a stale Deploying. The first read after the failure compares against the last record, so a completion right after a failure still rereads the Agent.

Verification

tests/browser/console-agent-deploy-again.test.mjs:

  • Completed, Agent reread fails (new): the notice reads "Deployed …" and never "Historical". Fails on main.
  • One failed status read (new): "v2 · Unavailable" keeps "Deploying". The next poll still comes, finds the deployment completed, rereads the Agent, and shows "Current", with no "Historical" at any point. Fails on main.
  • Completed record, no failed reread (new, after review): stays Historical, including after a tab round trip. Fails on the previous head.
  • Hidden current version, failed reread (new, after review): with v3 current but unreadable and completed v2 the newest listed, Refresh deployment with a 503 Agent reread keeps v2 Historical. Fails on the previous head.
  • Refused status read (new, after review): a 403 read gives Historical and polling stops. Fails on the previous head.
  • Queued and older version (new): a queued deployment is labelled Deploying, and an older v2 browsed while v3 deploys is Historical. This is a gap test and passes on main.

Other checks:

Screenshots, before | after (version-reread-fails: deployment completed, Agent reread 503; version-status-blip: one deployment status read 503 while v2 runs):

state before after
version-reread-fails 1440 before after
version-reread-fails 390 before after
version-status-blip 1440 before after
version-status-blip 390 before after

Storybook: two new Pages/Agent detail stories, Deployment completes, Agent reread fails (deploymentCompletesRereadFails) and Deployment status read recovers (deploymentStatusReadRecovers), each with walkthrough steps; both were checked in a headless browser for the expected notice text. The existing deploymentQueued story covers the queued label.

Risks

Low.

  • The new "Deployed version" copy appears only after a failed Agent reread, beside the existing "could not be refreshed" error.
  • Polling now continues through 5xx and network errors at the existing 5 s cadence, only while the last record was queued or running.

Two read failures left the version notice disagreeing with the deployment
record (finding 2085):
- a completed deployment whose Agent reread failed kept 'Deploying version'
  beside 'v2 · Completed'. It now says 'Deployed version' once that reread
  fails.
- one failed status read while v2 still deployed flipped the notice to
  'Historical', and polling stopped on the error. The notice now keeps the
  last record's label, and a transient failure (no answer, timeout, 429, 5xx)
  keeps polling; a refusal or missing record still ends it.

Tests also pin a queued deployment and an older version browsed during a
deploy (finding 2088).
@freeqaz
freeqaz requested a review from a team as a code owner October 20, 2026 04:06
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The console preserves deployment labels through transient read failures and distinguishes completed deployments whose Agent refresh failed.

Example: v2 completes while v1 remains cached, and the Agent refresh returns HTTP 503.

  • Before: v2 still says Deploying beside its completed deployment record.
  • After: v2 says Deployed and explains that the current version could not be refreshed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused repair resolves the prior findings and has meaningful browser coverage, but the repository's UI evidence gate remains incomplete.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An outage can make a deploying version look historical or leave a completed version labelled Deploying.
Reason: The maintainer-authored change repairs contradictory status information within the existing console workflow.

Merge readiness

✅ Ready for maintainer review

This PR fixes two current console read-failure paths and resolves both prior findings; no new actionable code defect was found.

Priority: P2
Reviewed head: a5e37ec40519421ab44b3f4ab75739cc28011906

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The required feature recording showing transient failure, continued polling, recovery, and the failed-Agent-refresh notice is absent; browser regression comparisons are reported by the author but were not rerun.
Agent review details

How this fits together

The Agent detail page reads authorized Agent, version-history, and deployment endpoints, then updates deployment activity and version notices without changing deployment state.

flowchart TB
  Browser[Agent detail page] --> Panel[Deployment activity panel]
  Panel --> API[Authorized controller API]
  API --> Records[Agent and deployment records]
  Records --> Panel
  Panel --> Notice[Version notice]
Loading

Technical review

Best possible solution:

Keep the repair in the existing deployment panel and version-notice owners, preserving hidden-version handling and the distinction between recorded completion and current selection.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes both failure paths, and the inspected screenshot pairs demonstrate the completed-record label mismatch; no target code was run during this review.

Is this the best way to solve the issue?

The repair uses the existing polling and rendering owners, retains refusal handling, and adds distinct browser cases without changing API or persistence contracts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e615044ad212.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Read failures leave misleading deployment notices and stop automatic updates, while explicit page refresh remains available.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the native UI evidence described in realBehaviorProof.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-20T04:22:07.251Z sha f0d0416 :: needs changes before merge. :: [P2] Distinguish an unlisted current version from a failed refresh | [P3] Add Storybook scenarios for the changed read-failure states
  • reviewed 2026-10-20T04:49:00.777Z sha 3dffcda :: needs changes before merge. :: [P2] Preserve the known-hidden-current guard after a failed refresh | [P3] Update the documented stop conditions for deployment polling

Reviewed October 20, 2026, 1:05 AM ET / 05:05 UTC (Revision 3).

Review follow-up. 'Deployed version' needed only a completed record and a
current version that was not known to be hidden, so a stopped Agent's last
version, an unlisted current version, or a record that completed before
the Agent read caught up could show it. It now needs evidence: the Agent
reread after the completion failed, cleared by the next Agent read.

A refused or missing record (a 4xx other than 408/429) now also clears the
Deploying label it can no longer follow, as before this change; transient
failures still keep it and keep polling.

Adds Storybook stories for both read-failure states and tests for the
completed-record and refused-read cases.
@freeqaz

freeqaz commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
A failed Agent reread no longer labels the newest readable version Deployed
while the page already knows a newer current version the viewer cannot read.
A browser test refreshes the deployment under a hidden current version with
the Agent reread failing; it fails on the previous head.

The agent details guide and agent editing flow now say deployment polling
continues through outages and stops at a result, a denial or a missing record.
@freeqaz

freeqaz commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 20, 2026
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@freeqaz
freeqaz merged commit 49c9497 into main Oct 20, 2026
59 of 61 checks passed
@freeqaz
freeqaz deleted the fix-1020b-version branch October 20, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant