minor tweaks
All checks were successful
CI / lint (push) Successful in 16s
CI / fuzz (push) Successful in 2m3s
CI / test (push) Successful in 25s

This commit is contained in:
Kamal Tufekcic 2026-08-03 03:59:53 +03:00
commit 22ab973f0c
13 changed files with 223 additions and 144 deletions

View file

@ -546,7 +546,7 @@ Releases live on the **[releases page](https://git.lo.sh/kamal/source2rosetta/re
- `--target <dir>` — the build **directory** to derive from; `produce` requires a directory and its libraries are searched by name. (Other subcommands accept a bare `.so` as well, which is how `classify-change --prev` is used.)
- `--game-dir <install>` — must be the **`game/` subtree** of the install, the same directory layout the dedicated server is launched from.
- `--seed <bundle>` — one file bundling every derive input. The loose equivalent is `--catalogue <file>` plus the optional `--promotable` / `--candidates` / `--full-names` / `--extra-offsets` / `--extra-sigs`, all defaulting to empty — **so a brand-new game needs only a catalogue to start deriving.**
- `--seed <bundle>` — one file bundling every derive input. The loose equivalent is `--catalogue <file>` plus the optional `--promotable` / `--candidates` / `--full-names` / `--extra-offsets` / `--extra-sigs`, all defaulting to empty — **so a brand-new game needs only a catalogue to start deriving.** The two forms are mutually exclusive and the CLI says so: `--seed` supplies all six, so passing one alongside it is a usage error rather than an input silently dropped.
- Corpus signal — exactly one of `--corpus-model <model.json>` (the normal path: forward-derive from the model + target binary, rolling the model N→N+1 as a sidecar) or `--corpus <dir>` (fingerprint raw build binaries on the fly).
Model-based derives are **forward-only**: the model describes history up to its newest build, so pointing one at an *older* target is not supported.
@ -669,16 +669,19 @@ configuration rather than code.
A **`FunctionRecord`** opens with its `tier` (`core` / `high_confidence` / `experimental`) and the locator
flattened to the top level. A virtual method ships as a bare integer `offset` (its RTTI vtable slot index); a
non-virtual function as a `signature` object with the `library` it scans and a space-hex `linux` pattern with
`?` wildcards. By deriver convention an entry carries one or the other.
`?` wildcards. Usually one or the other — but **a record may carry both**, and a handful of `core` CS2 records
do, so a consumer (and the live oracle) has to judge every locator a record holds rather than the first it
finds.
Two further locator keys appear where they were established:
- **`class`** — for an `offset` entry, the class whose vtable the slot was measured on. A slot index alone
locates nothing, since it only means anything relative to a particular vtable. Taken from the class the
derivation actually chained the offset through, never parsed out of the entry name: a base-declared method
routinely sits in a derived class's vtable, so those are different facts and only the measured one locates.
locates nothing, since it only means anything relative to a particular vtable. It is the record's own name
class, stated explicitly: the deriver keys its slot timelines and alignment hops by that class and chains
through it, so "the class chained through" and "the class in the name" are one fact. Directly folded
offsets (the multilib ground-truth path) omit it and leave the consumer to split the name.
- **`anchors`** — distinctive string literals the function references, each unique to it within its library.
Not a third locator competing with the sig-XOR-offset pair, but a supplement with a *different failure
Not a locator competing with the signature and the offset, but a supplement with a *different failure
mode*: a byte signature is a snapshot of one build's codegen, while a string survives a recompile that
moves instructions. Emitted alongside the signature, never instead of it.