Skip to content

Stop the deploy from hiding why it failed - #22

Merged
zmaril merged 1 commit into
mainfrom
deploy-diagnostics
Aug 24, 2026
Merged

Stop the deploy from hiding why it failed#22
zmaril merged 1 commit into
mainfrom
deploy-diagnostics

Conversation

@zmaril

@zmaril zmaril commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Production deploys have failed at Publish current public tables four times running, starting with the merge of #14 on 23 August. This does not fix the underlying cause — it makes the cause visible, and stops it failing the wrong thing.

Why nobody could see the cause

jq -e '.ok == true and .failed == 0' "$response_file" > /dev/null
jq . "$response_file"

The assertion goes to /dev/null and the response is printed after it. GitHub runs run: steps under set -e, so when the assertion fails the step dies before the print. Four failed deployments and the only visible output is Process completed with exit code 1 — thirteen seconds of runtime, nothing else.

Print first, assert second. It now goes to the log and to the job summary, so a failure explains itself.

What it should be failing on

Compaction is working. The tables were rewritten at 20:18 today with the corrected schema, and the one stored session flattens fine — I ran main's own flatten against the live object locally: 115 unit rows, 1003 phase rows.

So what fails the step is almost certainly .failed != 0: one or more raw objects under sessions/ that will not flatten. That is worth knowing about, but it is not a deployment failure — the infrastructure is live and the tables are published either way. Conflating the two means every future deployment stays red until the data is clean, and a red deploy stops meaning "the deploy broke".

So the deploy now reports skipped objects as a warning annotation, and asserts only that compaction returned ok. The strict "every raw object was consumed" assertion stays where it belongs, in the compact workflow, which already prints the full response and publishes it to the job summary.

Finding the actual object

The compact workflow lists the offending keys — the compactor logs compact: skipping <key>: <error> for each one, and the workflow prints the statistics. One run from the Actions tab will name them.

Worth considering once they are named: the ingest endpoint is public and unauthenticated by design, so anything that can POST can put an object in sessions/ that will never flatten, and it will be retried and skipped on every rebuild forever. If that is what happened, the fix is a cleanup path for unflattenable objects rather than tighter ingest — the streaming write is what keeps ingest cheap, and validating at the edge would give that up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01361quprG7tUgaVFKAmKtJZ

The step asserted into `/dev/null` and printed the response afterwards,
so under `set -e` a failing assertion took the evidence with it. Three
deployments failed here in a row and the only visible output was `exit
code 1`. It prints first now, into the log and the job summary, and
asserts after.

It also stops failing the deployment over a raw object that will not
flatten. That is a data-quality problem: the infrastructure is live and
the tables are published either way, so it is reported as a warning
here and left to the `compact` workflow, which exists to assert that
every raw object was consumed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01361quprG7tUgaVFKAmKtJZ
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

cratebank preview

Preview removed because this pull request is closed.

@zmaril
zmaril merged commit bb6e458 into main Aug 24, 2026
12 checks passed
@zmaril
zmaril deleted the deploy-diagnostics branch August 24, 2026 20:25
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