8 Commits

Author SHA1 Message Date
Yuhan Lei eafcc77001 fix: align log inventory and examples 2026-07-24 00:57:31 +08:00
Yuhan Lei 36b1eb7ee0 fix: close typed evidence candidate matching 2026-07-24 00:56:30 +08:00
Yuhan Lei 2e88ef6a52 fix: centralize fence-aware document structure 2026-07-24 00:51:59 +08:00
Yuhan Lei 9340c1f581 fix: close the candidate set and hold examples to it
Tokenizer rewritten in closed form (strict thousands grouping, dotted
tokens as a whole) and frozen: quotes, ISO dates, and specific number
forms are the documented candidate set; new prose forms extend the
docstring, not the regexes. Quote pairing no longer skips short pairs
into phantom quotes. Raw links parse only from the fenced-stripped
header. Skip-files applies only to root-level index/log. Body
blockquotes join the quote channel. Fence openers are indent-limited.

Examples now honor their own invariant: two fabricated quotes restored
to the raw wording, the market-data date moved into the raw body, and
the index example rewritten as a real global-index excerpt. A smoke
test assembles the examples and demands zero suspects, so the samples
stay under their own contract. Archive pages get a defined index date
(their Archived field) for lint cross-checks.
2026-07-24 00:10:13 +08:00
Yuhan Lei e3b7c68fee fix: close verification escapes and false-suspect sources
- Sentence-final punctuation in the raw no longer blocks matching;
  the boundary only rejects continuations that form a different value.
  This was a regression from the boundary fix itself and would have
  flooded reports with verbatim facts.
- Raw links must resolve inside raw/; anything else is an evidence
  error, since the invariant's permanence rests on raw immutability.
- No-material suppression is anchored to ingest entry headings, so
  prose mentions elsewhere in the log cannot hide backlog.
- Metadata semantics are scoped to the header block after the H1:
  an Archived line in the body no longer grants exemption, and
  metadata-shaped lines in a raw file's body stay evidence.
- Status blocks are skipped wholesale, including their explanation
  lines, which legitimately cite newer sources outside the article's
  own Raw links.
- Fence stripping handles tilde and 3+-backtick fences via a state
  machine; candidate tokens are whitespace-normalized before dedup;
  index/log args are skipped even when passed explicitly; articles
  are checked once, not twice.
2026-07-23 23:15:06 +08:00
Yuhan Lei 19b342b981 fix: align skill contract with the checker
- No-material log entries record the full raw path and the script
  matches on it, so same-named files elsewhere are no longer wrongly
  exempted from the backlog report.
- The invariant drops incremental lint state: the script re-checks the
  whole wiki in seconds, which also removes the touched-set
  reconstruction problem and the vanishing-unresolved-suspect hole.
- Status block checks move to Judgment Reports; nothing consumes them
  mechanically yet, so a mechanical sweep would guard a hypothetical.
- Research is gated to explicit research/ingest requests, resolving
  the routing contradiction with read-only Query.
- Mechanical Reports invoke the script via python3 (works without an
  exec bit) and name the argument <project-root>.
2026-07-23 22:46:09 +08:00
Yuhan Lei 3556cf45fa fix: make the evidence checker actually check
- Boundary matching: '42K' no longer passes against '142K' in the raw,
  closing the substring false-pass on the exact transcription-error
  class the checker exists for.
- Coverage: decimals and 4+ digit numbers (incl. bare years) are now
  candidates; small plain integers stay out of scope by design and the
  boundary is documented in the docstring.
- Fenced code is stripped before extraction (line-by-line processing
  made the multiline regex useless), and Status/Archived metadata
  lines no longer produce marker-date false suspects.
- Raw files are matched without their collection-metadata header, so a
  Collected date cannot false-pass an article's claim about that year.
- Evidence errors are reported instead of silently passing: ordinary
  articles without a Raw field, and Raw links that do not resolve.
- Article path arguments resolve against the project root, and missing
  files are warnings, not tracebacks.
2026-07-23 22:44:11 +08:00
Yuhan Lei 959bbb3858 feat: add grounding invariant with mechanical evidence checker
Every load-bearing fact (number, date, direct quote) must exist
verbatim in the raw files an article links. Compile establishes the
invariant (locate before write, exact literals, derived values show
components); lint verifies it with scripts/check_evidence.py, which
greps candidate literals against linked raws and reports misses plus
unreferenced raw files. Lint is now three tiers: safe auto-fixes,
mechanical reports (the script), judgment reports. Also moves adding
See Also cross-references out of auto-fix, where judgment never
belonged.
2026-07-23 22:08:36 +08:00