Skip to content

ci(evidence): Keep run outputs keeps the log lines a pattern finds, and the viewer tests' figures link to them (#2148) - #2150

Merged
DrunkOnJava merged 5 commits into
mainfrom
ci/2148-keep-log-lines
Nov 22, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
ci/2148-keep-log-lines

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

The Keep run outputs workflow can now keep the lines of a run's log that a pattern finds, as refs/evidence/<run>-log. It is for figures a run prints only to its log. The status page's viewer-tests paragraph is the case in #2148: its run, 42125048710, lists no artifact, and its log is deleted with the run.

  • What it keeps: with part: log and lines: <pattern>, a Python regular expression, it keeps each log line in which the pattern is found, as <job>\t<time>\t<text>, with terminal colour codes removed. KEPT.md records the pattern and the jobs.
  • Which runs: a finished run of this repository of any workflow, but not a pull request's, since such a run prints what its own branch chose. The other parts still take only Measure runs.
  • What stops it: no lines, a pattern that is not a regular expression, a pattern that finds no line, and the same scans as the other parts, the PII guard's patterns and left-out folders' names. A runner's home path in a matched line is refused like any other.
  • Kept:
    • run 42125048710's measurement lines (the panel, the read cost, the office, Core Interior and the read under the 927 MiB cap) and its 3 jobs' build line for the page script, 8 lines at refs/evidence/42125048710-log;
    • the earlier build's line, from run 42109657349 (the build of d1de8adf), at refs/evidence/42109657349-log.
  • Linked: the status page's sentence links the measurement lines. Its "40.27 kB larger (8.65 kB gzipped)" links the two size lines: 999.56 against 959.29 kB, and 271.47 against 262.82 kB gzipped. The index lists both refs, and run 42109657349 with -, as it lists no artifact.

Part of #2148.

Motivation

#2148. A figure printed only to a run's log loses its source when GitHub deletes the run's log, as it does its artifacts.

Changes

  • .github/workflows/keep-run-outputs.yml: the log part and the lines input; the trust check per part.
  • tools/ci/keep-run-outputs.py: --part log --lines; the scans moved into scan(), unchanged, so every part goes through them.
  • docs/status.md: the viewer-tests citation and the script's growth link the kept lines.
  • research/kept-runs.tsv: the two -log rows, 42109657349's row, the reason on 42125048710's row, and a header line for -log rows.
  • docs/evidence.md: the sentence on runs with nothing left to keep.

Testing

Unit tests are banned in this repository: do not add them.

  • The workflow, end to end, dispatched from this branch on run 42125048710.
    • First, with lines='^(Saved parameters|saved parameters|Read cost) ' (run 45074538166), it pushed 4 lines from browser tests 1/3, the same 4 as the tool gave locally on that run's log.
    • That ref, cited nowhere yet, was deleted and kept again twice as the pattern grew to take the build line and the cap line. The last keep was run 45076780338, with lines='^(Saved parameters|saved parameters|Read cost|A read under a) |^dist/assets/index-[A-Za-z0-9_-]+\.js '. It is commit 85fff80d: 8 lines from 3 jobs.
    • On run 42109657349, with lines='^dist/assets/index-[A-Za-z0-9_-]+\.js ' (run 45076218140), it pushed commit ed933f84, with 3 lines.
  • The refusal of a pull request's run, end to end: dispatched from this branch on CodeQL's pull-request run 45074187189 (run 45075955660). It failed with "run 45074187189 is a completed pull_request run of .github/workflows/codeql.yml in DrunkOnJava/rvt-rs: the log part keeps a finished run of DrunkOnJava/rvt-rs that is not a pull request's", and pushed no ref.
  • The tool, locally on that log (gh run view 42125048710 --log):
    • a pattern that finds nothing: exit 1;
    • a pattern finding the runner's HOME line, which holds /home/runner/: exit 1, a PII hit;
    • --lines without --part log, and --part log without --lines: exit 1;
    • an invalid expression: exit 1.
  • The other parts after scan() moved, locally:
    • outputs, on run 45073138078's measure-head: the same 13 files for 2 models as its kept commit;
    • holdout, on run 41713761592's: 2 files for 1 model, its counts.txt byte for byte the kept one;
    • probes, on run 45073138078's: its 2 probe.txt and commit.txt.
  • The script sizes: 999.56 − 959.29 = 40.27 kB, and 271.47 − 262.82 = 8.65 kB gzipped.
  • Each figure of the paragraph was found in the kept lines:
    • Einhoven's 37 of 37, 28 and 369 (332, 37, 8) and 7;
    • the read's median 153 ms and most 210 ms, 17 MiB, the open's 23 MiB;
    • Core Interior's four elements at 1.5 to 1.9 s in 275 MiB, and the open's 326 MiB and 17330 ms;
    • the office's 62 MiB file, 8 entries in 3856 ms, 943 MiB, 910 MiB, 66572 ms, and 2 answers of 4,654 characters;
    • the read under a 927 MiB cap on the office, "error: ... ran out of memory reading the file a second time".
  • actionlint, zizmor, shellcheck and tools/ci/check-workflows.py pass. tools/ci/cited-runs-kept.py (58 runs), tools/ci/measured_numbers.py and every step of the PII guard job pass locally, 29 of 29. Both new URLs return 200 logged out.

Audit-honesty checklist

  • Each link names what its kept lines back.
  • No changelog fragment: repository tooling and documentation links.
  • No emojis, private paths or internal jargon.

Legal and contribution hygiene

  • Apache-2.0.
  • No Autodesk proprietary content.
  • No fixtures.

Breaking changes

None.

Review: rvtReview, the maintainer session, wrote this change. As rvtDevelop is not running, it re-reads the diff and approves the change itself on a green head (Griffin, 2026-11-12).

@DrunkOnJava
DrunkOnJava merged commit 0fcd0f2 into main Nov 22, 2026
39 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/2148-keep-log-lines branch November 22, 2026 23:38
DrunkOnJava added a commit that referenced this pull request Nov 23, 2026
…ports, and RE-347's placed bodies cite the runs that score them (#2148) (#2151)

## Summary

Measure can now run a scorer over each model's two exports, base and
head, for a claim that a change moved nothing. The status page's RE-347
sentence, that every door's and window's body and opening is where it
was, had no kept source: `tools/re/placed_bodies_vs_base.py` had been
run on a Mac over the cited runs' kept IFCs (#2148).

- **The input:** `-f pair_scorer=<tools/re scorer>`, a scorer that takes
`<base.ifc> <head.ifc>`. It needs a base and `keep_ifc=true`, and the
job refuses without them.
- **The job:** `pairs` runs the scorer, from the workflow's ref as the
compare job's tools do, on each model anyone can fetch and both sides
exported. It uploads the outputs as `measure-pairs` and fails on a
scorer that exits non-zero. It is its own job, so a run with no pair
scorer is unchanged. A held-out, `rac_advanced` or BIMcollab model is
never given to it, since such a scorer prints ElementIds. Measure's
scrub already leaves such a folder no export, and the job's list of
models anyone can fetch is a second fence.
- **Kept:** the Keep run outputs workflow keeps `measure-pairs` as
`pairs/` with a run's outputs.
- **Measured again:** RE-347's two runs, at their own commits, with
`pair_scorer=placed_bodies_vs_base`.
- Run 45074892701 (head `b452f967`, base `5c35e190`) scores Core
Interior, RE1 Architecture and both offices.
- Run 45074900834, the box-body run (head `c1a2a739`, base `e9f4c592`,
`--no-saved-meshes`), scores Core Interior and both offices.
- Every model's export digest on both sides equals the cited runs' kept
`ifc.sha256`, so these score the same exports RE-347 scored. Their
counts are RE-347's tables'.
  - Both are kept, and the status page cites them beside the first two.

Part of #2148.

## Motivation

#2148. "Is where it was" was backed only by a run on a Mac, over exports
GitHub deletes with the runs.

## Changes

- `.github/workflows/measure.yml`: the `pair_scorer` input, the `pairs`
job, and a header paragraph.
- `.github/workflows/keep-run-outputs.yml`,
`tools/ci/keep-run-outputs.py`: `measure-pairs`, kept as `pairs/`.
- `docs/status.md`: the RE-347 sentence cites the two runs and links
their kept outputs.
- `research/kept-runs.tsv`: 2 rows.

## Testing

Unit tests are banned in this repository: do not add them.

- [x] **The job, end to end, on RE-347's two runs** (45074892701 and
45074900834, dispatched from this branch). Every job succeeded, each
model's scorer exited 0, and `measure-pairs` holds 4 and 3 outputs.
- Core Interior: doors' axes 92 moved, 40 unchanged; windows' 6 and 0;
bodies 138 paired, 0 moved; openings 138 paired, 0 moved; no identity
difference.
  - RE1 Architecture: 3 and 2; 5 bodies and 4 openings paired, 0 moved.
- The office as built: 156 and 113 each; 538 bodies and 463 openings
paired, 0 moved.
- At building permit: doors 155 and 114, windows 152 and 113; 534 bodies
and 457 openings paired, 0 moved.
- The box-body run gives the same pairs, with no body or opening moved.
- [x] **A held-out model in the run** (45076986876, `-f holdout=true -f
models="re1-architecture holdout-modelo*"`): `holdout-modelo_bim` was
measured on both sides. Its folders held only `counts.txt` and
`ifc.sha256`, and `measure-pairs` holds `re1-architecture` alone.
- [x] **No `keep_ifc`** (45076996046): the pair job failed at its first
step with "pair_scorer reads both sides' exports: dispatch it with -f
keep_ifc=true and a base".
- [x] **A scorer that exits non-zero** (45084427212,
`pair_scorer=areas_across_saves`, which takes saves by year and prints
its usage when given two plain files): the pair job failed with
"re1-architecture: areas_across_saves exited 2 (see
pairs/re1-architecture/areas_across_saves.txt)", and `measure-pairs` was
still uploaded.
- [x] **The same exports:** each model's `ifc.sha256`, head and base,
equals the one kept for runs 42092391898 and 42106731054, 14 of 14.
- [x] **The keeping, end to end:** the workflow dispatched from this
branch on both runs (runs 45075828083 and 45075835059) kept `pairs/`
with 4 and 3 files, at `refs/evidence/45074892701` and
`refs/evidence/45074900834`.
- [x] **The keep tool after merging `main`**, where #2150 added the log
part to it, locally: the outputs part on a `measure-head` and a
`measure-pairs` keeps `pairs/` with its 4 files, and the log part on run
42125048710's log keeps the same 8 lines as
`refs/evidence/42125048710-log`.
- [x] actionlint, zizmor, shellcheck and `tools/ci/check-workflows.py`
pass after the merge. Measure has 22 dispatch inputs, under GitHub's 25.
`tools/ci/cited-runs-kept.py` (60 runs), `tools/ci/measured_numbers.py`
and every step of the PII guard job pass locally, 29 of 29, and both new
URLs return 200 logged out.

## Audit-honesty checklist

- [x] The status page keeps its first two runs, which made the claim,
and adds the two that score it in CI.
- [x] No changelog fragment: repository tooling and documentation links.
- [x] No emojis, private paths or internal jargon.

## Legal and contribution hygiene

- [x] Apache-2.0.
- [x] No Autodesk proprietary content.
- [x] No fixtures.

## Breaking changes

None.

Review: rvtReview, the maintainer session, wrote this change. As
rvtDevelop is not running, it re-reads the diff and approves the change
itself on a green head (Griffin, 2026-11-12).
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