Skip to content

ci: the seal script keeps an unopened copy of each sealed pair in a private repository, which the final check will fall back to (#1565) - #1570

Merged
DrunkOnJava merged 3 commits into
mainfrom
ci/1565-sealed-backup
Nov 9, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
ci/1565-sealed-backup

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

tools/ci/seal-holdout-pair.sh now uploads both files of a pair, unopened, to the private repository DrunkOnJava/rvt-rs-sealed, as <sha256>.rvt and <sha256>.ifc in its sealed release. The upload happens before the pair's row is added. The script refuses to upload unless that repository is private, and it checks each asset's digest against the hash in its name. The final 1.0 check, which does not exist yet, will fall back to those copies when a contributor's link no longer serves the file the row's hash names. The guard now fails on any committed file that names that repository, other than the seal script, the check and docs.

Motivation

#1566 requires links that name a fixed version, but a contributor can still delete the repository behind one. The final check fetches each pair again, maybe months later, and a pair whose file is gone is lost. Griffin chose a private, unopened copy of each sealed pair on 2026-11-08. A pair's licence (Apache-2.0, MIT, CC BY 4.0 or CC0) is the contributor's declaration, which the check reads only as a label. The files also embed Autodesk's template families, which no contributor's licence covers. So the copies stay private and are never redistributed, and the script refuses a backup repository that is not private.

Changes

  • tools/ci/seal-holdout-pair.sh:
    • Each downloaded file is kept under its sha256 until the pair check and the row check pass.
    • Then it is uploaded with gh release upload sealed -R DrunkOnJava/rvt-rs-sealed --clobber. An asset is named by its own hash, so replacing one only repeats a run that stopped before the row was added.
    • Before the first upload, gh repo view --json isPrivate must read true, or nothing is uploaded or sealed (rvtReview: a visibility flip or a wrong BACKUP would publish them, and a published upload cannot be recalled).
    • Each asset's digest on the release must be sha256: followed by the hash in its own name, or nothing is sealed. This is exact and needs no download.
    • Only then is the local copy deleted and the row appended. A refused pair is never uploaded.
  • tools/ci/check_sealed_holdout.py: BACKUP = "DrunkOnJava/rvt-rs-sealed". A tracked file that is not Markdown and names rvt-rs-sealed, in any letter case, fails unless it is the seal script or the check. No workflow can be pointed at the copies without review seeing an exception added to ALLOWED.
  • tools/ci/test_check_sealed_holdout.py:
    • A failure-first test of that rule: a workflow, a script and a scorer naming the repository each fail, and so does a script naming it under another owner. The test fails with the rule removed (checked by setting BACKUP to another name), and also when the rule matches the full DrunkOnJava/rvt-rs-sealed instead of the bare name (rvtReview's mutation run).
    • The seal-script-and-docs test now names the repository as well.
    • rvtReview's four link cases from ci: fresh held-out pairs for the 1.0 check are sealed in a registry no committed workflow or script may name (#1565) #1566 join test_a_link_that_can_change_fails: releases/latest/download, a blob/ page at a commit, a short hash, and a Zenodo concept DOI or record without /files/.
  • docs/maintaining.md (sealed pairs section): what the copy is, when the final check uses it, that the guard covers its name, and a check before any pair is sealed that no GitHub App on the maintainer account is installed on every repository, since one would read the copies too.
  • changelog.d/changed/1565-sealed-pairs-private-copy.md: the registry's fragment shipped in 0.16.1, so the copy has a fragment of its own.

Testing

  • python3 tools/ci/test_check_sealed_holdout.py: 33 tests pass, and shellcheck is clean. python3 tools/ci/check_sealed_holdout.py: 0 listed, nothing named or pointed at.
  • End to end, in a scratch copy of tools/ci with its own empty registry, on the first commit (steps 1 to 3) and the second (steps 4 and 5), tested before the rebase onto 0.16.1 as 28f2d07b and 156418a1. They are now b21aba4e and 76534a3c, and the rebase dropped only their edits to the fragment 0.16.1 released:
    1. A 404: RE1 Mechanical's media link failed to download and exited 2. Nothing was uploaded or added.
    2. Not a 2025 export: RE1 Mechanical (MIT) at its pinned raw commit was refused before any upload, because its IFC is IFC2X3 and names no Revit 2025.
    3. A real pair: magnetar's Core Interior (MIT, Revit 2024, IFC4), at commit fd755e18 by Git LFS media, sealed with exit 0. The row holds the .rvt's known sha256 c805df44… and its 33,718,272 bytes. The release held c805df44….rvt (33,718,272 bytes) and d07c7462….ifc (20,392 bytes). The IFC, downloaded back, hashes to d07c7462…. Both test assets were then deleted, and the release is empty.
    4. Not private: a copy of the script with BACKUP=DrunkOnJava/rvt-rs (public) downloaded and checked the same pair, then stopped with "not sealed: DrunkOnJava/rvt-rs is not private" (exit 1). Nothing was uploaded, no release was created there, and no row was added.
    5. The head, private: the same pair sealed with exit 0. The assets' digests read sha256:c805df44… and sha256:d07c7462…, each equal to its name. They were deleted afterwards.
  • The pair check passes the headers of six real Revit IFC4 and IFC4X3 exports of 2023 to 2026 at their own release: Core Interior, modelo_bim, Projeto1, teste_export_2025, the AA house and Exemplo_data. A 2026 export names Autodesk Revit 26.2 in FILE_NAME, but its IfcApplication within the first 64 KiB names Autodesk Revit 2026.

Audit-honesty checklist

  • Docs and a new fragment describe the copy.
  • No emojis, private paths or PII. No sealed URL or hash is committed.

Legal and contribution hygiene

  • Apache-2.0. No Autodesk source, internals or NDA material. The copies hold only pairs declared under open licences, kept private because they also embed Autodesk's template families.

Breaking changes

None. The registry is empty.

The private repository

The repository is private, with the owner as its only collaborator, and holds a README and an empty sealed release. Its Actions are disabled. GitHub offers no fork setting on a user-owned private repository, but only collaborators can fork one. Which of the account's installed GitHub Apps have access to all repositories, and so to this one, is not readable with the maintainer's token. That is noted for the owner.

@DrunkOnJava DrunkOnJava changed the title ci: the seal script keeps an unopened copy of each sealed pair in a private repository, which the final check falls back to (#1565) ci: the seal script keeps an unopened copy of each sealed pair in a private repository, which the final check will fall back to (#1565) Nov 9, 2026
…rivate repository, which the final check falls back to (#1565)
…nd checks each copy's digest; the final check will fall back to the copies (#1565)
…tainer account reads every repository; the private copy gets a fragment of its own (#1565)
@DrunkOnJava
DrunkOnJava force-pushed the ci/1565-sealed-backup branch from 156418a to 3d018bf Compare November 9, 2026 05:36
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 9, 2026 05:36
@DrunkOnJava
DrunkOnJava merged commit 79f5165 into main Nov 9, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/1565-sealed-backup branch November 9, 2026 05:51
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