Repository navigation
fix: never ship a source field as an OKF key kbforge does not emit - #56
Merged
Merged
Conversation
OKF v0.2 defines `verified`, `stale_after` and `usage_window`, and kbforge emits none of them (docs/design/2026-08-08-okf-02-deferred-decisions.md). `_facets` dropped only OKF_OWNED, so a source field with one of these names became the only writer: a SQL `date` column named `stale_after` shipped `stale_after: '2026-09-23'`, a date-only value v0.2 §5 now rules out, and a `verified` column would set the §5.3 trust tier. OKF_RESERVED names the three. The emitter drops them like owned keys, and the strict validator rejects a rendered concept that carries one, so a regressed `_facets` or a synthesizer writing its own frontmatter is caught too. kbforge-sql rejects them in `facets` at config time, as it does the owned keys. `status` stays a facet: it is a common source column, and §5.4 gives an unknown value nothing to act on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OKF v0.2 defines
verified,stale_afterandusage_window, and kbforge emits none of them (seedocs/design/2026-08-08-okf-02-deferred-decisions.md)._facetsonly droppedOKF_OWNED, so a source field with one of those names was written straight into the frontmatter:datecolumn namedstale_aftershippedstale_after: '2026-09-23'. Since the 2026-08-21 tightening of v0.2 §5, every OKF timestamp needs an explicit UTC offset, so that value is non-conformant.verifiedcolumn would set a consumer's §5.3 trust tier with nothing behind it.Change
synthesize.OKF_RESERVEDlists the three keys._facetsdrops them the same way it drops the owned keys.okf-strictcheck rejects a rendered concept that carries any of them. That also catches a regressed_facetsor a synthesizer that writes its own frontmatter.facets: [stale_after](and the other two) at config time, as it already does for the owned keys, so the column can't silently disappear.statusis left alone on purpose. It's a common source column (kbforge-sql's own example usesstatus: active), and §5.4 gives an unknown value nothing to act on.Verification
git checkout --. Disabling the emitter drop fails the synthesize tests. Disabling the gate fails the strict tests, which assert on the failure message. Reverting the sql check fails its config test. With only the emitter broken, the gate still rejects the output (rendered concept carries 'stale_after' …).Release note:
kbforge_sql.confignow importsOKF_RESERVED. When this ships, kbforge-sql'skbforge>=0.8.0floor must move up to the kbforge release that carries it, and the two need separate tags. CHANGELOG has entries for both under Unreleased.🤖 Generated with Claude Code