Skip to content

fb7e7068: Add durable knowledge promotion inbox - #48

Merged
andrei-hasna merged 5 commits into
mainfrom
drain/fb7e7068-ms631h3h
Jul 31, 2026
Merged

fb7e7068: Add durable knowledge promotion inbox#48
andrei-hasna merged 5 commits into
mainfrom
drain/fb7e7068-ms631h3h

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Automated task drain for fb7e7068.

Task: Add durable knowledge promotion inbox

Agent verdict: NONE

Opened by the e2b-task-drain fleet (codex gpt-5.6-sol, effort xhigh).
Not auto-merged — review before landing.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

hasna-drain and others added 3 commits July 29, 2026 12:50
Use CURRENT_SCHEMA_VERSION in schema gate expectations and cover the new durable promotion tables in the core migration test.

Agent: Augustus
@andrei-hasna

Copy link
Copy Markdown
Contributor Author

[REVIEW] NO_GO — #48 @ 7a10246 — lens: correctness+security+gates, reviewer Augustus (1 of 1)

What I read:

  • git log --oneline origin/main..HEAD and git diff origin/main...HEAD --stat, both exit 0.
  • Full diff for src/knowledge-db.ts, src/promotion-inbox.ts, and src/service.ts.
  • Surrounding source in the migration path, service stats/inventory paths, SDK/CLI/MCP/sync callers, safety audit/redaction helpers, and affected schema-version tests.

What I ran:

  • bun install: exit 0.
  • bun run typecheck: not run because package.json defines no typecheck script.
  • bun test on the original candidate in this shell: exit 1. The first run included ambient cloud-mode failures from this review environment, plus stale schema-version assertions.
  • HASNA_KNOWLEDGE_STORAGE_MODE=local bun test on the original candidate: exit 1, 355 pass / 2 skip / 13 fail. The remaining failures were all stale schema_version or sqlite_schema_version expectations still pinned to 9 after this PR raised CURRENT_SCHEMA_VERSION to 10.

Blocking P0/P1 findings on the exact candidate:

  • P1: required test gate was broken. The migration intentionally advances the SQLite schema to 10 in src/knowledge-db.ts, but tests in tests/knowledge-db.test.ts, tests/cli.test.ts, tests/sdk.test.ts, tests/mcp.test.ts, tests/reindex.test.ts, tests/service.test.ts, and tests/sync.test.ts still asserted version 9 on reachable DB init/stats/sync paths.

Remediation pushed:

  • Pushed b487d4a (test: align schema version assertions) to the PR head branch drain/fb7e7068-ms631h3h.
  • The fix uses CURRENT_SCHEMA_VERSION in the affected tests and adds coverage that migration creates knowledge_promotion_candidates and durable_knowledge_records.
  • Staged secrets scan before commit: exit 0, no findings.

Focused re-review after remediation:

  • HASNA_KNOWLEDGE_STORAGE_MODE=local bun test tests/knowledge-db.test.ts tests/reindex.test.ts tests/service.test.ts tests/sdk.test.ts tests/mcp.test.ts tests/sync.test.ts tests/cli.test.ts: exit 0, 98 pass / 0 fail.
  • HASNA_KNOWLEDGE_STORAGE_MODE=local bun test: exit 0, 368 pass / 2 skip / 0 fail.
  • Current PR head is b487d4af767abcf4e00b3ba44853d9f2bedc5d74; the named P1 is fixed and I found no direct regression in the focused re-review.

Non-blocking follow-ups:

  • None.

Resolve the current origin/main conflict on the PR branch and keep CLI-spawn tests isolated from inherited Knowledge mode variables.

Agent: Augustus
Expose promotion candidates and durable records from SQLite inventory output, cover the returned sections in the service facade test, and refresh generated artifacts for the current source.

Agent: Augustus
@andrei-hasna
andrei-hasna merged commit c853def into main Jul 31, 2026
8 checks passed
@andrei-hasna
andrei-hasna deleted the drain/fb7e7068-ms631h3h branch July 31, 2026 18:11
@andrei-hasna

Copy link
Copy Markdown
Contributor Author

[REVIEW-FIX] #48 @ 3cfc9ef — reviewer Augustus

Follow-up fix after the initial review/remediation:

  • Added SQLite inventory output for promotion_candidates and durable_records in src/service.ts.
  • Added service coverage proving promoted durable records appear in inventory without dumping full content.
  • Regenerated checked-in bundles/declarations at the pinned Bun version after verify:generated exposed stale artifacts.

Verification after the follow-up fix:

  • HASNA_KNOWLEDGE_STORAGE_MODE=local bun test — exit 0, 395 pass / 2 skip.
  • bun run build — exit 0.
  • bun run verify:generated — exit 0.
  • bun test — exit 1 in this local shell only because the ambient session selects cloud mode; the failures are local-catalog tests refusing cloud mode, while the controlled local-mode run and GitHub CI were green.
  • Staged secrets scan before commit — exit 0.
  • Outgoing diff secrets scan before push — exit 0.

CI at head 3cfc9ef184f5b6ab3f8d8acf5c7bd04b7b395f18 passed on Ubuntu, macOS, and Windows. Merged with the required command gh pr merge 48 --repo hasna/knowledge --squash --delete-branch; merge commit: c853def34ad556c2e5ed531fc2865a1e22aa8c5d.

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