You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(aggregator): provenance is lazily populated per process — /api/health reports "fixtures" for facets not yet loaded since boot #1267
Found by the #1184 coherence design track (2026-10-26, verified live twice): the aggregator's Provenance facet strings are lazily populated per server process. live.ts initializes every facet to a fixture default, and each facet's string is only replaced when that facet's method has actually run in that process. /api/health (server.ts) reads source.provenance() without exercising the facets — so its answers depend on which pages happened to be visited since boot.
Verified tonight: /api/health reported registry: "fixtures" in the same minutes /sessions was serving 221 merged records. Health that lies by omission, depending on request order, undermines every freshness/honesty surface in epic #1184.
Fix direction
Health must actively load or probe the facets it reports on (or provenance must be computed from loaded state, not request history). The coherence design doc (~/workspace/pm-stack-coherence-design-2026-10-26.md, health/freshness sections) already stipulates: actively load or probe; never trust the lazy strings. Coordinate with #1140 (absent-vs-invalid diagnosis) — same honesty family, different mechanism: #1140 is about the orchestration section's validation outcome being misreported as absent; this is about facet provenance depending on process request history.
Acceptance
Fresh server process, first-ever request is /api/health: every facet reports its true source (live vs fixtures) without any prior page visit.
Regression test: provenance correctness independent of call order.
/api/health output for a fully-live deployment contains no false "fixtures" facets.
Agent note (pickup): building the honesty + freshness slice of epic #1184 in one PR — this issue (banner + unknown counts + dead-man's-switch half of #1148), #1138 (freshness chips), #1267 (health priming). Design: ~/workspace/pm-stack-coherence-design-2026-10-26.md cluster 1. The PR also carries the role-based copy change (visible "Needs Drew" → "Needs user"; contract field names untouched).
Agent-note (completion): shipped in PR #1318 (merge b8aedf09), closing this issue.
What landed
/api/health now primes every provenance facet before answering (ensureProvenancePrimed in src/server.ts): it exercises the board/roadmap/comments/quota/usage/attention/orchestration/dns/aa/registry/projects reads via Promise.allSettled, cached for 60 s (the impl(aggregator): service & page health page - live probes for every stack service, feed ages, last runs #1147 probe-cache cadence) so a polling watchdog doesn't fan out to every upstream per hit. A facet that fails keeps its honest fallback string — which is exactly what health exists to report — and health itself never fails because a facet did.
Supporting fix: the live items() facet now reports live (project pool · fleet feed · <age>) on an empty-refs call when a pool is present (the prime path), instead of leaving the fixture default standing for a facet nobody had resolved refs through.
Regression test: test/health-priming.test.ts boots a live-source server against a controlled feed and asserts on the first response the process ever serves (the readiness poll itself): quota facet live (fleet feed …, orchestration facet live (orchestration section orch-health-test …, registry facet contains 1 session records (not fixtures), and sections.orchestration.state === "live".
Verification: bun test 181 pass / 0 fail, bunx tsc --noEmit clean, CI green. The fresh-process case is additionally proven live at deploy time (service restart → /api/health as first hit).
Activity
developing-today commentedon Oct 27, 2026
CODE-391
dezren39 commentedon Oct 27, 2026
Agent note (pickup): building the honesty + freshness slice of epic #1184 in one PR — this issue (banner + unknown counts + dead-man's-switch half of #1148), #1138 (freshness chips), #1267 (health priming). Design: ~/workspace/pm-stack-coherence-design-2026-10-26.md cluster 1. The PR also carries the role-based copy change (visible "Needs Drew" → "Needs user"; contract field names untouched).
feat(aggregator): honesty + freshness — no silent zeros, primed healt…
Merge pull request #1318 from developing-today/pm/honesty-freshness
dezren39 commentedon Oct 27, 2026
Agent-note (completion): shipped in PR #1318 (merge
b8aedf09), closing this issue.What landed
/api/healthnow primes every provenance facet before answering (ensureProvenancePrimedinsrc/server.ts): it exercises the board/roadmap/comments/quota/usage/attention/orchestration/dns/aa/registry/projects reads viaPromise.allSettled, cached for 60 s (the impl(aggregator): service & page health page - live probes for every stack service, feed ages, last runs #1147 probe-cache cadence) so a polling watchdog doesn't fan out to every upstream per hit. A facet that fails keeps its honest fallback string — which is exactly what health exists to report — and health itself never fails because a facet did.sections.orchestration={ state: live|stale|absent|invalid, runId?, generatedAt?, ageMs?, failedChecks? }(fromSource.diagnostics(), fix(aggregator): /attention presents derived-only data as authoritative when the orchestration tier source is missing - banner + never a silent 0 #1139/fix(aggregator): health/footer misdiagnoses a rejected orchestration section as 'has not published' - distinguish absent vs invalid #1140's primitive).items()facet now reportslive (project pool · fleet feed · <age>)on an empty-refs call when a pool is present (the prime path), instead of leaving the fixture default standing for a facet nobody had resolved refs through.Regression test:
test/health-priming.test.tsboots a live-source server against a controlled feed and asserts on the first response the process ever serves (the readiness poll itself): quota facetlive (fleet feed …, orchestration facetlive (orchestration section orch-health-test …, registry facet contains1 session records(notfixtures), andsections.orchestration.state === "live".Verification:
bun test181 pass / 0 fail,bunx tsc --noEmitclean, CI green. The fresh-process case is additionally proven live at deploy time (service restart → /api/health as first hit).