fix(build,consume): stamp every segmented concept, exclude a linked log.md from concept navigation
Two producer-side defects from the S7 acid test (ordre 20260907T234741Z-9578626297-from-.claude), both reproduced on K2 before and after. F1: `okf build --ingested-at` alone stamped only 11/629 concepts -- the unsegmented ones, which read the call's value directly. The 618 segmented concepts read `segment.ingested_at`, the plan's `proposed_at`, independently defaulted to `DEFAULT_STAMP`. `proposed_at` now falls back to `ingested_at` when omitted; neither flag passed still yields `DEFAULT_STAMP` for both. F2: the consumption pre-pass's index walk counted a root-linked `log.md` (`corpus.link_log_in_root_index`, `95eb271`) as a concept, inflating a 629-concept K2 rebuild to 630 and letting the log rank and cut like real content. The link stays -- the contract is silent on `log.md` and `95eb271` already named it a LOCAL choice -- but the walk now treats `LOG_NAME` like the index itself: reachable, never a concept. K2 rebuilt twice from the same corpus and diffed against the delivered `K2-bundle-20260903`: FOR (stashed fix, matchingfbaac6d) reproduces po's numbers exactly -- 619/1108 files differ, 618 ingested_at-only, ref `sha256-tree:4ffd750c...`. ETTER (fix applied) leaves exactly 1 line differing (the deliberate log link, predating this fix) -- 0 files stamped 1970, 629/629 stamped 2026-09-03, ref `sha256-tree:f14872a0...`. The delivered bundle's ref is unchanged before and after (`sha256-tree:9a4e5561...a968b5`), since it carries no log link and the new branch never fires. Conservation identity holds both times: merged + coded rejections = 43 = N, 39/0/4. 1258 -> 1260 tests. mypy --strict clean on 28 files. ruff clean. Both goldens byte-unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
35b8c9e805
commit
5a0c8794af
5 changed files with 111 additions and 9 deletions
24
CHANGELOG.md
24
CHANGELOG.md
|
|
@ -286,6 +286,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
The verdict parse now raises `AdjudicationError`, so the message names what
|
||||
actually failed. Exit 2 either way; nothing is written either way.
|
||||
|
||||
- **`okf build --ingested-at` alone now stamps every concept, not just the
|
||||
unsegmented ones.** `--proposed-at` defaulted independently to
|
||||
`DEFAULT_STAMP`, so a caller who set only `--ingested-at` stamped the 11 of
|
||||
629 concepts that read the call's value directly, while the 618 segmented
|
||||
concepts -- which read `segment.ingested_at`, the plan's `proposed_at` --
|
||||
stayed on `1970-01-01T00:00:00Z`. Measured on K2 rebuilt at `fbaac6d`.
|
||||
`proposed_at` now defaults to `ingested_at` when omitted; a caller who wants
|
||||
the proposal and the replay dated differently still passes both explicitly.
|
||||
Neither flag passed still yields `DEFAULT_STAMP` for both, byte-identical to
|
||||
before.
|
||||
|
||||
- **The consumption pre-pass (`tools/okf_consume.py`) no longer counts a
|
||||
linked `log.md` as a concept.** `link_log_in_root_index` (`corpus.py`,
|
||||
`95eb271`) links a run's own log from the root index for bundle navigation;
|
||||
the index walk that enumerates concepts followed that link like any other
|
||||
and counted the log as one, inflating a 629-concept K2 rebuild to 630 and
|
||||
letting the log rank and get cut like real content. The link stays --
|
||||
`docs/consumption-contract.md` is silent on `log.md`, and `95eb271` already
|
||||
named the link a LOCAL choice rather than conformance -- but the walk now
|
||||
recognises `LOG_NAME` the same way it recognises the index itself: reachable
|
||||
for navigation, never a concept. A bundle whose index does not link its log
|
||||
(every bundle built before `95eb271`, including the delivered
|
||||
`K2-bundle-20260903`) computes the same `sha256-tree` ref before and after.
|
||||
|
||||
## [0.5.0a2] — 2026-07-31
|
||||
|
||||
**This is the pre-release the pilots pin. `v0.5.0a1` was tagged and abandoned
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue