Skip to content

The run history can be silently truncated by one bad fetch of the published gh-pages copy #125

Description

@gaurav

gh-pages is written by a force-push of a single commit, and read over HTTP by the same pipeline that writes it. Nothing coordinates the two, and there is no stated answer for what a reader sees mid-write.

The concrete case is the history file. Each run does this:

  1. curl the published history.jsonl from https://translatorsri.github.io/babel-validation/data/history.jsonl;
  2. append one line for this run;
  3. force-push the whole site, including the new file, as a single commit.

Step 1 is a read of the live site, which is the source of truth precisely because step 3 replaces the branch rather than appending to it. That is a reasonable design — but it means the history is only as durable as that one fetch:

Worth deciding rather than patching around: options include keeping history.jsonl in the repository instead of only on gh-pages (making it a real append log with git history behind it), reading it from the gh-pages branch by checkout rather than over the CDN, or keeping the published file but refusing to deploy a history shorter than the one just read — a guard that turns silent truncation into a failed run.

Noticed while working on #120; not something to fold into it, since it is a design call about where the run history actually lives.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions