Skip to content

Theme redesign - #8

Merged
mig5 merged 16 commits into
mainfrom
mig/redesign
Oct 27, 2026
Merged

mig5 merged 16 commits into
mainfrom
mig/redesign

Conversation

@mig5

@mig5 mig5 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

More tweaks from Impeccable and fix some performance issues

mig5 added 16 commits October 26, 2026 17:10
- Home overview (services/home.py, services/stats.py): the home page now asks only for the event counters it shows, through a new stats_event_counts(). The two coverage queries it used to compute and discard are gone.
- Mapped event count and covered controls (control_inheritance.py): these used to build all 400k (control, event) pairs, four times per request. Now the framework’s controls and their crosswalk sources are worked out first (a few hundred IDs).
  - Mapped events are counted once each against those controls’ mappings.
  - Covered controls come from checking each control for at least one mapped event, then following crosswalk links from the controls that have evidence.
  - stats_summary uses the same helpers, and two parameters nothing uses any more are removed.
- Chart: the mapped series counts events once each instead of using count(DISTINCT), so it no longer sorts every row.
- Retention (evidence_retention.py): the task first checks under the ordinary shared lock whether there’s anything to delete.
  - If retention is disabled, or an automatic job has nothing eligible, it finishes without ever taking the exclusive lock.
  - Manual purges, and automatic jobs that do have events to delete, still take the exclusive lock and pick their candidates again under it, so deletion works as before.
- Counter refresh: the per-minute refresh now covers enabled frameworks plus the default (2 here, instead of 94). Any other framework is counted the first time someone asks for it.
- Migration 0021_dashboard_query_support:
  - a partial index for the ingestion pause check;
  - statistics on day and hour buckets of event timestamps, so Postgres stops estimating 181k buckets for 30 days;
  - an ANALYZE of the affected tables.
- Postgres settings:
  - docker-compose.yml now sets shared_buffers (256 MB by default, overridable with KEEN_POSTGRES_SHARED_BUFFERS), effective_cache_size (1 GB, KEEN_POSTGRES_EFFECTIVE_CACHE_SIZE) and jit=off.
…Workstation agent to a Person. Auto-create Person objects when KEEN users are created
@mig5
mig5 merged commit e600a39 into main Oct 27, 2026
6 checks passed
@mig5
mig5 deleted the mig/redesign branch October 27, 2026 04:08
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