fleet-memory/hindsight-control-plane
Nicolò Boschi b32767caa8
feat: add max_observations_per_scope bank config (#729)
* feat: add max_observations_per_scope bank config

Adds a configurable limit on the number of observations per tag scope.
When the limit is reached, consolidation only updates/deletes existing
observations — no new ones are created. Enforcement is done via a
constrained Pydantic response model (max_length on creates list) so the
LLM structurally cannot exceed the limit, plus prompt guidance.

- Config: HINDSIGHT_API_MAX_OBSERVATIONS_PER_SCOPE (-1 = unlimited)
- Reorder action execution: deletes → updates → creates
- Dynamic _ConsolidationBatchResponse with max_length constraint
- Prompt CAPACITY CONSTRAINT section when near/at limit
- Observations with no tags skip the limit entirely
- Control plane UI field + docs

* fix: strengthen max_observations tests with mock LLM + defensive truncation

- Rewrite integration tests to use MockLLM with deterministic responses
  (one observation per fact) instead of relying on real LLM behavior
- Add defensive truncation in _consolidate_batch_with_llm as belt-and-
  suspenders — catches LLM providers that ignore JSON schema max_length
- Tests now assert exact counts, not just upper bounds
2026-03-30 10:29:56 +02:00
..
bin feat: simplify mcp installation + ui standalone (#41) 2025-12-18 10:24:56 +01:00
public brandind and misc fixes 2025-12-11 12:46:48 +01:00
src feat: add max_observations_per_scope bank config (#729) 2026-03-30 10:29:56 +02:00
types Feature/graph viz (#85) 2026-01-02 16:27:29 +01:00
.dockerignore rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
.eslintrc.json rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
.gitignore feat: observation history tracking and diff UI (#513) 2026-03-06 16:16:05 +01:00
.prettierrc bump pg0 0.11.x and improve documentation (#33) 2025-12-16 13:33:01 +01:00
components.json rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
eslint.config.mjs fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
next.config.ts feat: observation history tracking and diff UI (#513) 2026-03-06 16:16:05 +01:00
package.json feat: add audit log for feature usage tracking (#717) 2026-03-27 09:52:03 +01:00
postcss.config.mjs rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
tailwind.config.ts feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
tsconfig.json feat: filter operations by type + fix stale auto-refresh closure (#522) (#527) 2026-03-09 13:17:00 +01:00