Skip to content

fix(agent-modes): clear 5 lint errors blocking the quality gate - #5

Merged
openaxcloud merged 1 commit into
mainfrom
fix/agent-modes-lint
Jul 19, 2026
Merged

fix(agent-modes): clear 5 lint errors blocking the quality gate#5
openaxcloud merged 1 commit into
mainfrom
fix/agent-modes-lint

Conversation

@openaxcloud

Copy link
Copy Markdown
Owner

What

Clears the 5 lint errors that were failing the final quality gate (eslint app). All 5 are residue of the AGM work that removed the model selector from the UI — so every open PR (including the canonical-plan PR #3) inherited a red gate.

The 5 errors (all in the AGM zone)

File Error Fix
ChatBox.toolbar.spec.tsx (×2) prettier/prettier reformat the AGM segmented-control assertions
BaseChat.tsx:6339 @blitz/lines-around-comment hoist the "AGM: no model names in the UI" comment out of the <LlmErrorAlert> attribute list into a JSX child comment (lines-around-comment vs prettier couldn't co-fix it in place)
ChatBox.tsx:125 no-unused-vars (modelList) drop the unused local + its now-orphaned normalizeModelList import (composer no longer consumes the model list)
LandingOptimized.tsx:27 no-unused-vars (AIModelSelector) drop the unused import (the removed selector)

Result

  • eslint app0 errors (48 pre-existing warnings remain; they do not fail the gate).
  • AGM segmented-control spec: 8/8 green.
  • Scope is limited to the AGM zone — no other files touched.

Base: origin/main. Do not merge without Avi's go-ahead.

🤖 Generated with Claude Code

…oval

The final quality gate (eslint app) was red on 5 errors, all residue of the
AGM work that removed the model selector from the UI — so every PR (incl. the
canonical-plan PR #3) inherited a red gate. Fixes, scoped to that zone only:

- ChatBox.toolbar.spec.tsx: 2 prettier reformats (AGM segmented-control tests)
- BaseChat.tsx: hoist the "AGM: no model names in the UI" comment out of the
  <LlmErrorAlert> attribute list into a JSX child comment (lines-around-comment
  vs prettier could not co-fix it in-place)
- ChatBox.tsx: drop the now-unused "modelList" local + its orphaned
  "normalizeModelList" import (composer no longer consumes the model list)
- LandingOptimized.tsx: drop the unused "AIModelSelector" import (removed control)

Result: eslint app -> 0 errors (48 pre-existing warnings, non-blocking).
AGM toolbar spec: 8/8 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 19, 2026 13:49
@github-actions

Copy link
Copy Markdown
Contributor

ℹ️ Preview deployment not configured

Name Info
Latest commit 4373da6
Status Preview deployment requires Cloudflare secrets

To enable preview deployments, repository maintainers can add:

  • CLOUDFLARE_API_TOKEN secret
  • CLOUDFLARE_ACCOUNT_ID secret

Built with E-Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR clears 5 ESLint errors introduced in the AGM (“agent modes”) area after removing the model selector from the UI, restoring a green eslint app quality gate without changing runtime behavior.

Changes:

  • Remove unused imports/variables left behind by the removed model selector (AIModelSelector, normalizeModelList, modelList).
  • Reformat AGM segmented-control assertions in the toolbar spec to satisfy prettier/prettier.
  • Move the AGM “no model names in the UI” comment out of a JSX prop list to satisfy @blitz/lines-around-comment.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
app/components/marketing/ecode-exact/pages/LandingOptimized.tsx Drops unused AIModelSelector import.
app/components/chat/ChatBox.tsx Removes unused normalizeModelList import and now-unused modelList local.
app/components/chat/ChatBox.toolbar.spec.tsx Prettier-compliant formatting for segmented-control assertions and render props.
app/components/chat/BaseChat.tsx Relocates AGM UI rule comment to a JSX child comment to satisfy lint rule.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 123 to 126
export const ChatBox: React.FC<ChatBoxProps> = (props) => {
const modelList = normalizeModelList(props.modelList);
const providerList = Array.isArray(props.providerList) ? props.providerList : (PROVIDER_LIST as ProviderInfo[]);

const hasComposerPayload = props.input.trim().length > 0 || props.uploadedFiles.length > 0;
@openaxcloud
openaxcloud merged commit 942f25f into main Jul 19, 2026
15 of 22 checks passed
openaxcloud pushed a commit that referenced this pull request Jul 23, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Jul 31, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 3, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud added a commit that referenced this pull request Aug 4, 2026
…ifecycle (#6)

fix(runtime): honest preview readiness (#5) + workspace diagnostics/lifecycle (#6)
openaxcloud added a commit that referenced this pull request Aug 4, 2026
…ycle (#6)

fix(runtime): live-proof fixes for readiness (#5) + diagnostics/lifecycle (#6)
openaxcloud pushed a commit that referenced this pull request Aug 4, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 4, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 4, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 4, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 5, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 5, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 5, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 5, 2026
… fail-closed + E2E negatives

1. k8s barrier fails on ANY delete failure: freezeWorkspace attempts every
   revoke but THROWS if any rejected (never claims the barrier / marks the row
   stopped while a write path may be live). Negative: manager.spec reserve #1.
2. Real GCS backend required: eraseSubjectStorage refuses (unverified, never
   deletes) when buckets exist but no active backend — a NoopObjectStorage can
   never certify absence. Negatives: module spec + REAL GCS E2E (inert backend
   refused, bucket survived).
3. Block ALL object-storage writes during purge: the barrier marks projects
   purge-frozen; upload-url/ensure-bucket/move return 403 OBJECT_STORAGE_PURGE_
   FROZEN, so nothing is recreated after the zero-check.
4. Inventory by REAL authorization: workspaces for EVERY project in ANY org the
   subject is a member of (shared orgs too, without a ProjectCollaborator row),
   plus explicit collaborations.
5. Only an authenticated NotFound = absence: pvcExists no longer swallows k8s.get
   errors — the client returns undefined only on a real NotFound and re-throws
   network/RBAC errors, so a read error fails closed. Negatives: manager.spec
   reserve #5 + kind E2E (surviving PVC reported present).
6. E2E negatives: real GCS + kind E2Es each carry a negative; the #1/#5 error
   negatives are proven deterministically in manager.spec (a k8s error cannot be
   reliably injected through kubectl/kind).

api + workspace-manager typecheck clean; 34 api purge tests + 48 manager tests
green; both real E2Es pass with negatives (artifacts hashed in
docs/deploy-evidence/2026-07-23-physical-purge-e2e/). PROVEN_REVIEW_PENDING.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 7, 2026
…ails (#5)

Completes blocker #5's "readiness must fail on failed application assets". The
4-actor agreement (port/process/manager/client-beacon via aggregatePreviewReadiness)
and the blank-DOM beacon already shipped, but the client beacon only ever emitted
'blank' (app never mounts) — nothing produced the 'error' status, so the
`clientBeacon === 'error'` veto was dead code, and the documented "JavaScript
rendered without its stylesheet" case (a 404'd stylesheet/script that renders a
NON-empty but broken DOM) slipped through as ready.

- reporter-script: the existing window 'error' handler is bubble-phase and never
  sees resource-load failures. Add a CAPTURE-phase listener that beacons
  status:'error' (once) when a <link rel=stylesheet> or <script> fails to load,
  naming the failed URL. High-signal, low false-positive: routine console.warn/error
  and post-mount app errors are NOT beaconed.
- preview-proxy beacon handler: parse an optional `status` ('blank'|'error', default
  'blank' for back-compat with older reporters) + `detail` and relay it verbatim to
  /internal/preview/beacon, which already persists it for the api readiness check.

Tests: proxy relays 'error' with (workspaceId, port, detail); a body without status
still defaults to 'blank'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
openaxcloud pushed a commit that referenced this pull request Aug 7, 2026
#5)

Live proof exposed a timing race: the external reporter script installs its
capture-phase 'error' listener too late to catch a stylesheet that fails
near-instantly (a refused/404 <link> fires its error before the reporter even
downloads, and a capture listener never sees an already-fired event) — so no
'error' beacon was sent and readiness stayed ready:true despite the broken asset.

Add a timing-independent sweep: the window 'load' event fires only after every
<link rel=stylesheet> has settled (loaded OR failed), and a FAILED stylesheet
has link.sheet === null at that point. Sweep on load (skipping disabled links
and non-matching media queries, whose null sheet is legitimate) and beacon
'error' with the failed href. Keeps the capture-phase listener too, for <script>
failures and dynamically-inserted assets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants