Issue #1331 · production incident and fix

Artifacts no longer disappear after a delayed refresh.

The artifact was never lost. Tegy had the complete file in durable storage, but a later failed refresh could hide that good cached copy behind a “not found” message. The display logic is fixed, the missing test transition is now covered, and the merged change is live.

Released first via Worker 2d23a747 Merged PR #1332 Passed production build and flow suite Verified with a real production artifact

What happened

The artifact was safe

A read-only production database check found the reported artifact, its full Markdown body, and a fully processed persistence queue.

The screen chose the wrong state

Tegy could hold both a valid cached artifact and an error from a newer refresh. The error incorrectly won and covered the content.

The fix is conservative

Any valid local or cached artifact stays visible. A true “not found” message still appears when no artifact data exists at all.

Why it appeared later

Before and after

Original user capture showing an artifact title beside a This artifact could not be found message
Before. The artifact title remains in the header, proving cached detail existed, while the body is incorrectly replaced by the refresh error.
Fresh production Tegy chat with the generated artifact card visible
Production setup. Tegy created and published a fresh Markdown artifact through the normal Codex chat path.
Production Tegy artifact panel after refresh with the exact cached-content proof sentence visible
Production result. After the delayed indexing window and a manual refresh, the artifact heading and exact body remain visible in the side panel.

Production walkthrough

Real production recording in Chromium Profile 3 / tegy. The 25.76-second clip opens the generated artifact after the delayed window, activates Refresh artifact, and shows the content remaining stable. No production request was artificially failed; the explicit failed-refresh transition is proven by the regression test below.

How the gap escaped, and what now covers it

Old test gap

The existing test started with a 404 and a local streamed artifact. It did not model a successful detail load followed by a later failed refetch.

New transition test

Passed. Load valid detail, switch the server to 404, refresh through both retries, and confirm the cached title and body remain visible.

True missing case

Passed. When no local or cached artifact exists, Tegy still shows the real “This artifact could not be found” state.

Release record

Honest caveat: the broader UI spec currently has three unrelated billing-copy expectation failures on main, and lint is blocked by a separate current-main chat-selection hook rule. The two new artifact tests, the focused artifact set, build, runtime suite, deployment gates, and production proof all pass.