Add Knowledge Loop agent#18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edf29e8dea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
edf29e8 to
e4e5572
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4e5572099
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e4e5572 to
e02684d
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e02684d717
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e02684d to
edf1078
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edf1078731
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
edf1078 to
3c70367
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c70367201
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3c70367 to
eb89f7c
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb89f7cb43
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
eb89f7c to
82a014f
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82a014fe08
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address the two open Codex findings on the Knowledge Loop agent:
- Idle cycles no longer publish timestamp-only refreshes. ingest/export/eval
restamp last_verified_at/run_id and rebuild knowledge.sqlite (datetime('now'))
every run, so an unchanged source snapshot left a dirty worktree and could open
a timestamp-only PR. The loop now reverts volatile-only managed diffs (ISO
timestamps, run ids, and the always-volatile SQLite artifact) before deciding
to publish, so a no-op cycle reports idle. Genuine knowledge changes are kept
and still publish with their fresh timestamps.
- Learning-event paths resolve against the repo checkout. A relative
--learning-event is now resolved against config.repo_path before both the budget
preflight count and the `ledger import` subprocess (cwd=repo), so the loop counts
and imports the same files when invoked from outside the checkout.
Add regression coverage for the idle-revert path, the semantic-change publish
path, and repo-relative learning-event resolution.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dcda960999
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
When the loop runs with --skip-validation (run_validation=False), the published PR body still claimed the validation suite ran, giving reviewers false assurance for exactly the PRs that bypassed the gates. The body now states that validation was skipped and must be run before merge when run_validation is False. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98d3247e98
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address two follow-up Codex findings on the Knowledge Loop agent: - Publish the schema directory. `schema` is a managed dirty prefix, so a schema-only change is seen as publishable, but `_publish_pr` only staged okf/exports/reports/evals/ledger. A schema-only change then produced an empty staged tree (returning changes_detected with no PR) and mixed changes silently dropped the schema update. The publish step now stages the same managed set it detects as dirty. - Scope volatile-diff detection to generated metadata fields. The blanket ISO timestamp normalization classified a corrected learning-event `event_time` (whose stable id does not include event_time) as churn, so under --replace-learning-events the loop reverted the file and reported idle, silently discarding the correction. Normalization is now keyed to generated metadata (last_verified_at, generated_at, extracted_at, claim_extracted_at, requested_at, created_at) plus run ids, leaving source fields like event_time intact. Add regression coverage for schema staging and for keeping a corrected event_time. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 725a31c94a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address two more Codex findings on the Knowledge Loop agent:
- Count failed cycles against the daily budget. The exception path charged only
phase-2 attempts and then reloaded the ledger, so `cycles` never incremented and
a systemd timer could rerun the same failing ingest/validation cycle all day
under the default max_cycles_per_day=1. Failed cycles now increment `cycles`.
- Treat a blank HYRULE_KNOWLEDGE_LOOP_STATE_DIR as unset. A present-but-blank (or
whitespace) value previously resolved the state dir to the repo root via
Path(""), writing the lock/ledger/PR-body into the checkout where the dirty
check could not ignore them. A new _env_str helper strips and falls back to the
default cache path.
Add regression coverage for the failed-cycle budget and the blank state-dir env.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
docs/plans/hyrule-knowledge loop --onceas a governed producer agent skeletonValidation
uv run ruff check src testsuv run mypy --strict srcuv run pytestuv run hyrule-knowledge validate okfuv run hyrule-knowledge quality --checkuv run hyrule-knowledge export --checkuv run hyrule-knowledge eval --checkuv run hyrule-knowledge ledger --checkuv run hyrule-knowledge ledger lifecycle --checkuv run hyrule-knowledge scan-secrets okf exports reports evals ledger schema