Skip to content

feat(kernel): implement reflection miner - #108

Merged
George-RD merged 1 commit into
mainfrom
change/implement-reflection-miner
Jul 24, 2026
Merged

feat(kernel): implement reflection miner#108
George-RD merged 1 commit into
mainfrom
change/implement-reflection-miner

Conversation

@George-RD

@George-RD George-RD commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • add pure bounded reflection-miner schemas for corrections, repeated approvals, stated preferences, and consolidation
  • compose scheduled miner and submitter grants through declarative authority artifacts, authenticated owner evidence, gateway/gate admission, and normal proposal lifecycle
  • add persona proposal support, fail-closed provenance, durable budgets, scheduling, and decision records D-130 through D-141

Verification

  • bash scripts/check.sh
  • two independent read-only reviews: APPROVE, no findings
  • OpenSpec implement-reflection-miner: complete and strict-valid

Summary by cubic

Implements a scheduled, fail-closed reflection miner that turns bounded owner evidence into review-only proposals, and adds persona artifact support to the normal proposal lifecycle. This builds the miner/submitter path end-to-end with declarative routes, agents, packs, and workflows.

  • New Features
    • Added pure ReflectionMiner schemas (corrections, repeated approvals, stated preferences, consolidation) with strict provenance and proposed-only outputs.
    • Kernel runtime: packed audit slice, durable per-grant budgets, gate checks, and a scheduled driver; new timer.reflection.fired event and reflection_miner_interval_seconds config (default 300s).
    • Declarative artifacts for scheduled mining and submission: reflection_miner_agent, reflection_submitter_agent, packs, routes, and workflows.
    • artifact.propose now accepts persona; loader, judge, and tests updated to support persona elements through the normal owner-review path.
    • Store support for miner audit slices and improved approval gate tracing; comprehensive tests and OpenSpec docs for D-130–D-141.

Written for commit 688f4fd. Summary will update on new commits.

Review in cubic

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@George-RD
George-RD merged commit c766e77 into main Jul 24, 2026
1 of 3 checks passed
@George-RD
George-RD deleted the change/implement-reflection-miner branch July 24, 2026 11:01
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3474dc34-8b54-4f9c-852f-61d568dfaa72

📥 Commits

Reviewing files that changed from the base of the PR and between 1e0032e and 688f4fd.

📒 Files selected for processing (71)
  • .raw/openspine-decision-log.md
  • artifacts/lyra/agents/reflection_miner_agent.yaml
  • artifacts/lyra/agents/reflection_submitter_agent.yaml
  • artifacts/lyra/packs/reflection_miner_pack.yaml
  • artifacts/lyra/packs/reflection_submitter_pack.yaml
  • artifacts/lyra/routes/reflection_scheduled_miner.yaml
  • artifacts/lyra/routes/reflection_scheduled_submitter.yaml
  • artifacts/lyra/workflows/reflection_miner_scheduled.yaml
  • artifacts/lyra/workflows/reflection_submitter_scheduled.yaml
  • crates/openspine-kernel/src/api/artifact_propose.rs
  • crates/openspine-kernel/src/api/artifact_propose_miner_tests.rs
  • crates/openspine-kernel/src/api/artifact_propose_tests.rs
  • crates/openspine-kernel/src/api/nominate_tests.rs
  • crates/openspine-kernel/src/artifact_loader.rs
  • crates/openspine-kernel/src/artifact_loader/tests.rs
  • crates/openspine-kernel/src/config.rs
  • crates/openspine-kernel/src/main.rs
  • crates/openspine-kernel/src/overlay_eval_gate/judge.rs
  • crates/openspine-kernel/src/pipeline/approval.rs
  • crates/openspine-kernel/src/reflection_miner_runtime.rs
  • crates/openspine-kernel/src/reflection_miner_runtime/scheduled.rs
  • crates/openspine-kernel/src/store/mod.rs
  • crates/openspine-kernel/src/store/reflection_miner_support.rs
  • crates/openspine-schemas/src/event.rs
  • crates/openspine-schemas/src/lib.rs
  • crates/openspine-schemas/src/reflection_miner.rs
  • crates/openspine-schemas/src/reflection_miner_errors.rs
  • crates/openspine-schemas/src/reflection_miner_payload.rs
  • crates/openspine-schemas/src/reflection_miner_tests.rs
  • crates/openspine-schemas/tests/fixtures.rs
  • graphify-out/.graphify_labels.json
  • graphify-out/2026-07-24/.graphify_labels.json
  • graphify-out/2026-07-24/GRAPH_REPORT.md
  • graphify-out/2026-07-24/graph.json
  • graphify-out/2026-07-24/manifest.json
  • graphify-out/GRAPH_REPORT.md
  • graphify-out/cache/ast/v0.9.10/055361f682049a8fe21b1c163255b5dde0ff76a90358d8047d2aaf79ea246707.json
  • graphify-out/cache/ast/v0.9.10/094bf880973f88ac66cff0298d2f6aaf7947efab4be5f6171ab81256242bbc4b.json
  • graphify-out/cache/ast/v0.9.10/1c554f93b9c9fd0853c0570d737a790678b2b3698b474153dc96ea95673777b6.json
  • graphify-out/cache/ast/v0.9.10/1cf2a2bc2551f90ffba6dd5304dcde7fe479821cbde1cf5c0e5070be14f873e4.json
  • graphify-out/cache/ast/v0.9.10/216ede7e6741881f3ec5d3ecd3359d64a10db1d983c0e0abb56d1c29d2584619.json
  • graphify-out/cache/ast/v0.9.10/296e5347300d868be2b5fc70fef3ad1de5cde257e2bcb7199d665076abbd286a.json
  • graphify-out/cache/ast/v0.9.10/2f46ca5329613beebb322750b7c7102dde09c68935ac1489a5ad6ced2eb915eb.json
  • graphify-out/cache/ast/v0.9.10/31c7adfe178af2f95586412ab95be50c90dd0470190c87df8897720fa984c516.json
  • graphify-out/cache/ast/v0.9.10/42344cc3dd06764ef838b8c7bb23e279096db637fc94a63264746ad6c8d48f2e.json
  • graphify-out/cache/ast/v0.9.10/445c966cc6169ac9e8d6e12d30a305d156111268c1ba031da26e8518a67e973b.json
  • graphify-out/cache/ast/v0.9.10/49d62d47f0e96cc41c29fe31890f27fa1b31b60831798a9cee502a418ecae874.json
  • graphify-out/cache/ast/v0.9.10/4e9128607c0239e977922b0cd91f7b0339656add9a4262606e3c4eba73ca794a.json
  • graphify-out/cache/ast/v0.9.10/6c1d75ae8552d5177e9f49bee348f00121097ba6bea5b71b1e8f27e7e20652a6.json
  • graphify-out/cache/ast/v0.9.10/6ce447dd8b9ad214a2991785cca8b8f7d39893aa67757beac5f1f003145af1b8.json
  • graphify-out/cache/ast/v0.9.10/6d38dc7fec2474efadfd99576e6203e41989806ee6c7cf545b34b82bf1a49e01.json
  • graphify-out/cache/ast/v0.9.10/70941d4adb706448ec8b89852c36fd9736d2b206e3008b644f339ffedd06565f.json
  • graphify-out/cache/ast/v0.9.10/9490febf3084f6a4414c68619dac089f8a33f7e9a4b20ba04cf3131587bf1bf3.json
  • graphify-out/cache/ast/v0.9.10/956686e88d891d9100203730987adb703dd8b7f732692b8d25e00849ce734eb0.json
  • graphify-out/cache/ast/v0.9.10/9a967bb77d892f8dc57e68adf32d65f853d16f27e505755957f0425a918a994e.json
  • graphify-out/cache/ast/v0.9.10/ada221d4f585ac0070cbfba4eaf9b81eed4c483fb4376d9948fd8c7b5a190b38.json
  • graphify-out/cache/ast/v0.9.10/b49ab86a01170f174cc51088ae955f68ed3065c1b7187cefe93250cbfbc469f1.json
  • graphify-out/cache/ast/v0.9.10/b7820c4afabade62aa5eccc8aefe2ad2597c6b3ca138dbbbd2841ac63bc394e4.json
  • graphify-out/cache/ast/v0.9.10/c387947cb80e9624a09a438a592835caed9278c1ef474d3dc355e55027ae2bf0.json
  • graphify-out/cache/ast/v0.9.10/ce9ba9fe47f14e83259f02a11095ed4996116038214abe7947d9ad4e98b17f34.json
  • graphify-out/cache/ast/v0.9.10/db45137f626e67a84a2172db8520566522b616f8d02aee657334d20cdc68038c.json
  • graphify-out/cache/ast/v0.9.10/e34d538b509561851a3565355d282acb4918b185c19957746d348c1a7e44eb1f.json
  • graphify-out/cache/ast/v0.9.10/ed73acce7472600040852f23268bf45b923cdd5df26715a97e6cd31b67558f44.json
  • graphify-out/cache/ast/v0.9.10/fbc1e49378adfd2559381b1ecc5108822a3175e7f167f7199bc7ffec2e72a72c.json
  • graphify-out/cache/stat-index.json
  • graphify-out/graph.json
  • graphify-out/manifest.json
  • openspec/changes/implement-reflection-miner/design.md
  • openspec/changes/implement-reflection-miner/proposal.md
  • openspec/changes/implement-reflection-miner/specs/reflection-miner/spec.md
  • openspec/changes/implement-reflection-miner/tasks.md

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

🔥 Files not summarized due to errors (1)
  • graphify-out/2026-07-24/graph.json: Server error: no LLM provider could handle the message

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added scheduled reflection mining to identify corrections, preferences, repeated approvals, and consolidation opportunities from verified activity.
    • Reflection results are submitted as reviewable proposals rather than activated automatically.
    • Added support for persona proposals through the standard approval lifecycle.
    • Added configurable reflection-mining intervals, defaulting to five minutes.
  • Safety & Reliability

    • Restricted reflection processing to authenticated, scoped, classification-bounded evidence.
    • Added provenance tracking and fail-closed behavior when verification or audit recording fails.

Walkthrough

Adds a bounded reflection-miner contract and runtime, scheduled grant composition, persona proposal lifecycle support, declarative configurations, verified provenance handling, and integration tests for proposed artifact persistence.

Changes

Reflection miner

Layer / File(s) Summary
Miner contracts and proposal rules
.raw/openspine-decision-log.md, openspec/changes/implement-reflection-miner/*, crates/openspine-schemas/src/reflection_miner*
Defines authenticated grant admission, scoped briefcases, provenance, observation classes, proposal bodies, evaluation probes, consolidation rules, and validation errors.
Persona proposal lifecycle
crates/openspine-kernel/src/artifact_loader.rs, crates/openspine-kernel/src/api/artifact_propose.rs, crates/openspine-kernel/src/overlay_eval_gate/judge.rs, crates/openspine-kernel/src/api/*tests.rs
Adds persona to proposal parsing, registry insertion, serialization, evaluation, dispatch validation, and lifecycle tests.
Kernel runtime and scheduled grants
crates/openspine-kernel/src/reflection_miner_runtime*, crates/openspine-kernel/src/store/*, crates/openspine-kernel/src/main.rs, crates/openspine-kernel/src/config.rs, artifacts/lyra/{agents,packs,routes,workflows}/*
Implements gated model reservations, durable artifact budgets, verified audit slices, scheduled miner and submitter grants, repeated-approval derivation, periodic execution, and declarative bindings.
Reflection integration validation
crates/openspine-schemas/src/reflection_miner_tests.rs, crates/openspine-schemas/tests/fixtures.rs, crates/openspine-kernel/src/api/artifact_propose_miner_tests.rs
Tests admission boundaries, provenance, correction probes, repeated approvals, persona payloads, classification ceilings, scheduled ticks, budgets, and persisted proposed artifacts.
Generated graph records
graphify-out/*
Regenerates graph reports, labels, manifests, and AST cache records for the implementation.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Timer
  participant ScheduledRuntime
  participant Store
  participant ReflectionMiner
  participant ArtifactPropose
  Timer->>ScheduledRuntime: emit timer.reflection.fired
  ScheduledRuntime->>Store: authenticate grants and load allowed audit slice
  ScheduledRuntime->>ReflectionMiner: provide bounded briefcase and observations
  ReflectionMiner->>ArtifactPropose: submit lifecycle-proposed payload
Loading

Possibly related PRs

Poem

A bunny mines briefs with a hop and a scan,
Finds tidy proposals no kernel can plan.
Probes stay structured, approvals stay true,
Persona drafts wait for owners to view.
With grants, gates, and budgets in line,
The carrot-shaped workflow runs fine!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch change/implement-reflection-miner

Warning

Tools execution failed with the following error:

Failed to run tools: Ping-pong health check failed


Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant