docs: the handoff audit found what it always finds, plus three live gaps (#37)

Eight PRs merged in one session; the audit ran afterwards, as the process
requires, and found 53 items. Three were fail-opens in gates repaired hours
earlier by this same session, and two were user-facing promises this session
itself made wrong.

THREE GATE FIXES.

rules-publish compared VALUES for the five family-bearing groups and nothing at
all for the heuristic block. nameFragments can be cut from five entries to one
with every gate in the repository green -- the schema only enforces minItems: 1
-- and tools/gen-ac-floor.ps1 GENERATES kFloorFragments from that same array, so
the S21 compiled-in floor shrinks with it. The floor exists so data can ADD and
cannot remove; a removal channel that bypasses it defeats the mechanism.
trustedSigners is now compared too, for the opposite polarity: it is the one
allow-widening list and an ADDITION there suppresses refusals, which S19(d)
records as invisible to this job.

build.ps1's own contract is that a gate which does not run SAYS SO. Invoke-Native
returned early on -SkipNative, no cmake or no MSVC while Write-Step 'Native
tests' and Invoke-ClangFormat both sat AFTER those returns, so two gates silently
did not run and were never added to the skipped list. The summary reported one
skipped gate where three had not run, in the script that declares the discipline.
Verified: ./build.ps1 check -SkipNative now names all three.

chokepoint-check's managed pass scanned src/ only. The native pass scans all of
src/native including its tests and tools; the asymmetry had no justification, and
a P/Invoke in a test project reaches the same Win32 calls.

TWO USER-FACING PROMISES THIS SESSION GOT WRONG.

legal/DISCLAIMER's accuracy block said "Three statements" -- and the 65-second
dormancy sentence was added directly beneath it by the previous PR,
unimplemented, without extending the count. It says FOUR now, and says of itself
that nothing verifies it.

"Only FrameLedger's own component is ever loaded" claims more than the check
performs. It is a DIRECTORY test with no filename, version or content component
-- deliberately, because a name check would be satisfied by any DLL that borrowed
the name -- and a published self-contained build puts several hundred files in
that directory. Section 1 now states all three limits instead of one.

STALENESS, i.e. the cross-references nobody sees from inside the PR that caused
them: P0 item 5 was still listed as open and as needing feature hooks it never
needed; spike-notes section 4's vendor-symbol table was still empty; 19_SAFETY
still said the pre-scan walks to depth 2; 17_HOOK_ENGINE still listed three
harness modes out of ten and D3D12 as "still to add"; CLAUDE.md contradicted
itself about the harness in two lines and contradicted 12_BUILD in one of them;
20_OPEN_QUESTIONS cited ProcessIsOurOwn as S18's closure evidence 630 lines above
the entry recording its deletion; 12_BUILD and 13_CI_CD still said dotnet test
includes the struct-mirror check, which R10 had already named as the problem.

NEW S23 records the residue -- six things the audit found that this PR does NOT
fix, so the next session finds them by reading. The sharpest: FL_BUILD_ID has a
writer and no reader, because the managed side has no build id at all, so the
refuse-to-attach-on-mismatch gate still cannot run; rules-publish's removal check
is not a required status check, so a red verdict does not block the merge button;
and legal/ is bound to the code by nothing, which is why it went stale within
hours of being audited by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
poli0981andClaude Opus 5 authored and GitHub committed 2026-08-05 01:48:21 +07:00
1 parent 3427cba6bb
commit cea744e95d
12 files changed
+152 -22

No files matched your search

+19
View File
@@ -92,6 +92,25 @@ jobs:
}
}
}
# THE HEURISTIC BLOCK IS NOT ONE OF THE FIVE GROUPS, and leaving it
# out was a hole the same size as the one this job was just repaired
# to close. `nameFragments` can be cut from five entries to one with
# every gate in the repository green — the schema only enforces
# minItems: 1 — and because tools/gen-ac-floor.ps1 generates
# kFloorFragments from this very array, the §S21 compiled-in floor
# shrinks with it. The floor exists so data can ADD and cannot
# remove; a removal channel that bypasses it defeats the whole
# mechanism.
#
# trustedSigners is included for the opposite polarity: it is the one
# ALLOW-widening list, deliberately excluded from the floor, and a
# silent ADDITION there suppresses refusals. §S19(d) already records
# that rules-publish cannot see such an addition. It can now.
if ($null -ne $ac.PSObject.Properties['heuristic']) {
foreach ($v in @($ac.heuristic.nameFragments)) { $out += "heuristic/nameFragments/$v" }
foreach ($v in @($ac.heuristic.trustedSigners)) { $out += "heuristic/trustedSigners/$v" }
}
return $out
}
$removed = @(Get-Tokens $old | Where-Object { $_ -notin (Get-Tokens $new) })
+2 -2
View File
@@ -66,7 +66,7 @@ tests/
tools/ # rules-validate, license-check, resx-audit (PowerShell)
# native tooling lives under src/native/tools:
# fl-layout-dump -> struct offsets for the C# mirror test
# hook-harness -> dummy D3D11/12/Vulkan/OpenGL app (P0)
# hook-harness -> dummy D3D11 + D3D12 app (Vulkan/OpenGL unwritten)
rules/detection-rules.json # engine/platform/capability + anticheat blocklist
docs/ legal/ legal/licenses/
```
@@ -81,7 +81,7 @@ Dependency direction unchanged: `App/Agent → Application → Domain`; `Infrast
**Struct mirroring —** `FlFrameRecord` exists twice (C++ header, C# `[StructLayout(LayoutKind.Sequential)]`). A test asserts `sizeof` and every field offset on both sides; a version constant in the shm header must match or the Agent refuses to attach.
**Dev mode —** `FL_MOCK=1` is **specified but not implemented** — `grep -rn FL_MOCK src tests tools build.ps1` returns nothing (recorded 2026-08-04). When it exists it runs the whole app with a synthetic frame source and no injection at all, and it is how the UI is meant to be developed; until then, do not plan work on the assumption that it is there. `tools/hook-harness` is a dummy **D3D11** app used to exercise hooks without a real game — D3D12 and Vulkan modes are also unwritten (`docs/12_BUILD.md` §Targets is the accurate list).
**Dev mode —** `FL_MOCK=1` is **specified but not implemented** — `grep -rn FL_MOCK src tests tools build.ps1` returns nothing (recorded 2026-08-04). When it exists it runs the whole app with a synthetic frame source and no injection at all, and it is how the UI is meant to be developed; until then, do not plan work on the assumption that it is there. `tools/hook-harness` is a dummy **D3D11 + D3D12** app used to exercise hooks without a real game; Vulkan and OpenGL modes are unwritten (`docs/12_BUILD.md` §Targets is the accurate list).
## Definition of done (per PR)
+14 -2
View File
@@ -146,16 +146,28 @@ function Import-MsvcEnvironment {
}
# --- 1-3. Native ------------------------------------------------------------
# Everything the native build gates. On any early return below, these do not run
# — and this script's own contract is that a gate which does not run SAYS SO.
# Returning after Skip-Gate'ing only "native build" left the Catch2 suite and
# clang-format silently absent while the summary reported one skipped gate where
# three had not run. That is the exact shape build.ps1 exists to prevent, in
# build.ps1.
function Skip-NativeDependents([string]$Why) {
Skip-Gate 'Native tests' $Why
Skip-Gate 'clang-format' $Why
}
function Invoke-Native([bool]$FixFormat = $false) {
Write-Step 'Native build (C++ /W4 /WX)'
if ($SkipNative) { Skip-Gate 'native build' '-SkipNative'; return }
if ($SkipNative) { Skip-Gate 'native build' '-SkipNative'; Skip-NativeDependents '-SkipNative'; return }
if (-not (Get-Command cmake -ErrorAction SilentlyContinue)) {
Skip-Gate 'native build' 'cmake not on PATH'; return
Skip-Gate 'native build' 'cmake not on PATH'; Skip-NativeDependents 'cmake not on PATH'; return
}
if (-not (Import-MsvcEnvironment)) {
# Do not fall back to another compiler: the Overlay's whole point is
# the MSVC build profile (/MT, /GS, /guard:cf, /Qspectre).
Skip-Gate 'native build' 'MSVC not found — install the "Desktop development with C++" workload'
Skip-NativeDependents 'the native build did not run'
return
}
Write-Host "MSVC: $((Get-Command cl).Source)" -ForegroundColor DarkGray
+1 -1
View File
@@ -135,7 +135,7 @@ document the app displays for acceptance (FR-11) is a defect, not a template.
3. `clang-format --dry-run -Werror` over `src/native`
4. `dotnet restore` + build (warnings as errors)
5. `dotnet format --verify-no-changes`
6. `dotnet test` (incl. the struct-mirror check)
6. `dotnet test` — **not** including the struct-mirror check, which does not exist; `build.ps1` declares and skips it loudly (§R10)
7. `tools/rules-validate.ps1` (schema + `anticheat` block sanity — a malformed or empty blocklist is a safety bug)
8. `tools/license-check.ps1` — asserts every vendored third-party has a licence copy in `legal/licenses/`, and that no Intel IGCL / AMD ADLX material has appeared in the tree
9. `tools/resx-audit`
+1 -1
View File
@@ -8,7 +8,7 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
### `ci.yml` — push to `main` + all PRs · **repo-local**
- `runs-on: windows-latest`, .NET SDK pinned by `global.json` via `actions/setup-dotnet`, MSVC via `ilammy/msvc-dev-cmd`, CMake + Vulkan SDK cached.
- Single step of substance: **`./build.ps1 check`** — the same script a developer runs before pushing, so local and CI cannot disagree. It covers the native build (`/W4 /WX`), Catch2 tests, `clang-format --dry-run -Werror`, managed restore/build with warnings as errors, `dotnet format --verify-no-changes`, `dotnet test` including the struct-mirror check, `rules-validate`, `license-check`, and `resx-audit`.
- Single step of substance: **`./build.ps1 check`** — the same script a developer runs before pushing, so local and CI cannot disagree. It covers the native build (`/W4 /WX`), Catch2 tests, `clang-format --dry-run -Werror`, managed restore/build with warnings as errors, `dotnet format --verify-no-changes`, `dotnet test` (which does **not** include the struct-mirror check — that gate does not exist and `build.ps1` skips it loudly, §R10), `rules-validate`, `license-check`, and `resx-audit`.
- Uploads coverage + resx-audit artifacts.
- **Licence guard:** `tools/license-check` fails the build if a vendored dependency is missing its licence copy, or if Intel IGCL / AMD ADLX headers appear anywhere in the tree (`docs/18_GPU_VENDOR_APIS.md` §Vendor SDKs we deliberately do not use). Licensing regressions are silent and hard to unwind later — catch them at PR time.
- **Placeholder guard:** fails if any `{{` token survives in `README.md` or `legal/*.md`. Those are shipped, legally operative documents (FR-11 displays them in the first-run Legal Gate); an unsubstituted `{{DEVELOPER_NAME}}` in an EULA is not a cosmetic defect.
+2 -2
View File
@@ -17,7 +17,7 @@ Findings written to `docs/spike-notes.md`. Nothing in P1 starts until the exit c
> safety work that had to precede the first injection — the guard, its matrix,
> the chokepoint, the layer's gates — is in, and the first real injection has
> happened. Everything still open needs either **feature hooks that do not exist
> yet** (4, 5, 6, 7 — a throwaway build, per the exit criteria, not all of P1),
> yet** (4, 6, 7 — a throwaway build, per the exit criteria, not all of P1),
> absent hardware (8, and the AMD/Intel half of the capability matrix), or is P1
> by construction (the layer's presentation hooks). Item 0's residual is check 3.
>
@@ -117,7 +117,7 @@ Findings written to `docs/spike-notes.md`. Nothing in P1 starts until the exit c
> defensible claim is **"the baseline cannot answer four of these five
> questions at all"**. `spike-notes.md` §8 carries the reasoning.
4. **The accuracy question — the reason this rewrite exists.** On the dev machine (RTX 5080), verify against ≥ 3 real offline titles that hooks recover: NGX/Streamline feature identity, render vs output resolution, quality preset, and DLSS-G activity. Compare against what the item-3 baseline reports. **Quantify the improvement** — this number justifies the whole trade-off and belongs in the README.
5. **Vendor SDK reality check.** Resolve actual exported symbol names for NGX, Streamline, FFX (`ffx_api` vs legacy FSR2/3), XeSS on the dev machine. The names in `17_HOOK_ENGINE` are conventions, not verified facts — correct the doc.
5. **Vendor SDK reality check. ✅ DONE.** Measured across 34 distinct modules in 162 files from installed titles; `tools/vendor-exports.ps1` regenerates and `docs/vendor-exports.json` is committed. `17_HOOK_ENGINE` §Upscaling is corrected and its caveat discharged. **It needed no feature hooks** — it reads files with `dumpbin` — so the status header above was wrong to group it with 4/6/7. The finding: `sl.common.dll` exports the NGX parameter **accessors**, while the NGX core exports only the **factories**, so NGX-direct titles need a different hook class (`17_HOOK_ENGINE` §The NGX parameter surface splits into two hook classes).
6. **RT detection.** Harness + a real DXR title: `DispatchRays` counting *and* `BuildRaytracingAccelerationStructure`; verify the AS-build path catches an inline-RayQuery title that dispatch counting misses.
7. **Frame Generation ground truth.** Compare rung 1 (FG feature evaluations per present) against Tier-2 ETW `FrameType` on a DLSS-G title. ~~rung 2 (`GetFrameStatistics` present delta)~~ was removed as structurally impossible, not merely unreliable (`03_METRICS` §Frame Generation). Driver-level FG (AFMF) is undetectable at Tier 1 in v1; whether PresentMon 2.x `FrameType` sees it at Tier 2 is `20_OPEN_QUESTIONS` §M1 — and is untestable on this dev machine, which has no AMD GPU.
8. **Telemetry layering.** Fill the `18_GPU_VENDOR_APIS` capability matrix on real hardware:
+4 -2
View File
@@ -398,6 +398,8 @@ verification a dev-machine-only affair before:
- **WARP** (`D3D_DRIVER_TYPE_WARP`) — a software rasteriser, so no adapter is required.
- **`CreateSwapChainForComposition`** — no `HWND`, so no dependency on a window station or an interactive session.
Current modes: `--probe-vtable` (§H4, ctest `fl_vtable_indices`), `--probe-proxy` (§H5, ctest `fl_proxy_swapchain`), `--present N`.
Current modes: `--probe-vtable` (§H4, ctest `fl_vtable_indices`), `--probe-proxy` (§H5, ctest `fl_proxy_swapchain`), `--probe-unhook` (§H7, ctest `fl_unhook_preserves_foreign`), `--probe-cost` (NFR-1, measurement only), **`--probe-frames`** (ctest `fl_frame_identity` — what counts as a frame, against `GetLastPresentCount`), **`--probe-d3d12`** (ctest `fl_d3d12_acquisition` — device → command queue → swapchain), `--present N`, `--hold N`, **`--real`** and **`--plus-ui K``**.
Still to add as the hook layer grows: D3D12 and Vulkan devices, RT PSO creation and ray dispatch, stub upscaler exports with the real vendor names, a PSO-compile spike generator, and a fault-injecting hook body for the self-disable path (`14_TESTING` §Integration tests).
> **Every present here used to carry `DXGI_PRESENT_TEST`, which submits nothing.** Measured: 500 of them leave `GetLastPresentCount` at 0 while 37 real presents move it by 37. "N presents → N records" was therefore satisfiable only by a writer counting non-frames. `--real` issues real presents; the test-present path is kept as a named mode because it is what an alt-tabbed title actually runs.
Still to add as the hook layer grows: Vulkan devices, RT PSO creation and ray dispatch, stub upscaler exports with the real vendor names, a PSO-compile spike generator, and a fault-injecting hook body for the self-disable path (`14_TESTING` §Integration tests).
+4 -1
View File
@@ -233,7 +233,10 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
> **Implemented, and stated narrowly.** `fl_prescan.cpp` walks the target's
> own directory (derived from its pid, never from a caller-supplied path) to
> depth 2, matching entry names through the **same** `MatchName` as every
> **depth 3** — raised from 2 on 2026-08-04 (§S22, `spike-notes.md` §13), because a
> title shipping its own kernel driver two levels below the install root was
> invisible from where the scan starts, so the blocklist row naming it could not
> fire — matching entry names through the **same** `MatchName` as every
> other check: directory names against the `directories` group, file names
> against `files`. `Reason::kAntiCheatDirectory` and `kAntiCheatFile` are
> produced here — until now they were declared, named and mirrored while
+59 -1
View File
@@ -607,7 +607,7 @@ is no suspended target and no `ERROR_PARTIAL_COPY`. "Launch mode is blocked by
#### ✅ Closed 2026-08-04 — implemented, and all three blockers answered
1. **The test vehicle exists, and it is not the one this entry asked for.**
`fl_guard_test` calls `SystemSources().ProcessIsOurOwn` directly, both
~~`fl_guard_test` calls `SystemSources().ProcessIsOurOwn` directly~~ — **that seam was deleted by §S22(b)**; the live test is now "§S22(b) — the real ModuleIsOurOwn answers both directions" and calls `SystemSources().ModuleIsOurOwn`, both
directions: this process (which runs the guard code from its own directory)
is ours; a freshly spawned `System32\cmd.exe` is not. That tests the
*predicate* against a real machine, which is what the exception rests on —
@@ -1281,6 +1281,64 @@ failure ignored.
> seam failure that is ignored breaks the suite". The precise form ignores only
> the failure code and leaves the call in place; it is red too.
### S23 · What the 2026-08-05 handoff audit found and did NOT fix
Eight PRs merged in one session; the audit ran afterwards, as
[adversarial review] prescribes, and found 53 items. The staleness was fixed in
the same PR that records this. What follows is the residue — real gaps, recorded
so the next session finds them by reading rather than by tripping over them.
**1. `FL_BUILD_ID` has a writer and no reader.** §S22-era work gave
`FlShmHandshake::buildId` a producer, which it had never had. But the contract is
a *comparison* — `07_IPC` "the Agent compares … against its own",
`04_CAPTURE` "validate layout version + build id against our own" — and the
managed side has no build id and no way to obtain one: `FL_BUILD_ID` is a CMake
INTERFACE compile definition visible only to native targets, and `grep -rni
buildid` over `src/**/*.cs`, `*.csproj` and `*.props` returns **zero**. So the
refuse-to-attach-on-mismatch gate still cannot run. Half a mechanism reads as a
whole one in the CHANGELOG, and that is corrected here rather than there.
**2. `rules-publish`'s removal check is not a required status check.** `main`'s
required contexts are exactly `check`, `analyze (csharp, none)` and
`analyze (cpp, manual)`. The `validate` job is path-filtered and runs on
`pull_request` only, so a red removal check **does not block the merge button** —
the gate that exists to make the anti-cheat blocklist un-removable is advisory.
Fixing it is a branch-protection change, i.e. the owner's, not a code change.
**3. `08_UI` describes a refusal notice that is wrong in the commonest case.** It
promises "the specific signal named in plain language". Measured (`spike-notes`
§13): while any Easy Anti-Cheat title is running, **every** target — including a
freshly spawned, unrelated process — refuses with `BlockedService` naming
`EasyAntiCheat_EOS`, because checks 2 and 2b are machine-wide. The user is shown
the name of a game they are not playing. The requirement created by that
measurement was written only into the spike log; it needs to reach `08_UI` and
the `Safety_*` resx keys before any UI exists.
**4. The runtime re-scan loop is described as two checks and implements four.**
`19_SAFETY` §During a session reasons explicitly about the loop's composition and
names the module and driver scans. `GuardSupervisor.ScanOnceAsync` →
`FlGuardEvaluate` → `EvaluateImpl` runs drivers, **services** and the **static
pre-scan** as well. That omits the only tier ever measured firing on real
anti-cheat (services) and the only one touching the filesystem (check 4) — whose
cost this session raised by deepening the walk. The paragraph that decides what
the loop costs is missing the expensive half.
**5. A fourth statement of the gate's composition lives in the shipped data.**
`rules/detection-rules.json`'s own `$comment` describes checks "1, 2 and 4",
omitting 2b and omitting `services` from the signals that catch the seed — in the
one copy that ships to users. Three doc-side variants were reconciled this
session; this one was not, and `rules-validate`'s doc/data cross-check reads the
blocklist table, not the comment.
**6. `legal/` is audited by nothing.** Every other document is bound to the code
by something — `rules-validate` cross-checks the blocklist against `19_SAFETY`,
`static_assert`s bind `fl_shm.h` to `07_IPC`, `versioninfo-check` and
`chokepoint-check` bind claims to binaries. `legal/` has one hand-written
accuracy block, in one of four files, with a hardcoded count. It went stale
within hours: a fourth unimplemented promise was added directly beneath a header
saying "Three". The block now says so about itself, which is a note and not a
gate.
### S14 ◐ · Pre-injection check 3 is **unwired**, and has no "cannot determine" state
Found 2026-08-02 while hardening the rules toolchain. `19_SAFETY` §Pre-injection
+25 -5
View File
@@ -622,12 +622,32 @@ verified facts. A wrong name degrades silently to `unknown`, which reads as
"working, no upscaler detected" — the highest false-confidence risk in the spike.
Record the SDK version each name came from.
| SDK | Version shipped by the title | Symbols found |
### ✅ Answered 2026-08-05 — `docs/vendor-exports.json`
Measured across **34 distinct modules in 162 files** from installed titles by
`tools/vendor-exports.ps1` (dumpbin over files on disk; nothing is loaded). The
map is committed rather than transcribed here, because a table copied by hand is
a second source that drifts from the first.
**The finding this item existed to produce** — the NGX parameter surface splits
into two hook classes, and only one half is an exported function:
| Module | Parameter **accessors** | Parameter-object **factories** |
|---|---|---|
| NGX | | |
| Streamline | | |
| FidelityFX (`ffx_api` vs legacy) | | |
| XeSS | | |
| `sl.common.dll` (Streamline) | **yes**, all 16 | yes |
| `nvngx.dll` / driver-store `_nvngx.dll` | **no** | yes (D3D11/12/VK/CUDA) |
| `nvngx_dlss.dll`, `_dlssg`, `_dlssd` | no | no |
Streamline-shimmed titles (9 of those installed here) expose
`NVSDK_NGX_Parameter_SetI/SetUI` as ordinary exports. NGX-direct titles do not:
the accessors are function pointers inside the object the factories return, so
there is no symbol to hook. `17_HOOK_ENGINE` §The NGX parameter surface carries
the decision and its CLAUDE.md rule-4 justification.
**Not gated.** Nothing cross-checks `17_HOOK_ENGINE`'s symbol table against the
JSON, so they can drift — that gate belongs with the PR that adds the feature
hooks, where a failing row would mean something. The map is also one machine on
one driver version, and the JSON says so in its own `$comment`.
## 5 · Proxy swapchains *(§H5)*
+14 -3
View File
@@ -4,13 +4,16 @@
> ⚠ Draft for review. Not legal advice. Review before first public release — this version covers code injection and should be read carefully.
> ⚠ **Accuracy audit, 2026-08-04. Three statements below describe behaviour the software does not yet have**, and they are flagged here rather than quietly reworded because a document the user accepts must not over-promise:
> ⚠ **Accuracy audit — last checked 2026-08-05. FOUR statements below describe behaviour the software does not yet have**, and they are flagged here rather than quietly reworded because a document the user accepts must not over-promise:
>
> - §2's *"and every 30 seconds afterwards … it stops at the next scan"* — the pre-injection guard is real and refuses; the **in-session re-scan and stop are not implemented**. `GuardSupervisor` has no production caller and nothing writes the shared-memory field the capture side would read.
> - §2's *"waits **65 seconds** before concluding that contact is lost"* — **added 2026-08-05 and also unimplemented.** The deadline is a constant (`FL_GUARD_TICK_DEADLINE_MS`) with no reader: `FrameLedger.Overlay` is two files, exports one function, maps no shared memory and reads no control block.
> - §3's *"automatically stops injecting into a game that crashes shortly after injection twice"* — the only trace of this anywhere is a `hook_crash_count` column in a schema for which no `.sql` file exists. There is no design for it.
> - §1's claim that FrameLedger loads `FrameLedger.Overlay.dll` **is now true as written** (§S22): the injection path refuses any library outside FrameLedger's own directory. It was not true before that change, which is why it is listed here.
> - §1's *"Only FrameLedger's own component is ever loaded"* — **narrower than it sounds, and the qualification is now in §1 itself.** The check is a directory test: the payload must resolve into FrameLedger's own install directory. It does not compare a filename, a version or any content, deliberately — a name check would be defeated by any DLL that borrowed the name. A published self-contained build puts several hundred files in that directory.
>
> **None of this may ship as-is.** Either the behaviour exists at first release or these sentences change. Tracked in `docs/20_OPEN_QUESTIONS.md`.
>
> **This block is maintained by hand and nothing verifies it.** Every other document here is bound to the code by something — `rules-validate` cross-checks the blocklist, `static_assert`s bind `fl_shm.h` to `07_IPC`, `versioninfo-check` and `chokepoint-check` bind claims to binaries. `legal/` is bound by nothing, and this block went stale within hours of being written: the 65-second sentence was added directly beneath a header that said "Three". **Whoever edits any promise in this file must re-count.**
## 1. How FrameLedger measures (read this first)
@@ -18,7 +21,15 @@ To measure what a game is *actually* doing — its real render resolution, which
None of this information is obtainable from outside the process, which is why the software works this way.
**Only FrameLedger's own component is ever loaded.** The injection path refuses any library that does not come from FrameLedger's own installation directory, and there is no setting that changes this. Be aware of the limit of that promise: it establishes where the file came from, not what is in it, and FrameLedger is distributed unsigned — so anyone able to write to your FrameLedger installation could alter what gets loaded. Install it somewhere only you can write to, and verify the published SHA-256 checksums.
**FrameLedger only loads a library from its own installation directory.** The injection path refuses anything else, and there is no setting that changes this.
Be precise about what that does and does not promise, because the shorter version — *"only FrameLedger's own component is ever loaded"* — claims more than the check performs:
- It establishes **where the file came from**, not what is in it. There is no filename, version or content comparison, and that is deliberate: a check on the name `FrameLedger.Overlay.dll` would be satisfied by any library that borrowed the name.
- A FrameLedger installation contains **several hundred files**, because the application ships self-contained with the .NET runtime beside it. Any library in that directory satisfies the check.
- FrameLedger is distributed **unsigned**, so nothing attests to that directory's contents. Anyone able to write there could alter what gets loaded — and could equally replace the component that performs this check.
Install it somewhere only you can write to, and verify the published SHA-256 checksums.
**What it observes:** arguments the game passes to graphics APIs we intercept (presentation, upscaling, ray tracing, pipeline creation) and video-memory usage reported by the graphics runtime.
+7 -2
View File
@@ -120,8 +120,13 @@ foreach ($src in $sources) {
# left the build green. CLAUDE.md's "the native layer is reachable only through
# Infrastructure" is about ORGANISATION; this is about the primitives themselves,
# and managed code has no chokepoint to be exempt in.
$managedRoot = Join-Path $Root 'src'
$managedSources = @(Get-ChildItem $managedRoot -Recurse -File -Include '*.cs' |
# src AND tests. The native pass scans all of src/native — including its tests
# and tools, both confirmed to go red — so scoping the managed pass to src/ alone
# was an asymmetry with no justification: a P/Invoke in a test project reaches
# exactly the same Win32 calls, and test code is where "just for a moment" edits
# live.
$managedRoots = @((Join-Path $Root 'src'), (Join-Path $Root 'tests')) | Where-Object { Test-Path $_ }
$managedSources = @(Get-ChildItem $managedRoots -Recurse -File -Include '*.cs' |
Where-Object { $_.FullName -notmatch '\\(obj|bin)\\' })
if ($managedSources.Count -eq 0) {