Skip to content

perf: separate content lifecycle maintenance from authorized reads - #2060

Merged
hidb4ai merged 8 commits into
masterfrom
perf/dashboard-query-lifecycle
Oct 19, 2026
Merged

hidb4ai merged 8 commits into
masterfrom
perf/dashboard-query-lifecycle

Conversation

@PsiACE

@PsiACE PsiACE commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Which issue or RFC does this PR close?

Refs #1396 and #1813.

Rationale for this change

Reads replay initialization and repeatedly verify ownership across the entire Scope. Dashboard HTTP fan-out multiplies this work. Separate lifecycle maintenance from authorized reads.

master:
  Page -> HTTP fan-out
       -> repeated initialization and authorization
       -> Scope-wide owner checks -> list + per-item reads

this PR:
  Startup       -> batched recovery and package validation
  Create/write  -> current authority -> persist required facts
  Read          -> select Scope -> current authority -> projection/batch
  Select/expand -> current authority -> requested detail/history/evidence
  Replace       -> current write authority + revision CAS -> new revision

SQLite, enforced authorization, explicit Scope, approximately 3,000 records per Family. HTTP comparison against master 683e2db0:

HTTP operation master SELECTs This PR SELECTs HTTP p50 ms: master / PR
Experience list 9,033 4 11,465 / 27
Atomic search 9,043 9 12,059 / 65
Candidate list 9,483 5 29,818 / 47
Experience create 31 17 355 / 59
Experience replace 34 18 499 / 65
Atomic forget 40 15 1,461 / 72

Warm latency samples: master 2, this PR 20. Text/FTS retrieval and serial writes were measured.

Dashboard SSR SELECTs: Home 3, Notes 6, Usage 2; Scope discovery is a separate browser request. Against 268ac1b3, selected-candidate reads change 46→10, and the full history page 51→14. Opening history or evidence separately takes 4 or 6 SELECTs.

What changes are included in this PR?

  • Separate initialization, writes, authorization, and reads; resolve the default Scope once.
  • Batch projections, candidate permissions, owner facts, and startup validation.
  • Read selected details and opened disclosures independently.
  • Preserve existing page elements and revision controls; fix Topic pagination.
  • Cover observable behavior and regressions without query-count assertions.

Are there any user-facing changes?

Valid grants remain effective without owner relations; owner-derived rights still require those facts. Artifact grants do not grant Scope discovery or metadata access.

Breaking: remove /dashboard/guide, Notes entry, and Methods kind=all compatibility paths.

How was this change tested?

  • make check; focused behavior tests and E2E acceptance.
  • Real SeekDB and OceanBase authorization, revocation, history, and restart scenarios.
  • Chromium desktop/mobile navigation, history, evidence, comparisons, and rollback.
  • Authenticated HTTP retrieval, write readback, stale-write rejection, and forget behavior.

AI usage statement

Codex assisted implementation, validation, and documentation. gpt-6-astra (xhigh) contributed design and adversarial ablation analysis.

Replace collection-wide owner health scans and repeated static preset
initialization with current grant decisions. Keep owner attestation on
writes while allowing valid Scope and Artifact grants independently of
missing owner relations.

Read bounded built-in page projections under one policy/content snapshot,
batch exact content, lineage and usage queries, and load review history
and evidence on demand. Preserve injected application/provider boundaries.

Validation: make check; Dashboard regressions; actual SQLite, seekdb and
OceanBase query-budget and concurrent-snapshot tests; 45 scale scenarios.
Batch candidate projections, owner facts, and Tag basis checks while preserving current read and decision authority.

Load opened history and evidence independently, retain revision cards and Scope labels, and fix Topic pagination. Cover grant revocation and restart behavior through public interfaces.
@PsiACE
PsiACE marked this pull request as ready for review October 19, 2026 08:21
Copilot AI balanced review requested due to automatic review settings October 19, 2026 08:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@PsiACE PsiACE changed the title perf(dashboard): bound page reads and make lifecycle explicit perf: separate content lifecycle maintenance from authorized reads Oct 19, 2026
Keep state-only reads consistent with the existing artifact error contract. Fold HTTP and sharing regressions into access-control tests and remove the separate read-governance suite.
Copilot AI balanced review requested due to automatic review settings October 19, 2026 09:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hidb4ai hidb4ai added the 1.4.1 v1.4.1 release tracking label Oct 19, 2026
@hidb4ai
hidb4ai merged commit 4897388 into master Oct 19, 2026
38 checks passed
@PsiACE
PsiACE deleted the perf/dashboard-query-lifecycle branch October 19, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.4.1 v1.4.1 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants