Commit Graph
2 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5.5 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>
2026-10-03 22:16:00 +07:00
poli0981andClaude Opus 5 32bdbd9052 feat(detection): the static-hint evaluator and its fixture corpus (#15)
The inference half of 15_ROADMAP item 3. RuleEvaluator in Domain over a
GameFileSnapshot the probe collects in one pass; ports and StaticGameDetector
in Application; the rules reader and the bounded probe in Infrastructure.

EVERY SIGNAL IS THREE-VALUED. Unknown is what a signal returns when the probe
could not establish that class of fact -- a PE that would not read, a strings
pass that did not finish, a bound that stopped the walk. A group is Unknown
unless the signals it DID read already decide it, and an engine rule that
evaluates Unknown STOPS the ordered walk rather than falling through: a later
rule reported as the first match is a wrong answer wearing the shape of an
ordered one. This is the guard's "could not look is not clean" rule applied to
inference, where the stakes are a mislabelled library card rather than an
account.

pe_file_version reads the sibling its `from` names, not the executable. Unity's
rule reads UnityPlayer.dll; answering from the game exe would have reported a
version that is WRONG rather than merely missing, which is the worse failure.

The purity claim is dropped rather than quietly kept. The evaluator does no
I/O, but the snapshot is rules-dependent -- the strings pass must know its
needles before it reads -- so it is not a pure function of a directory.
05_DETECTION says so rather than leaving the tidier description standing.

TWO DOCUMENTS CLAIMED CI EVALUATED RULES AGAINST FIXTURE TREES. It never did,
and the trees did not exist: 05_DETECTION said "tools/rules-validate checks
schema and runs rules against fixture trees in CI" and 13_CI_CD said the same.
A gate described in normative documentation and implemented nowhere.

Now: rules-validate.ps1 does fixture COVERAGE -- every rule id has a fixture,
every fixture has a rule -- and says so. The evaluation is
RuleFixtureCorpusTests, which drives the real evaluator through the real probe
against tests/fixtures/rules under build.ps1 check. Evaluation deliberately
does NOT go in the validator: re-implementing glob, PE and strings matching in
PowerShell would be a second evaluator, the same defect shape as a second
blocklist matcher, drifting the moment either gained a signal type.

The corpus carries two canaries, which are what stop the rest being
decorative. no_engine catches an evaluator that matches everything -- every
positive fixture would still pass. every_engine_marker carries four engines'
markers at once and asserts exactly one is reported, catching one that returns
a set or the last match. Plus a corpus-not-empty fact, because a Theory
yielding zero cases is a green suite that tested nothing. Zero-byte markers
only, .gitattributes -text, and the README states which signal types the corpus
does NOT cover rather than letting green imply coverage.

The evaluator's unit tests live in Domain.Tests, not with the corpus:
coverage-gate.ps1 takes the best rate per assembly and never merges reports, so
Domain code exercised only from Infrastructure.Tests could not reach its floor
however thorough the corpus got.

FR-1.3 provenance decided, no migration written. games.field_provenance (JSON,
absent reads as "user") with the rule that DETECTION NEVER OVERWRITES A
USER-SUPPLIED FIELD -- stated in no document before, and without it the re-run
every rules update triggers silently clobbers every correction the user has
made, a data-loss bug that surfaces weeks later on somebody else's machine.
The type and the rule are implemented and tested; persistence is P2, because
06_DATA_MODEL forbids editing an applied migration and guessing a shape before
its consumers exist is how a wrong guess becomes permanent.

05_DETECTION's signal-type list also gained path_contains and strings_regex,
both already in the shipped data and the schema.

Gates proven red then green: the over-match canary (evaluator matches
everything -> only no_engine fails), the ordering fixture and the under-match
canary (engine array reversed -> exactly those two fail), and the validator's
fixture coverage (an engine with no fixture directory).

94 managed tests. Domain 88.9% over 414 lines, Application 100% over 122.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 11:10:24 +07:00