feat: upstream PR #23 stack onto purified (#1274 DuckDB + #1251 artifact + #1284 Omnigent) - #26
Conversation
DuckDB config resolution currently leaves a leading `~` literal in
`[duckdb].path`, so daemon-backed pushes can canonicalize the server
mirror path against the daemon working directory instead of the user's
home directory.
This expands leading-home shorthand during DuckDB config resolution,
alongside the existing defaulting and env expansion, so the daemon and
in-process callers resolve the same mirror path from the same config
value. `${HOME}` expansion, default-path fallback, and non-leading
tildes keep their current behavior. The change stays in
`internal/config` with focused resolution regression coverage.
The config snippet and daemon-vs-in-process repro came from @halms's
issue report.
Closes kenn-io#1264
---------
Co-authored-by: Marius van Niekerk <marius.v.niekerk@gmail.com>
Second PR in the artifact-sync split (follows kenn-io#1242, which froze the wire format and added the docbank-backed store). Extracted from the closed kenn-io#1239 branch with review fixes applied during extraction. - **SQLite publication ledger** (`internal/db`): `artifact_export_queue`, `artifact_publications`, `artifact_publication_revisions`, `artifact_checkpoint_heads`/`_floors`, plus session triggers that enqueue owned-session changes. Triggers are origin-gated — they fire only once an artifact origin exists in `pg_sync_state` — so archives that never opt in carry no queue writes. Trigger DDL lives in Go and is installed after column migrations (drops run before), so no trigger references session columns while migrations run. - **Go enqueue hooks** for child-only mutations that don't touch trigger-covered session columns: batch message writes (queue generation sampled around the batch, enqueues exactly once when the triggers didn't fire), standalone usage-event replacement, and token-coverage backfill. Queue bootstrap is an explicit call at origin creation, not a migrate-time backfill. - **Origin lifecycle** (`internal/artifact`): `EnsureOrigin`/`AdoptOrigin`/`StoredOrigin`. Creating or adopting an origin bootstraps the export queue; a failed bootstrap rolls the origin back (deleting the key when there was none before, since the gates test key existence) so a retry re-runs population. Adopting over a different established origin force-requeues every owned session with a generation bump, because prior acknowledgements belong to the old origin. - **Checkpointed export pipeline** (`internal/artifact`): claims pending queue rows, publishes content-addressed session manifests and segments into the store, records publication revisions, and advances per-origin checkpoint heads with monotone sequence reservation. Stale claims (a writer advanced the generation mid-export) roll back atomically. Incremental export is bounded by the dirty batch; an unchanged archive costs a catalog identity check only. Full export streams all bodies, then re-checks the queue up to 32 settle rounds — hitting the bound returns the accumulated result with an error meaning "made progress, run again." - **Resync carriage**: `CopySyncStateFrom` carries queue, publication, revision, and checkpoint state across a full resync and re-dirties every copied queue row — the origin gate keeps triggers silent in the rebuild's temp DB, and a parser bump changes manifest hashes anyway, so the exporter must re-verify each session (unchanged content is cheap to skip, being content-addressed). - Export-side only. Nothing wires the pipeline to the daemon or CLI yet; that lands with folder transport and import in a later PR. There is no import/read path here. - The ledger is local SQLite state. PostgreSQL push and shared query shapes are untouched. - The wire format is unchanged: no golden churn, format stays frozen at v1. - `internal/db/artifact_publication.go` — queue and ledger SQL, origin-gated enqueue - `internal/db/db.go` — trigger DDL split around column migrations, bootstrap/requeue - `internal/artifact/export.go` — publish → manifest → checkpoint ordering and claim lifecycle - `internal/artifact/origin.go` — origin lifecycle and rollback semantics - `internal/db/orphaned.go` — resync carriage and the pending-flag decision Co-authored-by: Wes McKinney <wesm@users.noreply.github.com>
Supersedes kenn-io#1167 — same feature, rebuilt as a lean series on the capability work that landed in kenn-io#1282/kenn-io#1283. The comment on kenn-io#1167 records what was cut and why. ## What this does Adds Omnigent to the supported agents. Omnigent stores every conversation in one SQLite file (`chat.db`), so this follows the same container model as Zed: sync watches one file, and the archive holds one session per conversation (`omnigent:0:<hex>`). - Scheduled syncs reparse the container when its fingerprint (mtime + hash of the db and WAL) changes. - Watcher events do a bounded, indexed scan of only the members whose `updated_at` moved, and retire disappeared members as tombstones. WAL `-shm` checkpoint noise is ignored. - Deleting a conversation (or the whole db) tombstones its sessions; nothing is destroyed. ## Notes - Supports the two schema generations that ship in released Omnigent builds, including the current binary-uuid one. The oldest shape is reported as unsupported without failing sync; the interim `session_overrides` shape is not supported. - `chat.db` co-locates transcripts with authentication secrets, so Omnigent is excluded from remote sync (capability from kenn-io#1282, nested-root enforcement from kenn-io#1283). - Validated against a chat.db produced by Omnigent's own store code at upstream head, not just fixtures (evidence in `docs/internal/session-format-sources.md`). - Known trade-offs (Zed parity): the scheduled reparse scales with container size, and edits that don't bump `updated_at` wait for the scheduled pass instead of the watcher. ## Where to look - `internal/parser/omnigent.go` — schema detection and member queries - `internal/parser/omnigent_provider.go` — discovery, fingerprinting, watcher scan, tombstones - `internal/sync/engine.go` — container scheduling and the persistent-archive audit fallback - `internal/sync/omnigent_integration_test.go` — end-to-end sync coverage Co-authored-by: Wes McKinney <wesm@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Analysis CompleteGenerated ECC bundle from 1 commits | Confidence: 50% View Pull Request #27Repository Profile
Changed Files (15)
Top hotspots
Top directories
Analysis Depth Readiness (commit-history, 7%)ECC Tools uses this to decide whether recommendations should stay at commit-history/setup guidance or expand into CI, security, harness, reference-set, AI-routing, and team backlog work.
Reference Set Readiness (0/7, 0%)
Likely Future Issues (4)
Suggested Follow-up Work (4)
Copy-ready bodies test: add regression coverage for cmd/periscope/duckdb.go + cmd/periscope/import.go ## Summary
- Add regression coverage for the recently touched code paths before more changes stack on top.
## Why
- Backfill regression coverage before another change set lands on the touched code paths.
## Touched paths
- `cmd/periscope/duckdb.go`
- `cmd/periscope/import.go`
## Validation
- Add or extend focused tests that exercise the touched paths.
- Run the affected test suite and verify the new coverage closes the gap.chore: sync config templates for internal/config/config.go + internal/config/config_duckdb_tilde_test.go ## Summary
- Update the example env files, sample configs, or deployment templates that should mirror the changed runtime configuration surface.
## Why
- Backfill example env files or config templates before a fresh setup drifts from the shipped runtime surface.
## Touched paths
- `internal/config/config.go`
- `internal/config/config_duckdb_tilde_test.go`
## Validation
- Update the repo example env file or config template that should reflect the new runtime settings.
- Run the setup, boot, or deployment validation flow that depends on the changed config surface.test: add auth coverage for cmd/periscope/session.go ## Summary
- Add auth, session, or permission regression coverage for the recently changed security-sensitive surface.
## Why
- Backfill auth or permission regression coverage before another access-control change lands on the touched surface.
## Touched paths
- `cmd/periscope/session.go`
## Validation
- Add or extend integration / e2e coverage for the changed auth, session, middleware, or permission surface.
- Exercise allowed and denied flows, invalid or expired credentials, or equivalent access-control boundary cases.security: add scanner evidence for cmd/periscope/session.go ## Summary
- Add security scanner or code-scanning evidence for the recently changed security-sensitive surface.
## Why
- Backfill explicit scanner or code-scanning evidence before another security-sensitive change lands on the touched surface.
## Touched paths
- `cmd/periscope/session.go`
## Validation
- Run or add the relevant security scanner, code scanning, secret scanning, or dependency/security review check for the touched surface.
- Attach the scanner output, SARIF/code-scanning result, or focused security regression test to the follow-up PR.
- Confirm the changed auth, billing, webhook, secret-handling, agent, or CI surface has an explicit pass/fail gate.Generated Instincts (15)
After merging, import with: Files
|
Restore litellm_snapshot.json.gz from upstream AgentsView artifact branch (kenn-io/agentsview litellm-pricing-snapshot) and track it in-repo so go:embed in internal/pricing/fallback.go works without a pre-build restore. Upstream keeps the snapshot gitignored and restores via make pricing-snapshot; Periscope purified line vendors the same bytes for cloud/CI bare go test.
- Point ci-pr.yml at the fork workflow so periscope paths apply on PR CI - Finish periscope rename in build_script_test, desktop-dev.ps1, and .air.toml - Hydrate docs assets from kenn-io/agentsview when origin lacks orphan branches - Exclude cherry-picked context visualizer from kit-ui-check; fix SessionBreadcrumb shadow token
- Re-enable full kit-ui-check over src (remove context exclusion script) - Wrap context panels in Card; use EmptyState for loading/error/unknown states - Normalize spacing gaps to var(--space-N) tokens across context components - Rename summary header classes to avoid hand-rolled-top-bar false positives
…ration Prior CI fix commits only updated commit messages while the actual file changes stayed in the working tree. PR CI kept calling upstream kenn-io/agentsview workflows, so periscope path fixes never ran. - Point ci-pr.yml at the checked-in workflow instead of upstream main - Fetch docs asset branches from kenn-io/agentsview when origin lacks them - Migrate context visualizer components to kit-ui primitives (0 findings) - Align dev script paths (.air.toml, desktop-dev.ps1, build_script_test.go)
…ged) The prior commit used commit-clean without staging, so it duplicated HEAD with no file changes. This commit actually lands: - ci-pr.yml -> local ./.github/workflows/ci.yml (not upstream @main) - hydrate-assets.sh upstream fallback to kenn-io/agentsview asset branches - context visualizer kit-ui Card/EmptyState/spacing migration (0 findings) - periscope dev path alignment (.air.toml, desktop-dev.ps1, build_script_test)
Mandatory git add → verify-staged-for-commit → commit-clean sequence. Blocks message-only commits when edits stay unstaged (periscope PR #26 root cause).
Replace machine-local /Users/ann/dev/periscope/docs path with v1-ui-spec.md so docs build and link checks pass in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
context-session-visualizer-spec.md was renamed to periscope-spec.md in bc0c13a; update visualizer planning docs so docs CI link checks pass. Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise copied scripts under temp repo, bootstrap via commit-clean, fix bare-repo detection in sync-attribution, and empty verify_args under set -u. Co-authored-by: Cursor <cursoragent@cursor.com>
ff8cd5b
into
cursor/agentsview-purified-onto-kenn-f559
Two-parent merge retains all original SHAs from both lines: - parent1: origin/merged (Periscope fork Layer 2+3) - parent2: origin/cursor/agentsview-purified-onto-kenn-f559 (kenn-io replay + PR #26) Tree resolution (oramasys-method / ARCHITECTURE.md matryoshka): - Base tree: purified (upstream modernization + kenn-io#1274/kenn-io#1251/kenn-io#1284) - Overlay from merged: internal/summarize, internal/llm, context UI, install/release/sync scripts, jetbrains-plugin, ECC bundles, branding docs No synthetic upstream replay commits. Conflict resolution favors implementation plan layers; single merge commit minimizes artificial history. Synthetic pass commits preserved on cursor/agentsview-plus-periscope-synthetic-pass-f559.
CI & integration notes (appended)
Tip:
2742addb— docs strict-link fixes for zensical-excluded paths (ARCHITECTURE.mdsuperpowers links, rename-catalogue script link).Parallel agent fixes already on branch:
ec11bca6—periscope-v1-plan.mdmachine-local path →./v1-ui-spec.md821b9855— visualizer planning docs →periscope-spec.md494beba5— commit-clean test harness aligned with orama guard bundleDocs orphan-branch mirrors (fork
origin, reference-only — not in this PR diff):docs-assets7c7dbd0fkenn-io/agentsview✓docs-generated-assets71d86172kenn-io/agentsview✓hydrate-assets.shnow resolves fromoriginwithout upstream fallback. Refresh mirrors the same way asagentsview: re-push upstream SHAs viadocs/assets/update-static-assets-branch.sh/docs/screenshots/update-generated-assets-branch.sh.CI run
30427743559on2742addb: docs, scripts, frontend, frontend-node-25, integration, e2e, lint, coverage, Desktop Unit Tests (Windows) — pass; Go Test (ubuntu/windows) and Benchmark Gate still pending at last check.