Skip to content

An archive that lost the file modes fails rather than travelling

majordomus archive writes a snapshot of the tracked tree and then opens it again before returning. The entry count in the container must equal what was staged, and if executable files went in and none came back out, the command fails with exit 13 and a reproduce command instead of handing you a copy in which nothing can run.

declared statusdeclared status: guaranteed Declared deterministic and blocking, implemented, and naming the behavioural test that is to prove it. Whether a recorded run supports it is the evidence verdict, shown beside it.

recorded evidencerecorded evidence: stale Declared guaranteed, and not supported by a recorded run: the test is named, and no passing run of the current inputs is recorded. how evidence is recorded

The mode of every entry is taken from the git index, written into the archive manifest and proved through the container before the command returns.

What it means

majordomus archive writes a snapshot of the tracked tree and then opens it again before returning. The entry count in the container must equal what was staged, and if executable files went in and none came back out, the command fails with exit 13 and a reproduce command instead of handing you a copy in which nothing can run.

How it works

The mode of every entry is read from the git index — the authority on what a file is, rather than the working tree, whose modes an earlier careless copy may already have flattened. It is written into _ARCHIVE/MANIFEST.txt as <mode> <size> <path>, and _ARCHIVE/restore.sh inside the archive re-applies every one of them at the far end and creates a local git index, because this repository enumerates itself with git ls-files and a check run without one examines nothing and reports that nothing is wrong.

The container is written without zip -X. That flag strips the extra fields that carry the Unix mode, which is how the failure this claim exists for was introduced: an archive with the right entry count, every byte of content present, and not one executable in it.

How to see it

majordomus archive audit --out /tmp/a.zip
cd /tmp && unzip -q a.zip && cd <repository>
ls -l scripts/derive          # still 755
sh _ARCHIVE/restore.sh        # modes re-applied, one commit, a real index
scripts/ci/command-furnished  # a gate of the repository, running in the copy

What it does not cover

The restored copy has one commit, no remotes and no reflog. Any check that reads more than the working tree will say so; none of them is made to pass by this claim. Nor is the archive signed, reversible into the original repository, or a backup.

Why it exists

A defect at the far end cannot be distinguished there from a defect in the repository. An archive is believed by someone who cannot compare it with the original, so the comparison has to happen before it is sent.

Detail rendered from docs/claims/archive-fidelity.md.

From the statement to the proof

  1. 1 · the public statement

    An archive that lost the file modes fails rather than travelling

    Made on Projection.

  2. 2 · the canonical claim

    archive-fidelitydeclared status: guaranteed in docs/CLAIMS.yaml

    Defined in read it on this site · docs/ARCHIVE.md

  3. 3 · the implementation

    lib/archive.sh · majordomus archive

  4. 4 · the test and the scenarios

    Test: test/cases/130_archive.sh

    Executed in Hand the repository to someone who cannot clone it.

  5. 5 · the recorded runs

    recorded evidence: stale how evidence is recorded

Verify it yourself

The test runs in a disposable temporary repository and asserts the behaviour, not a string in the source.

from a clone of the repository
bash test/run.sh 130_archive

Where this claim is used

responsibilities it covers

Searches the titles and descriptions of every page this site publishes.