Skip to content

The weekly job cannot commit to git, so it publishes the index instead - #13

Merged
NemboKid merged 1 commit into
mainfrom
ops/publish-index
Aug 1, 2026
Merged

The weekly job cannot commit to git, so it publishes the index instead#13
NemboKid merged 1 commit into
mainfrom
ops/publish-index

Conversation

@NemboKid

@NemboKid NemboKid commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Two bugs that would have bitten on the first scheduled run.

1. The git step could never have worked. weekly-sweep.sh ended by committing published-runs.json and pushing. Dockerfile.sweep ships binaries and scripts, not a checkout — there is no file to commit into and no push credentials. The job would have failed on its last step every week.

Giving an unattended weekly job write access to the source repository, to record a hash, is also a worse trade than typing one command afterwards.

publish-run.sh now uploads runs/index.json to the bucket — what heartbeat verifies and what anyone can fetch — and the commit is a documented human step taken when the week's report is written. Git remains where a hash becomes evidence, and a divergence between bucket and git is visible to anyone comparing them.

2. With no local index, the upload would have wiped the history. publish-run.sh started from an empty list when published-runs.json was absent, which is exactly the container's situation. The bucket index would have been replaced with a single entry, silently losing every earlier run from the machine-readable index while the archives themselves stayed fine. It now seeds from the bucket first, then appends.

Verified

re-publishing an existing run index byte-identical, archive untouched
running with no local index seeds from bucket, ends with all 4 runs (not 1)
bucket index live, 4 runs
step order still sweep → rung 6 → delta → export → publish → heartbeat, asserted

…nstead

`weekly-sweep.sh` ended by committing `published-runs.json` and pushing. That
step could never have worked: `Dockerfile.sweep` ships binaries and scripts,
not a checkout, so there is no file to commit into and no push credentials —
the job would have failed every week on its last step.

Giving an unattended weekly job write access to the source repository, to
record a hash, is also a worse trade than typing one command afterwards.

So `publish-run.sh` now uploads `runs/index.json` to the bucket, which is what
`heartbeat` verifies and what anyone can fetch, and the git commit is a
documented human step taken when the week's report is written. Git remains
where a hash becomes EVIDENCE — a value in a commit predating any dispute —
and a divergence between the bucket and git is visible to anyone comparing
them, which is the property that actually matters.

One more bug found by thinking about the container: with no local index,
`publish-run.sh` started from an empty list, so the upload would have REPLACED
the published history with a single entry. Every earlier run would have
vanished from the machine-readable index while the archives themselves stayed
fine — a silent, confusing loss. It now seeds from the bucket first and
appends.

Verified: re-publishing an existing run leaves the index byte-identical, and
running with no local index at all seeds from the bucket and still ends with
all four runs rather than one.
@NemboKid
NemboKid merged commit 875159e into main Aug 1, 2026
5 checks passed
@NemboKid
NemboKid deleted the ops/publish-index branch August 1, 2026 18:05
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