feat/input-reader
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c4318b69d5 |
feat(telemetry): the reader behind Advanced metrics - one for the Agent, on its own thread, only while held; LibreHardwareMonitor's card, processor, memory and board groups; measured before anything composes it (Advanced PR-3, D103/D107) (#389)
Nothing calls it yet: no Agent code composes the reader, so nothing a user sees or records changes. - Application.Advanced: the port IAdvancedHardware (Acquire, Latest, ReadSessionFacts), AdvancedSnapshot, AdvancedSources and the status of each source - Reading, NotPresent, NotElevated, PawnIoMissing, Faulted. A source that is not there is a state, never an exception and never a value in its place. - Infrastructure: AdvancedHardwareHub - one reader for the whole Agent on a thread of its own (fl-advanced), started by the first holder and closed a linger after the last lets go (D107), so a PC idling with FrameLedger in the tray reads nothing for this. AdvancedHardwareReader - one tick of NVAPI and of LibreHardwareMonitor. LhmAdvancedReader over a Computer of its own: every sensor of the graphics card, and as administrator with PawnIO the processor, memory and motherboard groups (D103). LhmGroups has a member for those four and no other. - Storage is not opened (D103's outcome, written before any run): LibreHardwareMonitor 0.9.6's StorageGroup lists every drive through DiskInfoToolkit with no filter by bus and follows drives plugged in later. lhm.storage.* is Deferred in the catalog; a drive's temperature will read N/A with that reason. - A device that throws twice is left alone and the others go on; NVAPI answering with no field twice running, after it had answered, is released and initialised again once (20_OPEN_QUESTIONS M12). - FrameLedger.CaptureHost probe-advanced (unshipped): runs that reader on the caller's own rights and prints what it read and what it cost. On the dev box (RTX 5080, unelevated): 35 facts, 58 readings a tick; one NVAPI live read 0.4 ms of processor time; one refresh of the sensor library's graphics-card group 14 ms (62 ms elapsed) - 1.4% of one core at one a second, above NFR-2. So NVAPI is read every tick and the sensor library every fifth (0.28%), with no value repeated between. - The same refresh is what the L2 telemetry layer does once a second in every session. That cost is not this train's: recorded as 20_OPEN_QUESTIONS M16, with the owner's choices. - PrivilegeFootprintTests: opening every group this project can name enables no powerful privilege (the real thing on the elevated CI runner). - docs: 18_GPU_VENDOR_APIS (the reader, D103 as found, L2's line), 20_OPEN_QUESTIONS (M13 half answered, M16 new), HANDOFF, CLAUDE.md, CHANGELOG. Hook overhead: not applicable - nothing in code loaded into a game changes. Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> |
||
|
|
1342979353 |
ci: Qodana - JetBrains' code analysis from a workflow of its own, and what its first run reported settled (D93) (#373)
* ci: Qodana - a workflow of its own from JetBrains' template, Qodana Community for .NET over FrameLedger.slnx (D93) The first run: the linter in its Linux container, EnableWindowsTargeting passed to it, no quality gate yet - what it builds and what it reports decides the rest. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * ci: Qodana's gate is zero problems, and the inspections this project argues with are off in .editorconfig, each with its reason (D93) Pushed before the fixes on purpose: the run this starts has the settings and none of the fixes, so it shows the gate failing on what is left. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * fix: what Qodana's first run reported, settled - about 400 fixes in 181 files, none changing behaviour; the documents (D93) Redundant qualifiers, casts, using directives, nullable suppressions and unsafe modifiers removed from the report's own positions; var for built-in types and one-line block bodies brought to .editorconfig's style by dotnet format; every XAML item template names its DataType and a binding that reached its page through DataContext.ViewModel names the page's type; two unread fields, two overwritten initialisers and an unused parameter removed; SpokenTextAutomationPeer no longer assumes the base peer's name is a string. docs/13_CI_CD.md §Qodana, CLAUDE.md, the wiki's workflow table, HANDOFF's decisions index (D93) and the changelog entry. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> |
||
|
|
ff949afc6f |
feat(legal): NOTICE with the GPLv3 section 7 additional terms, the licence header in every source file, and the documents for people who build, contribute or redistribute (D45, beta.12 PR-1) (#253)
- NOTICE: copyright, GPL-3.0-only, and three additional terms of the kinds section 7 permits - (b) preserve the notices and the attribution in the program's legal notices, (c) mark a modified version as different and do not call it "FrameLedger" alone, (e) no trademark rights in the name. Shipped as licenses\NOTICE.txt; release.yml refuses a published tree without it. - Section 7 wants additional terms named in the source files: every first-party .cs .cpp .h .inl .ps1 .xaml file (1,053; src/native/third_party excluded) opens with the SPDX line and a pointer to NOTICE. tools/notice-check.ps1 is the gate (six self-test cases, both directions; -Fix writes a missing header) and tools/resx-gen.ps1 generates the string accessors with the header. - The native VERSIONINFO LegalCopyright said GPL-3.0-or-later; it now names the real licence. - CONTRIBUTING.md, FORKING.md, CODE_OF_CONDUCT.md (Contributor Covenant 2.1 by reference), legal/TRADEMARKS.md. - 12_BUILD gate list, CLAUDE.md layout and conventions. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
dad3adbff6 |
feat(agent): the Agent host -- --serve (watcher -> orchestrator -> recorder), --console verbs, the consent grant (D4) and the kill switch as the gate's fourth input (D7) (P2 PR-F) (#150)
FrameLedger.Agent is a Generic Host now. Composition.AgentServices registers every Application port to its one shipped Infrastructure adapter; WatcherHostedService runs PartialRecovery first and then Application.Watch.CaptureOrchestrator: one process snapshot per second (ToolhelpProcessSnapshotSource), ProcessWatcher (exact normalised path, or the file name when exactly one games row carries it -> StalePath, keyed on the real path), ProcessTree (a child that started before its parent is a reused pid), DescendantElection (the newest tracked descendant; a launcher's consent does not extend to what it spawns), ONE session per game at a time through the new ISessionRecorder port. The orchestrator decides nothing about hooking: the recorder's loop reaches HookedCaptureGate as a console verb does. --console carries consent list|grant|revoke, capture, launch (with the election after LaunchTargetExited / LaunchNoPresentationRuntime), recover, sessions, db path, games add, killswitch on|off|status, and --data-dir under --console only (decision D6). --diag, --install-task, --uninstall-task, --register-vklayer, --unregister-vklayer answer "not implemented in P2", exit 2. The surface is pinned by AgentCommandLineSurfaceTests. D4: Agent --console consent grant shows OperatorDisclosure (moved to Application.Consent; one text, an OperatorSurface for the first line and the stamp), refuses redirected stdin, and records the new ConsentProvenance.AgentConsoleOperator with the Agent's clock. OperatorAcknowledgement carries its provenance; SqliteGameConsentStore writes that name and refuses NotRecorded. D7: FR-2.4 is HookRequest.FromConsent's fourth input -- AntiCheatRefusalReason.KillSwitchEngaged (27, added to the native reason table so GuardMirrorTests holds), checked before consent is read. IKillSwitch (Infrastructure.Settings.SettingsKillSwitch over settings.hooking.kill_switch) is read by CaptureSession before the request and at every guard-scan boundary, where an engaged switch publishes unhookRequested and ends the session as KillSwitchEngaged (RefusedKillSwitch when refused up front). ProcessLauncher(enableVulkanLayer: false) keeps the Vulkan layer off by never setting FRAMELEDGER_ENABLE_VK_LAYER. A bounded --console capture --seconds N lowers the discard threshold to N. Tests: AgentEndToEndTests (Integration, in the gate) runs the shipped FrameLedger.Agent.exe against hook-harness with a scratch ledger and reads back ONE hooked sessions row -- the milestone's technical half -- plus the kill-switch refusal with no ring in the target, consent grant refusing redirected stdin, the unbuilt flags' exit 2. ProcessWatcherTests, ProcessTreeAndElectionTests, CaptureOrchestratorTests, ToolhelpProcessSnapshotSourceTests, SettingsKillSwitchTests, the gate's kill-switch case, the loop's mid-session case, the store's provenance round-trip; GameConsentRecordTests pins three provenance names. Docs: 04_CAPTURE (watcher built, election, threading row), 12_BUILD (the surface), 07_IPC (pipe is P3), 19_SAFETY (D4/D7 built), 20_OPEN_QUESTIONS (S27 restated for PR-F, S24 answers, G Agent lifecycle), 01_ARCHITECTURE, 06_DATA_MODEL (third provenance, settings key), 15_ROADMAP (milestone's technical half), CLAUDE.md, HANDOFF (D4/D7 built, two traps), CHANGELOG. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
97fc9d9707 |
refactor(capture): promote the capture path into Application and Infrastructure -- CaptureSession over ports, the CaptureHost a thin shell (P2 PR-C) (#147)
A pure move. CaptureLoop -- every hooked session's driver since 2026-08-06 -- is now Application.Capture.CaptureSession, over ports instead of delegates so the Agent's composition root can supply the adapters: IRingAttacher, ITargetLivenessSource, ITargetResolver, IProcessLauncher, IRuntimeModuleSnapshot, INgxDriverProbe, IExecutableMarkerScan. ICaptureSink, CaptureOptions, CaptureOutcome (was CaptureResult), SessionEndReason, SessionEndClassifier, FocusTally, RuntimeModuleSet/Info, CensusNames, SlTagCensusNames, ExecutableMarkers/Marker, NgxDriverState/NgxOverrideFlags/ NgxProbeOutcome move beside it. Infrastructure.Capture holds the OS adapters: ShmRingAttacher + ShmCaptureSink over ShmRingReader (no interface, no second consumer), HeldProcessLivenessSource + ProcessTargetLiveness (§S29(e)), TargetResolver (path only, never a pid; its one report line through a callback, not the host's console) + ChromiumGpuProcess, ProcessLauncher (an instance over the Vulkan layer's environment; the duplicated enable-variable constant is gone), RuntimeModuleSnapshot, ExecutableMarkerScan. DrainResult moves to Shared so Application can read it. Report text stays with the report (NgxDriverStateText, ExecutableMarkersText); NgxDriverProbe stays in the host until PR-E2 puts it in-process. The loop's tests move with it -- CaptureSessionTests / CaptureSessionLaunchTests in Application.Tests, driven through the real SQLite consent adapter (a test project on Domain's InternalsVisibleTo would be a second mint) -- and the report fixtures are byte-identical. Two new pins: HookRequestSoleProducerTests (no public constructor, no setter, exactly one factory) and NoSecondRingReaderTests (nothing but ShmRingReader opens the ring). 04_CAPTURE §Frame source abstraction now describes what exists (IFrameSource never did) and gains §Threading model; §S27 restated a second time (the loop ships; the entry point is PR-F's); CLAUDE.md §Solution layout. Hook-path overhead: none (managed only). Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
f61d35f7f6 |
feat(injector): launch mode as "inject late" -- the guard waits for a presentation runtime, then runs in full (P1 item 2, §S1 / §S13(c)) (#139)
A CREATE_SUSPENDED target has loaded nothing and EnumProcessModulesEx fails against it (§S1, measured), so launch mode cannot be create -> guard -> inject -> resume. Built shape: start -> the guard WAITS -> the full guard -> inject. Guard: GuardedInjectWhenReady(pid, dll, timeoutMs) / ABI FlGuardedInjectWhenReady polls the target every 50 ms through the module seam -- matching no blocklist; a failing enumeration is "not yet", never a pass -- until dxgi+d3d11/d3d12, opengl32 or vulkan-1 is mapped, then runs GuardedInjectImpl unchanged. Two new reasons end the poll with nothing injected: LaunchTargetExited (24) and LaunchNoPresentationRuntime (25). ctest fl_guard [launch], five cases: injects on the first enumeration showing the runtime and not one before; exit-first and budget-out each answer their own reason; anti-cheat mapped beside the runtime is the full scan's refusal; the real seam against hook-harness injects in 15 ms. Overlay: FlWriterState.dxgiPresentsBeforeHook @60 -- GetLastPresentCount at the first hooked present on the first hooked chain, i.e. presents that ran before the hook was in; 0xFFFFFFFF until a present is seen, set BEFORE the present hooks go in (the first placement, after them, lost the race to an 8 ms presenter -- caught by the fixture). Took the last reserved word; no layout bump; the writer state now has no slack. CaptureHost: `launch --exe <path> [--args "..."] [--seconds n]`; ProcessLauncher (handle held from birth, FRAMELEDGER_ENABLE_VK_LAYER=1; the host never terminates what it launched); CaptureLoop.RunLaunchedAsync sharing the gate, attach and drain with attach mode; HookRequest.WaitForPresentationRuntimeMs routes the same gate through IAntiCheatGuard.GuardedInjectWhenReadyAsync (the port's fourth method, primitives only); the report prints the wait and the before-hook count (LaunchNote). NoSecondMatcherTests 3 -> 4 as a reviewed act. Docs: 04_CAPTURE §Launch mode (the shape, why not CREATE_SUSPENDED, what it measures), 01_ARCHITECTURE, 19_SAFETY item 1, 20_OPEN_QUESTIONS §S1 ◐ / §S13(c) ✅ / §S24, 17_HOOK_ENGINE, 15_ROADMAP, HANDOFF, spike-notes, CHANGELOG. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
f32b1e8b83 |
feat(telemetry): the first source, and §M5 answered — GPU sensors work unelevated, without PawnIO, on NVIDIA (#101)
FrameLedger.Application.Telemetry gains the port 18_GPU_VENDOR_APIS specified (IGpuTelemetrySource, GpuSample, GpuCapabilities, TelemetryLayer) and FrameLedger.Infrastructure.Telemetry gains LhmTelemetrySource (L2): GPU group only, its own poller thread, 1 Hz and never under 500 ms, throws-or-hangs-twice disables the layer for the session, capabilities value-derived and monotonic so a sensor that never reports is never a capability. ILhmComputer is the seam that lets every fault-policy branch run on CI, which has no GPU. The instrument is `FrameLedger.CaptureHost probe-lhm [--seconds n]`: raw tree, then mapped sample, then a verdict against the decision table pre-committed in 20_OPEN_QUESTIONS §M5 BEFORE the run. Row R1, twice. RTX 5080 / 616.56 / LHM 0.9.6: eight fields unelevated (core and memory temp, load, VRAM used, core and memory clock, package power, fan), the identical eight in the elevated UAC control, PawnIO installed and never opened. The three user-facing telemetry sentences stand; README names the fields on NVIDIA; OperatorDisclosure.Version stays /2. Hotspot temperature is absent on this box and recorded as N/A. One defect the raw tree caught before the verdict: D3D Shared Memory Used (system RAM) was mapped to adapter VRAM by a fragment rule — fixed, pinned by SharedMemoryIsNotVram. HANDOFF's §M5 START HERE is struck; the live head recorded there is the FPS-display rule + runtime census decided by the owner on 2026-09-03. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
c26a1b0db1 |
feat(consent): the texts now say what DECLINING costs, and the rule against nudging is normative (#98)
README's safety row, legal/DISCLAIMER.md, legal/EULA.md and 19_SAFETY's
User-facing consent section all called a no-injection mode "the default". That
mode does not exist. The operator disclosure said it too, and added a second
sentence that is worse:
"Nothing here is required to measure frame times."
It told someone about to type I ACCEPT THE INJECTION RISK that the risk was
optional. With the ladder at two rungs, hooking is the ONLY frame-time path.
Nothing in this tree was more wrong in a place that mattered more.
THE HARD PART IS NOT THE CORRECTION, IT IS NOT TURNING IT INTO PRESSURE.
Removing the fallback makes declining genuinely more costly, and naming a
concrete cost next to a request to accept is textbook framing. So 19_SAFETY gains
a NORMATIVE rule rather than a note, because a note will not survive translation
review: both options are enumerated at the same grain; neither is recommended;
"limited", "reduced" and "degraded" are not acceptable descriptions of Tier 2; no
sentence describes what the user LOSES by declining; and Tier 2 is never
described as temporary or pending a better mechanism, because a user deciding
today decides against what exists today.
The fourth required statement changes from "Tier-2 capture is available and is
the default for anything the guard is unsure about" -- which bundled a claim that
was false in the sense a reader takes from a frame-time tool, with a claim that
was conditional on an elevation state they could not evaluate -- to what actually
happens if they decline: the session is still recorded, with duration and
whatever telemetry the machine provides, and every frame-derived value reads N/A.
AND THE DISCLOSURE IS REORDERED, which is a smaller change that does more than it
looks. The Tier-2 sentence used to be the last thing before the prompt, so
whatever it said read as the set-up for accepting. Anti-cheat risk and terms of
service sit there now.
OperatorDisclosure.Version bumps /1 -> /2. Not a formality: /1 carried two
sentences that were FALSE rather than differently phrased, and two texts sharing
one version defeat the only property the field has. Traced while doing it, and
worth writing down because it is not what the type's own comment implies:
NOTHING RE-PROMPTS ON A VERSION MISMATCH. The field is written by Program, merged
forward by the store, cleared on revoke, and read by exactly one non-test
caller -- the `consent list` status line. HookRequest.FromConsent never sees it,
so a record stamped /1 still yields consent today. Whether that is acceptable is
an owner decision; the realistic population is one developer's build tree, which
git clean removes. The limit is now in the type instead of being assumed.
TWO CHECKLISTS WERE BOXES THAT COULD NOT FAIL -- 19_SAFETY's review checklist and
the pull-request template both asked "Is there a Tier-2 degradation path if the
hook is unavailable?" Under a two-rung ladder the answer is always yes. Replaced
with something falsifiable: does the session record N/A rather than a fabricated
value, AND record why.
AND THE TEST GUARDING THE DISCLOSURE COULD NOT FAIL FOR THE THING THAT CHANGED.
CommandLineSurfaceTests asserted Contain("Tier-2") while its comment claimed to
guard 19_SAFETY's four statements -- so any rewrite keeping that literal token
passes while the claim behind it changes completely. It now pins the substance:
that N/A is stated, that "Tier 3" is absent, and that neither removed sentence
came back. CANARIED rather than asserted: putting one of the two false sentences
back turns it red, and I checked that before trusting it, because I changed the
text and the test in the same pass and would otherwise never have seen it fail.
Not touched: HookedCaptureGate, HookRequest, GameConsentRecord,
FileGameConsentStore. Rule 1 is unchanged -- injection stays opt-in per game.
This changes what the user is TOLD, not what the code enforces.
./build.ps1 check with no switches: PASSED, 24/24 native tests, one skipped gate
(resx-audit, which does not exist). No .resx exists yet, so the en/vi/ja review
this wording will need is spec-only today -- but this IS the wording that becomes
the Safety_* strings, and 09_I18N reviews it as legal text.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
59ab7ac914 |
feat(overlay): the DLSS quality preset, and the vendor enum whose zero means something else (#74)
* feat(overlay): render resolution gets a producer, from the tags a title sets globally
FL_MEASURED_UPSCALER_PARAMS had no producer, and render -> output resolution is
one of the five values P0 exit criterion 1 names. A second inventory row detours
sl.interposer.dll!slSetTag, reads the kBufferTypeScalingInputColor extent, and
publishes renderW/H.
slSetTag WAS SCHEDULED FOR DEFERRAL AND IS INCLUDED INSTEAD, on measured
grounds. sl_core_api.h documents the local tags in slEvaluateFeature's `inputs`
as merely ALLOWED -- "they do NOT interact with same tags sent in the global
scope using slSetTag API" -- and only FOUR of the ten Streamline titles installed
on this machine route DLSS super-resolution through Streamline at all. An
inputs-only producer could have shipped with a hit rate of zero and nobody would
have known until a real-title run.
THE INSTALLER HAD TO BE RESTRUCTURED FIRST, AND IT WAS A LATENT MIS-BIND. The
expansion over FL_HOOK_INVENTORY ignored the `family` column entirely, stopped at
the FIRST row that resolved, hooked it with Hook_SlEvaluateFeature and OR'd a
hardcoded FL_HOOK_UPSCALER_IDENTITY. Correct while the table had one row, and
silently wrong the moment it did not: slSetTag would have been detoured by a body
that reads argument 1 as a feature id -- the same class as #71's SL1 break,
reached from the other direction. Each row now carries its own detour, family bit
and latch, and a row whose family has no detour installs NOTHING rather than
borrowing a neighbour's body. The install-after-stop guard is factored out for
the same reason: a second lazy installer that forgot it would have reopened the
window silently.
TWO CONDITIONS TO PUBLISH, AND THE SECOND IS THE ONE THAT IS EASY TO DROP: the
params hook live, AND an evaluation seen THIS FRAME. A tag is viewport state that
outlives any one frame, so publishing on the tag alone would report a render
resolution for every frame after a title stopped upscaling -- stale state dressed
as a measurement, which is the failure class layout v3 exists to prevent.
upscalerQuality is 0xFF and NEVER 0: 0 is NGX MaxPerf, a real preset, so it would
publish "DLSS Performance" as a measurement. upscalerSharpness is 0xFF
PERMANENTLY -- DLSSOptions::sharpness is deprecated as unsupported and
optimalSharpness is Streamline's recommendation, not what the title applied.
`claimedParams == 0` IS INVERTED, NOT DELETED. That was the honest assertion
while renderW/H had no source, and it is the line a reviewer should see change.
It now asserts the EXACT tagged extent, the honesty invariant on every claiming
record, and the reverse direction -- a value set while its bit is clear.
TWO FIXTURE BUGS THE TEST FOUND RATHER THAN REASONING. Tagging ONCE at startup
landed before injection and left the bit set on 0 of 43 records -- and
eValidUntilPresent means the tag expires AT present, so a real title re-tags every
frame and tagging once was simply wrong about the vendor contract, not a shortcut.
Then a floor of `> size - 3` hid a real 6-record window where identity was live
and params was not; the drain now waits for BOTH families and asserts equality,
which eliminates the window instead of tolerating it.
Proved red by canary: hardcoding a plausible 1920x1080 trips `wrongExtent` on all
40 records, and it compiles.
No #pragma for C4996 on the deprecated slSetTag, and that is measured rather than
assumed: /std:c++20 WITHOUT /Zc:__cplusplus makes MSVC report 199711L, so the
attribute's `#if __cplusplus >= 201402L` guard never opens. A pragma would
suppress a warning that is not emitted, and its comment would assert a compile
behaviour that does not occur. The condition that would change it is recorded at
the declaration.
Hook-path cost: one bounded walk of at most 64 tags per slSetTag call, and one
relaxed atomic load per present. Nothing allocates, nothing locks.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* feat(overlay): the local tags slSetTag never sees, and the malformed input that must not fault
sl_core_api.h:258 is explicit that buffer tags passed to slEvaluateFeature are
"local" and "do NOT interact with same tags sent in the global scope using
slSetTag API". They are alternative integration styles, not layers: a
locally-tagging title yields nothing from the slSetTag hook, and a globally-
tagging one yields nothing from here. Both are now read. The local one wins when
present, because it is scoped to the evaluation rather than to the viewport and
therefore cannot be older than the frame being measured.
IN A HEADER, PRECISELY SO IT CAN BE TESTED WITHOUT A GAME. Every branch in this
walk dereferences pointers somebody else's process supplied, under bounds we
chose. A fault lands in FL_HOOK_GUARD and burns one of the three that
self-disable the Overlay -- so malformed input that faults is a BUG, not
acceptable degradation. A static function in dllmain's anonymous namespace could
only be reached by injecting it; here hook-harness calls it directly.
ctest fl_sl_inputs drives twelve shapes in microseconds: a null array, a zero
count, a null element mid-array, a wrong buffer type, a wrong struct GUID, a
structVersion below kStructVersion1, a whole-resource extent, a tag reached
through `next`, a SELF-REFERENTIAL next, a TWO-NODE CYCLE, and a numInputs of
0xFFFFFFFF. Both cycle shapes matter: a self-reference check alone misses the
second.
THE CYCLE HANDLING IS THE DEPTH CAP, and that is a decision rather than a
shortcut. A visited-set would allocate, which a hook path may not. And a cycle is
worse than a fault: no exception, no self-disable, just a frozen present thread
with our DLL in it.
WHAT THE CAP DOES NOT BUY, WRITTEN DOWN RATHER THAN IMPLIED. It turns
numInputs = 4 billion into 32 reads instead of a guaranteed access violation. It
does NOT protect against a count of 5 with a 2-element array -- nothing in the
ABI carries the allocation's length, so the count is the only statement of it and
a wrong one in that direction is unprotectable from here. Same for a structure
whose GUID matches and whose allocation is shorter than the declaration. Both are
the vendor's contract to keep. "Bounded" reads as safer than it is, so the
residual is named.
A whole-resource tag yields the honest unknown rather than a 0x0 resolution:
sl_core_types.h documents extent as "the area of the tagged resource to use (if
using the entire resource leave as null)" and it is a value member defaulting to
all-zero, which is exactly the in-band unknown fl_shm.h already defines for
renderW/H.
Stacked on the slSetTag producer: this reads the same packed word and the same
publish rule, so the two land in order rather than rewriting each other's block.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* feat(overlay): the DLSS quality preset, and the vendor enum whose zero means something else
The last piece of HANDOFF item 2b that could be built. The bounded inputs walk
now also matches sl::DLSSOptions and reads `mode`, so upscalerQuality carries a
real preset for titles that chain their options rather than setting them out of
band through slDLSSSetOptions.
VENDORED THE WAY THE PROCESS REQUIRES, NOT APPROXIMATELY. sl_dlss.h from upstream
NVIDIA-RTX/Streamline@main: 8,489 bytes, CRLF preserved, git hash-object
|
||
|
|
44f3dc1120 |
feat(capture): the consent gate gets a real source, and guardTicks a driver that is not a test (#60)
docs/HANDOFF.md queue item 1, all six parts. HookedCaptureGate's three inputs
(hook_enabled, hook_consent_at, hook_blocked_reason) come from IGameConsentStore
instead of a `games` table that existed in 06_DATA_MODEL and in no .cs file, and
FlControlBlock.guardTicks is advanced by a NON-TEST binary for the first time --
the sending half of the 30 s re-scan 19_SAFETY calls the most important runtime
behaviour in the capture layer. Both ends of that field existed and were tested
since #46/#50; only the loop was missing, and a missing loop reads as a missing
subsystem.
FrameLedger.CaptureHost is a separate project nothing publishes, and
tools/package-closure-check.ps1 is what keeps that true rather than remembered.
§S27 was closed on the grounds that no shipped binary carries an injecting entry
point; the host IS one, so its absence from the package is the load-bearing
clause. The gate walks the transitive ProjectReference closure of the two publish
roots and names the edge -- proven by planting a reference from the Agent, which
leaves the build green and turns the gate red.
WHAT THE PRE-BUILD PANEL CHANGED, because it changed what got built:
- `new HookRequest { HookEnabled = true, ConsentedAt = UtcNow }` still compiled
and reached GuardedInjectAsync -- verbatim the synthesis §S27 named and
rejected. A store, a record and a provenance flag only add an honest path
BESIDE the dishonest one. HookRequest is now get-only behind a private
constructor with one factory, so the expression is a compile error.
- GameConsentRecord.Stored is internal: Domain is inside both publish closures,
so a public minting factory would be a blessed SHIPPED API for producing
consent nobody gave, and the closure gate cannot see it.
- An acknowledgement takes a DTO carrying neither BlockedReason nor
PreScanUnverified, so `consent grant` structurally cannot clear a block --
the "I understand, continue anyway" button rule 2 forbids, arrived at by
omission.
- frameIndex is process-global, so an interval rule keyed on "+1" would exclude
every interval in a multi-swapchain title and report no duration at all.
WHAT THE ADVERSARIAL REVIEW OF THE DIFF CAUGHT, 17 of 23 candidates surviving a
refuter told to default to refuted. The worst was MEASURED, not argued:
Process.GetProcessById holds NO handle and HasExited opens one and closes it
again, so the pid was never pinned -- §S29(e) had been closed on a mechanism that
did not exist, asserted in three source comments, the ledger and the changelog.
HeldProcessHandle now opens SYNCHRONIZE | PROCESS_QUERY_LIMITED_INFORMATION and
keeps it; a pid that cannot be pinned is a refusal. Also: "could not read the
executable" passed the fingerprint check by comparing the record with itself;
Enum.TryParse accepts numeric strings, so "provenance": "1" walked round the
two-member enum; an unreadable consent file silently cleared a persisted block
and dropped every other game's record; a guard exception discarded the whole
session's drained frames; StreamSegmenter cut a spurious 0x0 segment; and three
of the new tests could not fail for the property they named.
CLOSED: §S29(c) by deleting ShouldUnhookAsync (zero production callers, strictly
weaker than ScanOnceAsync, and inverted in polarity), §S29(e) host-side with no
ABI change. §S29(f)'s premise corrected in place -- layout v3 put rtTier and
hooksInstalledMask in FlWriterState, neither has a producer, so RT `Yes` is
unreachable as well as `No`.
Also: ShmRingReader.SetPaused had no test at all and now has both halves;
ShmHandshakeValidator never compared handshake.Pid, so a ring left by a finished
session validated Ok; the drop branch runs against the real Overlay for the first
time, which needed --present-interval-ms on hook-harness (uncapped, the harness
does 171,636 presents in 3 s, so the ring laps in under a second instead of 68).
Docs corrected in the same PR: 04_CAPTURE's "consent lives in SQLite" was the only
line in the tree saying where consent lives; 12_BUILD and 13_CI_CD both said the
struct-mirror gate does not exist while build.ps1 throws on it; 12_BUILD's gate
list omitted four gates and claimed Directory.Build.props sets RuntimeIdentifier;
13_CI_CD documented a release.yml that does not exist; 03_METRICS still listed
dlss_rr, named the retired rtPsoAlive bit, and had no rung 0 on the FG ladder.
./build.ps1 check with no switches: PASSED, 78 s, 1 pre-existing skip.
Native 16/16. Managed 252, up from 160 -- Domain 60, Application 39,
Infrastructure 82, CaptureHost 71. Every new gate proven red-then-green with the
build's exit code read BEFORE the test's.
NOT MEASURED HERE, and stated rather than left to be inferred: the nine
Category=Integration cases do not run on CI (§S19(b)), and package-closure-check
reads ProjectReference only -- it does not follow <Import> or
Directory.Build.props, so a .targets staging a foreign binary is outside what it
sees. Both are written into the script, 12_BUILD and HANDOFF.
Six owner decisions are recorded in §S24. One was taken because it cannot be
retrofitted: a consent record carries a disclosure/wording version from the first
record written.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follow-up in the same branch: 15_ROADMAP's status header is dated forward with what
changed AND with what did not — items 4, 6 and 7 are exactly where they were, because
the writer still measures nothing but output resolution and its own present arguments.
A status line that only ever grows is how that file came to lag its own repository
twice.
|