Repository navigation
Release 0.9.0: approve facts whose evidence speaks for itself - #12
Merged
Merged
Conversation
workspace.auto_approve lists rules that approve a new fact at filing: a source-fact naming its source and link, or an action-record carrying the reviewer's own words given with --said. A belief cannot be listed, and revise, invalidate and retire always wait. A rule's approval records decided_by and is bound to the content digest; kg-workspace reject still stops any approved item before it drains.
- A fact filed with --supersedes-rejection always waits for a person, whatever rule its evidence matches. - The drain claims each approved item under the workspace lock just before its first write, and skips an item rejected or changed since it read the queue. - kg-workspace reject refuses an item a drain has claimed or that has a landed fact; retire those instead. - A rejection records decided_by: reviewer and drops the approval digest. - Document that a said rule trusts the caller to pass the reviewer's words.
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.
A configured rule can now approve the facts whose evidence speaks for itself, while every inference and every correction still waits for a person.
Added
workspace.auto_approve(empty by default) lists rules that approve a new fact at filing:{fact_type: source-fact, require: source-link}approves a fact that names its--sourceand--link.{fact_type: action-record, require: said}approves a fact that carries the reviewer's own words.beliefcannot be listed (the configuration is refused), andrevise,invalidateandretirealways wait, whatever their evidence.--supersedes-rejectionalways waits for a person.saidrule trusts the caller to pass the reviewer's own words.decided_by: policy:<type>:<require>and is bound to the content digest like a reviewer's approval.kg propose/kg bundle --said "...": the reviewer's own words when the fact is their statement. They are part of the approved digest, pass the secret gate, travel into the episode provenance and name a bundle's source.decided_byfor each planned item: the rule, orreviewer.Changed
kg-workspace rejectalso rejects an approved item, whoever approved it, until a drain claims it. It used to refuse anything but a pending item.decided_by: reviewerand drops the approval digest.Verification
uv run ruff check .: pass.uv run pytest: 215 passed (20 new; the 4 added after review fail on the first push). Two earlier dry-run tests now also expectdecided_by: reviewer.release_audit.py --allow-remote --identity-base origin/main: pass.docker build+scripts/mcp_smoke.py): pass.source-factand a--saidaction-recordare approved at filing and labelled in the dry run.beliefwith--saidstays pending.kg-workspace rejectstops an approved item.beliefis refused.--said.Reviewing
mainatfca90b3. Version 0.9.0 inpyproject.toml,server.jsonanduv.lock.config.py(FACT_TYPES,AutoApproveRule.approves) first, thenworkspace.py(file_facts,_approve,_approving_rule, the reject condition,_claim,_planned), thencli.pyandgates.py.drainchanges only by the claim before each item's first write (_claim). Untouched: ingestion, retirement, the MCP server, retrieval.