Skip to content

PROC-26: add repository-owned subsystem source tracker - #762

Open
omdev74 wants to merge 5 commits into
ItsNotRexed:mainfrom
omdev74:codex/readme-progress-tracker
Open

omdev74 wants to merge 5 commits into
ItsNotRexed:mainfrom
omdev74:codex/readme-progress-tracker

Conversation

@omdev74

@omdev74 omdev74 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

PROC-26

Add a repository-owned subsystem source tracker, with the scanner, renderer, pinned dependencies, tests, generated reports and update workflow all maintained in Leonida. The README embeds local files from docs/progress, so its graph, badges and history do not depend on a contributor-owned repository or hosted image.

The scanner reads a committed Git tree without importing or executing measured code. It reports separate inventories for:

  • D3D12 SDK methods and inherited generated stubs, against a commit-pinned, SHA-256-checked public Microsoft reference.
  • Shader translator opcode names/prefix selectors and shader-pipeline Python definitions.
  • Runtime loader, shim and backend C++ definitions outside the D3D12 object files already represented in the method panel.
  • Asset-tool Python/C# definitions, the exporter's explicit command branches, and the remaining top-level Python tools.

Each unit links to its source at the measured revision. Panels distinguish body presence, guarded/unsupported paths, simple no-op/constant bodies, and explicit/inherited stubs. Their units and denominators differ: selectors can overlap, and function inventories do not enumerate every missing feature or import. No aggregate completion percentage, game compatibility, shader-correctness, or asset-recovery claim is made.

tools/progress_tracker/README.md documents the scope, parsing rules, exclusions, reference updates and failure behavior. Tests cover source ownership, comments/literals, known macro and calling-convention syntax, local stub propagation, conditional Python definitions, nested exporter selectors, history rule changes, named evidence, rendering, and preserving published output on a failed generation. Existing runtime, translator and asset-tool behavior is unchanged.

.github/workflows/progress.yml runs read-only tests and temporary generation for PRs. On relevant upstream main pushes, hourly schedules and manual runs, a separate non-fork publish job uses the repository's built-in token to commit only docs/progress. It requires no personal token or extra secret. Generated files do not match the source trigger filters, so refresh commits do not loop. Publication respects branch rules; maintainers retain control of its schedule and policy.

History keeps daily points with separate scales and units, rescans historical trees with the same rules, lists unavailable historical measurements explicitly, and preserves different counting-rule versions as separate series. No game files, generated shaders or extracted assets are read or committed.

Validation: all 41 tracker tests pass; Python compileall and make_game.py --help pass. The native workflow passed actionlint and the repository's jactionlint check. The graph and history were rendered and visually checked in Edge. The new Source tracker PR check successfully installed the pinned dependencies, ran the tests and generated reports; its write job correctly skipped the PR. Publishing activates on upstream main after merge. This is AI-assisted; no GPU, game-corpus or asset-recovery run is claimed.

Coordination claim: #634 (comment)

@omdev74 omdev74 changed the title docs: show automatically refreshed implementation tracker in README docs: show source-scanned tracker, history and badges in README Nov 22, 2026
@omdev74 omdev74 changed the title docs: show source-scanned tracker, history and badges in README PROC-26: add repository-owned subsystem source tracker Nov 22, 2026
@kotorvr

kotorvr commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Reviewed 4d47012: 1 finding

  • tools/progress_tracker/run.py:254: now (minute resolution) goes into badge-updated.svg, dashboard.svg, progress.json and report.md, so two runs on the same revision never produce the same files. I ran it twice on 4d47012, two minutes apart, and those four files differed; nothing else did. So the refresh job in .github/workflows/progress.yml finds git diff --cached non-empty on every hourly run and pushes a commit to main 24 times a day even when no source changed. ci.yml and no-game-data.yml run on every push to main with no path filter, so each of those commits also starts a full CI run. A fix: commit only when a non-timestamp field changed (compare progress.json with observed_at dropped), or keep the time out of the committed files.

Ran: in a scratch venv with the three pinned parsers, python -I -W error -m unittest discover -s tools/progress_tracker/tests: 41 OK. python -I tools/progress_tracker/run.py --output <scratch> generated all 15 files in about 17 s, then I ran it again and diffed the two outputs. Windows 11, Python 3.13.7.

Review was AI-assisted (Claude Code).

@AGVibecoder AGVibecoder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 4d47012 on Windows 11, Python 3.12.10: tests pass, but I'm requesting changes for the publish job.

What I ran: pip install -r tools/progress_tracker/requirements.txt in a fresh venv, then python -I -W error -m unittest discover -s tools/progress_tracker/tests (41 tests, OK) and python -m compileall -q make_game.py tools tests (OK). I did not run run.py end to end (it fetches the pinned header and rescans history).

  1. Every hourly run commits to main. run.py:254 stamps observed_at to the minute, and it is written into badge-updated.svg (report_assets.py:155), report.md (run.py:185) and the dashboard (run.py:104). So the git diff --cached --quiet guard in progress.yml never skips, and the '23 * * * *' schedule (progress.yml:18) produces a docs: refresh source tracker commit on main every hour, plus one per qualifying push. That is about 24+ bot commits a day on a branch that already gets large merge rounds, and every open PR shows as behind after each one. Suggestion: only commit when the counts change (compare the outputs without observed_at), or date the snapshot by the measured revision's commit time instead of the wall clock, or publish to a separate branch or Pages.
  2. The push can race a merge. git push origin HEAD:main (progress.yml:79) has no rebase or retry. If main moves during the run, which happens often here, the push is rejected and the job turns red with nothing wrong in the tracker. A git pull --rebase and one retry (safe, since only docs/progress is touched), or a separate branch, avoids that.
  3. Minor, for the maintainers: tools/progress_tracker/LICENSE adds an MIT notice with a personal copyright inside the GPL-3.0 repository. It's compatible, but whether the project wants a second licence file in the tree is their call. The branch is also ~1,900 commits behind main, so the committed docs/progress snapshot is stale until the first refresh.

The scanner side looks careful: it reads committed Git trees without importing code, pins the D3D12 header by SHA-256, and reads no game data.

AI-assisted review.

@x2Tweek

x2Tweek commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Independent code review of PR #762 (PROC-26)

Commit tested: 4d47012 (head of PR #762, detached worktree)
Environment: Windows 11 Pro 10.0.26300, Python 3.15, no GPU, no game copy

What was verified

Static code review of the new tools/progress_tracker/ package:

  • No game data, keys, or decryption: the diff touches only tools/progress_tracker/, docs/progress/, README.md, and .github/workflows/progress.yml. No archives, executables, shaders, textures, or game logs. Compliant with CONTRIBUTING.md and AGENTS.md.
  • No runtime behavior change: the PR states "Existing runtime, translator and asset-tool behavior is unchanged." Confirmed: no files under runtime/src, runtime/shims, tools/rdna2spirv.py, or any asset tool are modified.
  • Defensive scan design: source_scan.py raises ScanError on ambiguous class names, multiple generated-stub bases, conditional compilation in measured classes, ambiguous/unparsed definitions, and overrides missing from the pinned SDK reference — it fails loud rather than silently declaring support.
  • Pinned external reference: the D3D12 SDK header is pinned by commit SHA (61c77189...) and SHA-256 (773657b0...) in tracker.json, downloaded over HTTPS to an ignored cache and hash-verified before use. No Xbox Live / Rockstar services or domains contacted.
  • Calling-convention masks in cpp_input() preserve byte offsets for source links; the masked text is never compiled.
  • Classification rules (body / partial / noop / stub) are explicit in subsystems.py and source_scan.py; no aggregate completion percentage is computed, matching the documented design.
  • Workflow (.github/workflows/progress.yml) runs read-only checks + temporary generation on PRs; the publish job runs only on non-PR main pushes in the non-fork repo using GITHUB_TOKEN, committing only docs/progress. No personal token or secret required.

What could NOT be executed

The 41 tracker tests (python -I -W error -m unittest discover -s tools/progress_tracker/tests -v) require tree-sitter==0.25.2, tree-sitter-cpp==0.23.4, tree-sitter-c-sharp==0.23.5 (pinned in tools/progress_tracker/requirements.txt). On this machine, pip install of tree-sitter fails: "Unable to find a compatible Visual Studio installation" (no C++ build toolchain available to compile the native binding). Tests were therefore not executed.

Also not executed: python -I tools/progress_tracker/run.py (requires the same parser packages plus network access to fetch the pinned SDK header).

Conclusion

Static review found no correctness issues, no game-data violations, and no obvious bugs. The design is conservative and well-documented. I could not execute the test suite due to a missing native build toolchain on this machine; a reviewer with a working MSVC C++ toolchain should run the 41 tracker tests and run.py before merge.

AI-assisted. No GPU or game-corpus run claimed.

@KoertLichtendonk KoertLichtendonk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of 4d47012a (PROC-26). This was a read-only review: I didn't install the pinned parsers or run the scanner here, so the points below come from reading the code and the committed outputs.

1. The hourly schedule will commit to main every hour, even when no source changed (the same root cause as @kotorvr's note on run.py:254, still present at this head).

  • run.py:254 sets now to the wall-clock minute, and it is published as observed_at.
  • It ends up in four committed files: badge-updated.svg, dashboard.svg, progress.json and report.md. All four carry 2026-11-22 03:27 UTC at this head.
  • So each refresh run differs from what's committed, git diff --cached --quiet is never true, and the job pushes docs: refresh source tracker about 24 times a day.

Every input the scan reads is either the committed tree or the pinned, hash-checked SDK header. That means the push: main trigger already catches every real change. Two possible fixes:

  • (a) Drop the schedule: trigger, and stamp the measured revision's commit date instead of the wall clock. Then a rerun on the same tree is byte-identical.
  • (b) Keep the schedule, but compare the snapshot without observed_at before committing.

(a) is simpler and also removes the "GitHub disables schedules after 60 days without activity" caveat.

2. Smaller notes:

  • tree-sitter and friends are the tracker's first pinned non-stdlib Python dependencies. That's allowed by AGENTS.md ("unless a file says otherwise") and the tool's README documents it. It might deserve one line in CONTRIBUTING.md, so nobody assumes tools/ is stdlib-only everywhere.
  • Downloading d3d12.h from microsoft/DirectX-Headers at a pinned commit, with a SHA-256 check, is fine under "nothing online", which is about Xbox Live and Rockstar.
  • MIT inside the GPL-3.0 tree is compatible, and the notice is kept.
  • The publish job's direct push to main depends on branch rules, as the README says. That's @ItsNotRexed's call.

3. A suggestion: put a "Boot path" panel first. The README says it plainly: "Early. The game does not boot yet." But a row of green badges right above that line ("D3D12 bodies", "Shader selectors", "Runtime bodies") reads as nearly done to most visitors, despite the careful disclaimer. A small, hand-maintained panel ahead of the inventories would set the context. Every step links to the doc that states it:

Step Status Source
Package DLLs load and every import binds done docs/runtime_imports.md (16/16)
Stand-in executable runs end to end (gta6rt --run) done README, PE loader row
Game executable available no docs/runtime_imports.md: game_scarlett_master.exe is not in the package
Its imports measured no same
Game code starts no
First D3D12 trace from the game tool ready, no trace runtime/README.md#first-boot-d3d12-trace
Game shaders draw in a frame no
First frame on screen no
Menu, then in-game no

That would be one docs/progress/boot.json (step, state, link), a panel drawn before the inventories, and maybe a boot: 2/9 badge as the first README badge. Updating it would be a deliberate one-line edit in a PR, not a scan. Because it isn't derived from source, it can't drift into looking finished.

Not a blocker. #1 is the change I'd want before the publish job runs on main.

AI-assisted review (Claude Code).

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.

5 participants