views: allow materialized views to select a named source database #12

Closed
nsaspy wants to merge 4 commits from rage/15-view-source-database into master
Owner

Implements #15 as the minimal generic upstream dependency required by lost-rob0t/hackmode#15.

RED-first evidence: exact test-only head 194df03706afa7ecbadad91c2461a0ea02c202ca reached the real Load and test Tek9 step and failed on both Ubuntu 22.04 and 24.04 jobs. Setup and benchmark-tool validation were green before the suite failure, so this is not environment noise.

Implementation:

  • database-view carries an explicit source database name, defaulting to the primary DB for backward compatibility;
  • new-view accepts :source-database-name without changing existing callers;
  • full rebuild and incremental application resolve the same declared source;
  • source lookup uses LMDB :if-does-not-exist :error, so a miss fails closed instead of silently creating/reading the primary DB;
  • materialized rows remain under view/<name> and public view-get / view-rows / map-view behavior is unchanged;
  • the source identity accessor is exported for consumers that need to inspect configuration.

Tests cover named-source rebuild, incremental application, public row reads, unchanged primary-source behavior, and explicit failure for an unknown source. No Hackmode-specific view names or outbox semantics are introduced into Tek9.

Current candidate head: 18f0e81575c9774b3a277b2eba56319ac67ea8cc. Merge only if fresh exact-head CI is fully green.

Implements #15 as the minimal generic upstream dependency required by lost-rob0t/hackmode#15. RED-first evidence: exact test-only head `194df03706afa7ecbadad91c2461a0ea02c202ca` reached the real `Load and test Tek9` step and failed on both Ubuntu 22.04 and 24.04 jobs. Setup and benchmark-tool validation were green before the suite failure, so this is not environment noise. Implementation: - `database-view` carries an explicit source database name, defaulting to the primary DB for backward compatibility; - `new-view` accepts `:source-database-name` without changing existing callers; - full rebuild and incremental application resolve the same declared source; - source lookup uses LMDB `:if-does-not-exist :error`, so a miss fails closed instead of silently creating/reading the primary DB; - materialized rows remain under `view/<name>` and public `view-get` / `view-rows` / `map-view` behavior is unchanged; - the source identity accessor is exported for consumers that need to inspect configuration. Tests cover named-source rebuild, incremental application, public row reads, unchanged primary-source behavior, and explicit failure for an unknown source. No Hackmode-specific view names or outbox semantics are introduced into Tek9. Current candidate head: `18f0e81575c9774b3a277b2eba56319ac67ea8cc`. Merge only if fresh exact-head CI is fully green.
test: require missing view sources to fail closed
Some checks failed
CI / benchmark-regression (pull_request) Failing after 16m49s
CI / tests (ubuntu-22.04) (pull_request) Successful in 3m43s
CI / tests (ubuntu-24.04) (pull_request) Successful in 2m19s
CI / package-smoke (pull_request) Failing after 5s
CI / merge-gate (pull_request) Failing after 2s
18f0e81575
nsaspy closed this pull request 2026-09-04 22:49:59 +00:00
Some checks failed
CI / benchmark-regression (pull_request) Failing after 16m49s
CI / tests (ubuntu-22.04) (pull_request) Successful in 3m43s
CI / tests (ubuntu-24.04) (pull_request) Successful in 2m19s
CI / package-smoke (pull_request) Failing after 5s
CI / merge-gate (pull_request) Failing after 2s

Pull request closed

Sign in to join this conversation.
No description provided.