Byrgenwerthnotes of Paleblood, rebuilding Bloodborne one verified function at a time

Last updated: November 14, 2026

CI Setup

Both repositories run GitHub Actions on every push and pull request. Neither ever sees game data: nothing from a dump is in the repositories, and CI does not need it.

At a glance

Code repository
Build matrix (GCC, Clang), policy, and a session report on pull requests.
Wiki
Rejects game data, checks generated files, builds with --strict.
Merge-blocking
The four code repository checks, including the readable-code check.
Runs locally only
Function-level verification against the real game: it needs your dump.

Code repository (Paleblood)

.github/workflows/ci.yml runs three jobs:

Job What it checks
build (gcc), build (clang) CMake build, the syslib CTest (RT_SYSLIB), the rest of CTest, and the Python suites.
policy No game data, valid function tables, generated progress text, readable code, pre-commit hooks.
session report On pull requests: picks the right report from the changed file paths.
What each job does in full
  • build (gcc) and build (clang) — install the pinned optional Capstone dependency, configure and build with CMake, run the syslib CTest (the RT_SYSLIB unit test), then run the remaining CTest suite. The workflow also runs the harness/instruction-trace and differential-engine Python suites with each compiler and its built loader. It includes hook-table and loader tests, the plug-in contract test, synthetic executable-memory hook tests, and synthetic tracing, CFG, and mutation regressions. These tests do not run the full game-run scaffold or establish native game-run equivalence.
  • policy — rejects anything that looks like game data; validates the function tables; checks that runtime and tools name nothing specific to the game; checks generated progress text: on a pull request only the generated lines it changes must be current (progress.py --check-touched), since progress is regenerated on main by one pull request on auto/regenerate-progress, and the full freshness check runs on that pull request and in the progress.yml workflow on every push to main (#711); runs the readable-code check (addresses, raw offsets, magic numbers, and recording code); and exercises the pre-commit hooks.
  • session report — on pull requests, CI selects the concise report for runtime-only changes, the documentation report, or the full decompilation/mixed report from changed file paths. Unknown code paths fail closed to the full report. Runtime changes cannot downgrade a mixed PR. The build and policy jobs still apply to every path. These four checks are required by Paleblood's current main branch protection, and since #744 they are the only checks the merge queue runs. The advisory combined workflow runs apart, on pull requests only, pairing each with at most four open pull requests that touch the same files or directories (#752).

Readability and independent review

  • tools/check_readable.py (in policy) is required and merge-blocking.
  • A reviewer who did not write a function must approve it before it is verified.
  • Function-level verification runs locally, not in CI.
Readability check and review record

The policy job's tools/check_readable.py step is a required, merge-blocking check. It rejects mechanical transcription patterns in game/, and CI refuses any growth in the grandfathered-file list. The check does not judge whether names, structure, complexity, or comments are easy for people to follow. Before a function is marked verified, a reviewer who did not write it must assess both its verification evidence and readability; the approval is recorded in symbols/reviews.csv and the promotion tools validate that record. Paleblood's current branch protection does not require a blanket approving review on every pull request.

Local verification, runtime PRs and promotion

Function-level verification against the real game cannot run in CI, because it needs your dump. It remains required for decompilation changes and runs locally (tools/verify.py run, tools/smoke.sh). The full session report must include every replacement status change recorded for the PR and matching, non-empty, passing verify.py evidence for each replaced, edge-verified, or verified function. Runtime-only contributions do not require a dump, captures, or function-level verification. After a runtime PR merges, a maintainer runs tools/boot.py locally and posts its result on the PR.

tools/promote.py checks existing recorded and edge cases locally and requires an approved review before promotion. Comparison result files go to temporary storage; the capture library remains input-only. --dry-run leaves verification metadata and function status unchanged.

Wiki (Byrgenwerth)

.github/workflows/ci.yml installs MkDocs, rejects game data, checks that every generated file (progress data, tables, visuals) agrees with the data it comes from and that no page has a hand-typed count, builds the site with --strict, and exercises the pre-commit hooks.

Local workflow (no CI needed)

Shell
tools/install_hooks.sh            # both repositories
tools/smoke.sh                    # code repository: the pipeline on a known function
export BB_PORT_DIR=/absolute/path/to/clean-paleblood-main-at-merged-sha
tools/end_session.sh              # wiki: pull numbers from the code repository, build, check
python3 -m mkdocs serve           # wiki: preview at http://127.0.0.1:8000
Pin BB_PORT_DIR for wiki validation

For wiki validation and publication, pin BB_PORT_DIR to a clean worktree at the merged Paleblood revision the wiki data names (tools/source_pin.py show; it must be on main and no older than a day) and record its absolute path and full SHA in the shared checkpoint. Do not use the implicit sibling checkout when it may contain uncommitted or stale changes.