instar 1.3.889 → 1.3.891

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dashboard/glance.js +1 -0
  2. package/dashboard/index.html +93 -0
  3. package/dist/commands/server.d.ts.map +1 -1
  4. package/dist/commands/server.js +99 -1
  5. package/dist/commands/server.js.map +1 -1
  6. package/dist/config/ConfigDefaults.d.ts.map +1 -1
  7. package/dist/config/ConfigDefaults.js +14 -0
  8. package/dist/config/ConfigDefaults.js.map +1 -1
  9. package/dist/core/BackupManager.d.ts.map +1 -1
  10. package/dist/core/BackupManager.js +22 -15
  11. package/dist/core/BackupManager.js.map +1 -1
  12. package/dist/core/InitiativeTracker.d.ts +7 -0
  13. package/dist/core/InitiativeTracker.d.ts.map +1 -1
  14. package/dist/core/InitiativeTracker.js +17 -0
  15. package/dist/core/InitiativeTracker.js.map +1 -1
  16. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  17. package/dist/core/PostUpdateMigrator.js +8 -0
  18. package/dist/core/PostUpdateMigrator.js.map +1 -1
  19. package/dist/core/WriteDomainRegistry.d.ts.map +1 -1
  20. package/dist/core/WriteDomainRegistry.js +12 -0
  21. package/dist/core/WriteDomainRegistry.js.map +1 -1
  22. package/dist/core/canonicalPipelineRegistry.d.ts +73 -0
  23. package/dist/core/canonicalPipelineRegistry.d.ts.map +1 -0
  24. package/dist/core/canonicalPipelineRegistry.js +56 -0
  25. package/dist/core/canonicalPipelineRegistry.js.map +1 -0
  26. package/dist/core/canonicalPipelineRuntimeEvidence.d.ts +13 -0
  27. package/dist/core/canonicalPipelineRuntimeEvidence.d.ts.map +1 -0
  28. package/dist/core/canonicalPipelineRuntimeEvidence.js +15 -0
  29. package/dist/core/canonicalPipelineRuntimeEvidence.js.map +1 -0
  30. package/dist/core/componentCategories.d.ts.map +1 -1
  31. package/dist/core/componentCategories.js +1 -0
  32. package/dist/core/componentCategories.js.map +1 -1
  33. package/dist/core/devGatedFeatures.d.ts.map +1 -1
  34. package/dist/core/devGatedFeatures.js +24 -0
  35. package/dist/core/devGatedFeatures.js.map +1 -1
  36. package/dist/core/types.d.ts +24 -1
  37. package/dist/core/types.d.ts.map +1 -1
  38. package/dist/core/types.js.map +1 -1
  39. package/dist/core/version-skew.d.ts +1 -1
  40. package/dist/core/version-skew.d.ts.map +1 -1
  41. package/dist/data/llmBenchCoverage.d.ts.map +1 -1
  42. package/dist/data/llmBenchCoverage.js +6 -0
  43. package/dist/data/llmBenchCoverage.js.map +1 -1
  44. package/dist/data/provenanceCoverage.d.ts +2 -0
  45. package/dist/data/provenanceCoverage.d.ts.map +1 -1
  46. package/dist/data/provenanceCoverage.js +10 -0
  47. package/dist/data/provenanceCoverage.js.map +1 -1
  48. package/dist/feedback-factory/drain/FeedbackConsumerPromotionStore.d.ts +18 -0
  49. package/dist/feedback-factory/drain/FeedbackConsumerPromotionStore.d.ts.map +1 -0
  50. package/dist/feedback-factory/drain/FeedbackConsumerPromotionStore.js +51 -0
  51. package/dist/feedback-factory/drain/FeedbackConsumerPromotionStore.js.map +1 -0
  52. package/dist/feedback-factory/drain/FeedbackDrainBackupCadence.d.ts +20 -0
  53. package/dist/feedback-factory/drain/FeedbackDrainBackupCadence.d.ts.map +1 -0
  54. package/dist/feedback-factory/drain/FeedbackDrainBackupCadence.js +28 -0
  55. package/dist/feedback-factory/drain/FeedbackDrainBackupCadence.js.map +1 -0
  56. package/dist/feedback-factory/drain/FeedbackDrainPosture.d.ts +14 -0
  57. package/dist/feedback-factory/drain/FeedbackDrainPosture.d.ts.map +1 -0
  58. package/dist/feedback-factory/drain/FeedbackDrainPosture.js +15 -0
  59. package/dist/feedback-factory/drain/FeedbackDrainPosture.js.map +1 -0
  60. package/dist/feedback-factory/drain/FeedbackDrainService.d.ts +121 -0
  61. package/dist/feedback-factory/drain/FeedbackDrainService.d.ts.map +1 -0
  62. package/dist/feedback-factory/drain/FeedbackDrainService.js +370 -0
  63. package/dist/feedback-factory/drain/FeedbackDrainService.js.map +1 -0
  64. package/dist/feedback-factory/drain/FeedbackDrainStore.d.ts +369 -0
  65. package/dist/feedback-factory/drain/FeedbackDrainStore.d.ts.map +1 -0
  66. package/dist/feedback-factory/drain/FeedbackDrainStore.js +1125 -0
  67. package/dist/feedback-factory/drain/FeedbackDrainStore.js.map +1 -0
  68. package/dist/feedback-factory/drain/FeedbackDrainTickProxy.d.ts +67 -0
  69. package/dist/feedback-factory/drain/FeedbackDrainTickProxy.d.ts.map +1 -0
  70. package/dist/feedback-factory/drain/FeedbackDrainTickProxy.js +151 -0
  71. package/dist/feedback-factory/drain/FeedbackDrainTickProxy.js.map +1 -0
  72. package/dist/feedback-factory/drain/FeedbackFactoryGeneratedDefaults.d.ts +32 -0
  73. package/dist/feedback-factory/drain/FeedbackFactoryGeneratedDefaults.d.ts.map +1 -0
  74. package/dist/feedback-factory/drain/FeedbackFactoryGeneratedDefaults.js +47 -0
  75. package/dist/feedback-factory/drain/FeedbackFactoryGeneratedDefaults.js.map +1 -0
  76. package/dist/feedback-factory/drain/FeedbackInitiativeConsumer.d.ts +33 -0
  77. package/dist/feedback-factory/drain/FeedbackInitiativeConsumer.d.ts.map +1 -0
  78. package/dist/feedback-factory/drain/FeedbackInitiativeConsumer.js +71 -0
  79. package/dist/feedback-factory/drain/FeedbackInitiativeConsumer.js.map +1 -0
  80. package/dist/feedback-factory/drain/FeedbackReadinessArbiter.d.ts +36 -0
  81. package/dist/feedback-factory/drain/FeedbackReadinessArbiter.d.ts.map +1 -0
  82. package/dist/feedback-factory/drain/FeedbackReadinessArbiter.js +153 -0
  83. package/dist/feedback-factory/drain/FeedbackReadinessArbiter.js.map +1 -0
  84. package/dist/feedback-factory/drain/index.d.ts +2 -0
  85. package/dist/feedback-factory/drain/index.d.ts.map +1 -0
  86. package/dist/feedback-factory/drain/index.js +2 -0
  87. package/dist/feedback-factory/drain/index.js.map +1 -0
  88. package/dist/feedback-factory/processing/FeedbackProcessingService.d.ts +14 -0
  89. package/dist/feedback-factory/processing/FeedbackProcessingService.d.ts.map +1 -1
  90. package/dist/feedback-factory/processing/FeedbackProcessingService.js +25 -4
  91. package/dist/feedback-factory/processing/FeedbackProcessingService.js.map +1 -1
  92. package/dist/feedback-factory/store/FeedbackSourceGenerations.d.ts +39 -0
  93. package/dist/feedback-factory/store/FeedbackSourceGenerations.d.ts.map +1 -0
  94. package/dist/feedback-factory/store/FeedbackSourceGenerations.js +288 -0
  95. package/dist/feedback-factory/store/FeedbackSourceGenerations.js.map +1 -0
  96. package/dist/feedback-factory/store/JsonlFeedbackStore.d.ts +26 -6
  97. package/dist/feedback-factory/store/JsonlFeedbackStore.d.ts.map +1 -1
  98. package/dist/feedback-factory/store/JsonlFeedbackStore.js +139 -25
  99. package/dist/feedback-factory/store/JsonlFeedbackStore.js.map +1 -1
  100. package/dist/monitoring/AutonomousThroughputFloor.d.ts +118 -0
  101. package/dist/monitoring/AutonomousThroughputFloor.d.ts.map +1 -0
  102. package/dist/monitoring/AutonomousThroughputFloor.js +147 -0
  103. package/dist/monitoring/AutonomousThroughputFloor.js.map +1 -0
  104. package/dist/scaffold/templates.d.ts.map +1 -1
  105. package/dist/scaffold/templates.js +4 -0
  106. package/dist/scaffold/templates.js.map +1 -1
  107. package/dist/server/AgentServer.d.ts +4 -0
  108. package/dist/server/AgentServer.d.ts.map +1 -1
  109. package/dist/server/AgentServer.js +193 -1
  110. package/dist/server/AgentServer.js.map +1 -1
  111. package/dist/server/routes.d.ts +33 -0
  112. package/dist/server/routes.d.ts.map +1 -1
  113. package/dist/server/routes.js +288 -0
  114. package/dist/server/routes.js.map +1 -1
  115. package/package.json +5 -2
  116. package/scripts/lint-canonical-pipeline-completeness.mjs +265 -0
  117. package/src/data/builtin-manifest.json +65 -65
  118. package/src/data/llmBenchCoverage.ts +6 -0
  119. package/src/data/provenanceCoverage.ts +12 -0
  120. package/src/data/state-coherence-registry.json +18 -0
  121. package/src/scaffold/templates/jobs/instar/feedback-factory-process.md +13 -12
  122. package/src/scaffold/templates.ts +4 -0
  123. package/upgrades/1.3.890.md +19 -0
  124. package/upgrades/1.3.891.md +30 -0
  125. package/upgrades/side-effects/autonomous-throughput-floor.md +36 -0
  126. package/upgrades/side-effects/feedback-factory-operating-drain.md +110 -0
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: Feedback-Factory Processor
3
- description: "Cadenced clustering pass over the canonical feedback-factory store. Runs the already-parity'd processUnprocessed pipeline via POST /feedback-factory/process: it reads unprocessed fleet reports, groups them into dedup clusters (similarity/Jaccard), auto-reopens a cluster on a possible-regression merge, and flips each processed item unprocessed→processing. Appends LOCAL JSONL only — no external action, no force-close of a curated cluster. Dev-gated dark (feedbackFactory.processing): LIVE on a development agent, the route 503s on the fleet so this job exits silently. Tier-1 supervised (this haiku job wraps the deterministic endpoint and sanity-checks the pass result against the post-pass stats). Spec docs/specs/feedback-factory-migration.md §191 (the wiring that makes the ported processor not dead code)."
2
+ name: Feedback-Factory Operating Drain
3
+ description: "Cadenced end-to-end feedback drain. POST /feedback-factory/drain/tick clusters canonical input, runs registered frontier-model readiness judgment inside deterministic floors, enqueues one durable outbox row per readiness epoch, and—after separate consumer promotion—creates and reads back one Initiative task. Development-agent processing/drain is live; fleet remains dark; consumer ships simulation-first. Spec: docs/specs/feedback-factory-operating-drain.md."
4
4
  schedule: "*/30 * * * *"
5
5
  priority: low
6
6
  expectedDurationMinutes: 2
7
7
  model: haiku
8
8
  supervision: tier1
9
- enabled: false
9
+ enabled: true
10
10
  tags:
11
11
  - cat:feedback-factory
12
12
  - role:worker
@@ -16,20 +16,21 @@ toolAllowlist: "*"
16
16
  unrestrictedTools: true
17
17
  mcpAccess: none
18
18
  ---
19
- Run one feedback-factory clustering pass. This is a mechanical, near-silent watchdog — do NOT message the user. It exists because the canonical store ingests new fleet reports continuously, but nothing clusters/triages them without a production trigger; this job IS that trigger on a cadence.
19
+ Run one feedback-factory operating-drain tick. This is a near-silent operated cadence — do NOT message the user. The server owns every transition; this job only triggers and sanity-checks one bounded run.
20
20
 
21
21
  AUTH="${INSTAR_AUTH_TOKEN:-$(python3 -c "import json; v=json.load(open('.instar/config.json')).get('authToken',''); print(v if isinstance(v, str) else '')" 2>/dev/null)}"
22
22
  AGENT_ID="${INSTAR_AGENT_ID:-$(python3 -c "import json; print(json.load(open('.instar/config.json')).get('projectName',''))" 2>/dev/null)}"
23
23
  PORT="${INSTAR_PORT:-4042}"
24
+ NONCE="feedback-drain-$(date +%s)-$$"
24
25
 
25
- 1. Confirm the capability is live. Read the stats first:
26
- `curl -s -H "Authorization: Bearer $AUTH" -H "X-Instar-AgentId: $AGENT_ID" http://localhost:$PORT/feedback-factory/stats`
27
- A 503 means the feature is dark for this agent (`feedbackFactory.processing` gated off) — exit silently, there is nothing to do. On 200 the body is `{ total, byStatus, clusterCount, dispatchCount, lastWriteAt }`. Note `byStatus.unprocessed` — that is the work in front of this pass.
26
+ 1. Confirm the operated drain is live:
27
+ `curl -s -H "Authorization: Bearer $AUTH" -H "X-Instar-AgentId: $AGENT_ID" http://localhost:$PORT/feedback-factory/drain/status`
28
+ A 503 is expected only on a fleet-dark install. Read `.instar/config.json`: if `developmentAgent` is not true, exit silently. If it is true, a 503 is degradation—fail this job run so JobRun history and the server audit expose it; never treat it as healthy.
28
29
 
29
- 2. Trigger one clustering pass:
30
- `curl -s -X POST -H "Authorization: Bearer $AUTH" -H "X-Instar-AgentId: $AGENT_ID" http://localhost:$PORT/feedback-factory/process`
31
- The response is `{ processed, metrics: { captured, created, merged, reopened }, stats: { total, byStatus, clusterCount, dispatchCount, lastWriteAt } }`. The endpoint does the deterministic work: it reads unprocessed items + active clusters, decides merge/create per item (parity'd logic), auto-reopens on a possible-regression merge, and marks each item processed. It appends LOCAL JSONL only — it takes no external action and never force-closes a curated cluster.
30
+ 2. Trigger one bounded drain tick:
31
+ `curl -s -X POST -H "Authorization: Bearer $AUTH" -H "X-Instar-AgentId: $AGENT_ID" -H "X-Instar-Request: 1" -H "X-Instar-Request-Nonce: $NONCE" http://localhost:$PORT/feedback-factory/drain/tick`
32
+ A 202 response reports `{ runId, accepted, reason? }`. Concurrent triggers return the active run rather than starting a second writer. Poll the status route, bounded to 90 seconds, until `lastRun.runId` matches and `lastRun.state` is no longer `accepted` or `running`; never start a second tick while polling.
32
33
 
33
- 3. **Tier-1 supervision (your job).** Sanity-check the pass against its own stats before concluding: `processed` should equal the number of items that were `unprocessed` going in (step 1's `byStatus.unprocessed`), and the post-pass `stats.byStatus.unprocessed` should have dropped by `processed`. `created + merged` from `metrics` should account for the processed items. If the numbers are internally inconsistent (e.g. `processed > 0` but `unprocessed` did not drop), do NOT retry-flood — note it once and exit; the next tick re-attempts.
34
+ 3. **Tier-1 supervision.** Accept terminal `succeeded` and `no-op`. A `degraded` run must carry a nonempty reason. Never retry in the same run; the durable queue and next cadence own retry. In simulation, canonical claimed/completed counts must not advance. In live mode, completed may never exceed the durable claimed/linked history or the configured batch bound.
34
35
 
35
- 4. Exit silently. This job is just the cadence — it produces dedup-cluster signals, not user messages. Do NOT relay anything to Telegram and do NOT summarize. If a curl fails, that failure is itself recorded server-side; do not retry-flood.
36
+ 4. Exit silently. Do NOT relay anything to Telegram and do NOT summarize. The drain's durable run row, metrics, and bounded self-heal/attention path own observability.
@@ -1680,6 +1680,10 @@ A proactive backstop that posts ONE purely-observational liveness line when an a
1680
1680
  - **It can't spam you (three LOCAL brakes, NOT dedup):** a long user-silence gate that ANY outbound (including your own normal reply) resets; a per-topic emit-cooldown; and a widening per-run backoff (25→40→60→90m) with a hard cap (~6 lines per run). A 24h silent-but-working run yields a handful of hedged lines, never dozens. Output advancing proves only LIVENESS, never that work is progressing (a log/retry loop also advances output) — which is exactly why the wording is liveness-only.
1681
1681
  - **Signal-only:** it only ever ADDS a line — never blocks, delays, or rewrites your real messages. Every predicate fails CLOSED (no emit) on any uncertainty (can't read history, the shared snapshot is unavailable, the run is mid-move to another machine). The interpolated \`focus\` is scrubbed for credentials/secrets/paths (drop-to-generic on any match), length-clamped, and HTML-escaped before it's ever shown.
1682
1682
  - **Status:** \`curl -H "Authorization: Bearer $AUTH" http://localhost:4042/autonomous-heartbeat\` → \`{ enabled, dryRun, silenceThresholdMinutes, lastTickAt, topicsConsidered, lastEmits }\` (503 when dark). Ships dark on the fleet + \`dryRun: true\` on a dev agent (logs "would emit" on the SAME cooldown/budget as live). Tune/disable: \`monitoring.autonomousHeartbeat\` (\`dryRun\`, \`silenceThresholdMinutes\`, \`tickIntervalMs\`, \`maxHeartbeatsPerRun\`). Spec: \`docs/specs/autonomous-progress-heartbeat.md\`.
1683
+
1684
+ ## Autonomous Throughput Floor
1685
+
1686
+ A pull/audit-only view measures project PR movement and manager outbound silence for active autonomous runs. It never notifies, dispatches, remediates, or creates attention. Read \`GET /autonomous/throughput-floor\` when investigating a quiet run. HOLD still requires an actual open approval gate plus authoritative saturation of every non-gated lane; v1 has no lane authority and cannot grant HOLD. A proactive surface is follow-on work gated on a separately converged SelfHealGate.
1683
1687
  `;
1684
1688
 
1685
1689
  if (hasTelegram) {
@@ -0,0 +1,19 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ Feedback Factory now has an operated, development-gated end-to-end drain: bounded incremental source projection and clustering, registered frontier-model agent readiness, a durable fenced queue, simulation-first consumer promotion, and exact-key Initiative handoff with crash recovery. Canonical accepted-intake pipelines also gain a registered completeness standard plus structural and runtime evidence guards, so future pipelines cannot silently stop after persistence.
9
+
10
+ ## What to Tell Your User
11
+
12
+ Feedback Factory can now carry accepted feedback all the way into durable, agent-approved work while staying simulated until its consumer is deliberately promoted.
13
+
14
+ ## Summary of New Capabilities
15
+
16
+ - Operated feedback intake, clustering, readiness approval, queueing, and Initiative handoff.
17
+ - Agent-first frontier-model readiness decisions with a human escalation path.
18
+ - Fenced ownership, cancellation, backup and restore, failover recovery, and bounded self-healing.
19
+ - A dashboard view for backlog, readiness, consumer posture, and recovery health.
@@ -0,0 +1,30 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ Adds a fleet-dark, pull/audit-only view for active autonomous runs. It measures bounded project PR
9
+ movement and manager outbound silence, persists a restart-safe per-run read breaker, and exposes the
10
+ scrubbed result at `GET /autonomous/throughput-floor` for the dashboard and operator.
11
+
12
+ It does not notify, create attention, dispatch, restart, remediate, or mutate a repository or run.
13
+ Missing or uncertain evidence is reported as unknown/ineligible. Proactive attention is explicitly
14
+ follow-on work gated on a separately converged SelfHealGate.
15
+
16
+ ## What to Tell Your User
17
+
18
+ There is now a read-only dashboard observation for autonomous runs that have shown neither project PR
19
+ movement nor manager communication. It does not send alerts or change the run.
20
+
21
+ ## Summary of New Capabilities
22
+
23
+ - Pull scrubbed per-run throughput observations from the Machines dashboard or authenticated API.
24
+ - Retain the observation baseline and bounded-read breaker across server restarts.
25
+
26
+ ## Evidence
27
+
28
+ - Unit coverage for deliverable semantics, dual-clock flatline, fresh baseline, and restart breaker.
29
+ - Authenticated route integration coverage.
30
+ - Lifecycle ratchet proving there is no self-action/governor or action-bearing source seam.
@@ -0,0 +1,36 @@
1
+ # Side-effects review: Autonomous Throughput Floor
2
+
3
+ ## Changed
4
+
5
+ - Adds bounded Git/GitHub and Telegram-history reads for eligible single-machine autonomous runs.
6
+ - Adds one constant-size 0600 machine-local sidecar per run plus a scrubbed JSONL audit row.
7
+ - Adds authenticated `GET /autonomous/throughput-floor` and dashboard consumption of that pull surface.
8
+ - Adds fleet-dark config, migration, guard posture, agent awareness, and release documentation.
9
+
10
+ ## Explicitly unchanged
11
+
12
+ - No Telegram or Slack message, attention item, notification, A2A message, dispatch, restart, remediation,
13
+ scheduler mutation, PR mutation, git fetch/checkout, or route write is possible from this feature.
14
+ - No personal SSH, repository worktree, conversation content, autonomous run document, or pairing state is written.
15
+ - HOLD authority is not added. Missing lane-saturation truth remains false/unavailable.
16
+
17
+ ## Resource and failure posture
18
+
19
+ - One tick at a time; PR/history bounds are fixed; failures back off 15m/30m/60m then open a persisted 6h breaker.
20
+ - Missing/corrupt/future state, incomplete history, invalid scope, moves, and multi-machine runs fail to
21
+ `unknown`/`ineligible`, never to a flatline claim.
22
+ - Audit/status expose only ids, durations, decision/failure enums, and timestamps—no raw messages, stderr,
23
+ repository paths, URLs, refs, or PR prose.
24
+ - The append-only observation audit is explicitly registered as machine-local state with bounded streamed
25
+ retention; the source annotation binds the write site to that declaration without changing runtime behavior.
26
+ - Expected bounded-read and fleet-dark initialization failures carry explicit fallback annotations: reads fail
27
+ closed to `unknown`, breaker accounting remains durable, and initialization failure is logged.
28
+ - The hand-authored dark-gate attribution map is advanced by the five ConfigDefaults lines introduced by this
29
+ feature; its 25-path set is unchanged, and the real-default resolver test verifies every attribution.
30
+
31
+ ## Follow-on gate
32
+
33
+ Proactive attention is not part of this change. It is named only as follow-on work gated on a separately
34
+ converged SelfHealGate; there is no dormant config path or callback that can enable it.
35
+
36
+ Decision-audit evidence is carried with the implementation commit and covers every behavior-changing file.
@@ -0,0 +1,110 @@
1
+ # Side-Effects Review — Feedback Factory Operating Drain
2
+
3
+ **Version / slug:** `feedback-factory-operating-drain`
4
+ **Date:** `2026-07-20`
5
+ **Author:** `Instar-codey`
6
+ **Second-pass reviewer:** required — durable queue, model authority, PIN mutations, multi-process fencing, and canonical-pipeline guard
7
+ **Status:** Concurred after correction-pass re-review. The independent reviewer initially withheld concurrence across ownership, source-generation, isolation, scrubbing, authority-failure, API, performance, cancellation, and restore/failover boundaries. Each finding received a concrete fix and positive/negative control; the final re-review concurred.
8
+
9
+ ## Summary and decision points
10
+
11
+ This change registers Canonical Pipeline Operational Completeness and its structural/runtime evidence guards, then completes the Feedback Factory path from canonical report storage through bounded clustering, registered frontier-model readiness, a fenced SQLite outbox, and exact-key Initiative handoff. Development processing/drain defaults live; the consumer remains simulation-only until a durable PIN-approved promotion. Fleet defaults remain dark.
12
+
13
+ Decision points added or changed:
14
+
15
+ - Canonical-pipeline declaration coverage: deterministic structural signal; CI can reject missing declarations/citations, not semantic product decisions.
16
+ - Feedback readiness: a registered frontier-model Instar agent is the default bounded authority. Deterministic evidence, identity, generation, model/provider, prompt/schema, confidence, spend, and injection floors constrain it. Human authority is escalation/break-glass only.
17
+ - Consumer promotion, authority mutation, and break-glass hold: PIN-rooted operator authority with mutation intent and same-origin checks. A registered agent may release only after the named deterministic source/projection/authority predicate passes.
18
+ - Queue claim/ack: deterministic SQLite lease/token/owner-epoch authority.
19
+ - Generated-default drift is visible through posture and startup diagnostics but is not automatically repaired in this landing. Runtime recovery is deferred to the separately converged reusable SelfHealGate/P19 foundation lane; this PR contains no feature-local retry engine.
20
+
21
+ ## 1. Over-block
22
+
23
+ - A valid agent readiness batch is refused if its registered provider/model family or prompt/schema canary differs from the resolved runtime. This is intentional fail-closed behavior; the cluster remains collecting rather than disappearing.
24
+ - A legitimate retry with a reused request nonce is rejected. The scheduled job creates a new bounded nonce each invocation; a rejected replay does not mutate state.
25
+ - A non-holder machine cannot admit local work; each mutating/ack stage is re-fenced against the live lease epoch, and request replay protection is durable across restart. The correction pass adds the authenticated one-hop owner proxy and exercises its refusal/replay path before concurrence.
26
+ - Corrupt, truncated, or generation-drifted source projection holds progress. It does not guess an offset or manufacture readiness.
27
+
28
+ ## 2. Under-block
29
+
30
+ - Metadata-only readiness can still approve work whose underlying product interpretation later proves wrong. Completion means only that a readable Initiative handoff exists; it never closes the legacy cluster or claims the product fix is complete.
31
+ - The title-level injection detector is a deterministic floor, not a complete semantic detector. The frontier model is also instructed to treat all packet fields as untrusted; output is constrained and cannot emit `held`.
32
+ - Novel or obfuscated sensitive content outside the deterministic credential-pattern floor could still reach bounded metadata. Raw report bodies remain excluded entirely, and known credential shapes are scrubbed before queue persistence.
33
+
34
+ ## 3. Level-of-abstraction fit
35
+
36
+ - Pipeline completeness lives in one typed intake registry plus one manifest, not scattered comments.
37
+ - Runtime evidence is separate from structural lint: constructed consumer, enabled cadence, effective idempotency, progress, and real read-back have their own verifier/E2E.
38
+ - SQLite owns cross-store queue truth, leases, authority generations, audit, source cursor/checksums, and artifact links. InitiativeTracker owns the user-visible artifact. The boundary is an idempotent saga, not a fake distributed transaction.
39
+ - The existing FeedbackProcessingService and InitiativeTracker are extended instead of replaced.
40
+
41
+ ## 4. Signal vs authority compliance
42
+
43
+ Compliant with `docs/signal-vs-authority.md`.
44
+
45
+ - Structural and runtime pipeline guards produce deterministic evidence about construction/completeness; they do not decide product readiness.
46
+ - The readiness judgment is explicitly routed to a registered frontier-model authority with provenance and deterministic floors.
47
+ - The model cannot hold or clear a hold by judgment. Corruption/integrity logic and the PIN-rooted human break-glass surface own hold; a registered agent can release only when the named deterministic revalidation predicate independently passes.
48
+ - Consumer promotion remains an operator decision, separate from agent readiness approval.
49
+
50
+ ## 5. Interactions and feedback loops
51
+
52
+ - Concurrent ticks collapse onto one durable active run; concurrent OS processes converge through SQLite uniqueness and busy fencing.
53
+ - Repeated readiness/enqueue/consume uses exact keys, so cadence retries do not multiply work or Initiatives.
54
+ - A crash after Initiative creation re-reads by `feedbackWorkKey` and completes the same work; it never recreates the artifact.
55
+ - Simulation clones a bounded queue snapshot into a separate ephemeral SQLite database and exercises the real claim/link/ack FSM there; canonical attempts, leases, retry times, dead letters, bytes, and artifacts remain untouched.
56
+ - Source compaction is serialized with all append writers, fsyncs the next immutable generation and checksummed handoff manifest, retains the old generation, and requires the durable SQLite tail cursor to acknowledge the exact boundary before following it. Before/after append, projection/cursor transaction, and manifest publication crash points replay without duplicate projection.
57
+ - Spend, batch, attempt, lease, due-review, source-projection, reconciliation, and full-tick work are bounded. No self-triggering loop schedules another tick.
58
+ - Cancellation is durable and owner-fenced, is observed only at explicit stage boundaries, and intentionally abandons the run without entering the self-heal loop. Terminal history pruning is owner-fenced, capped at 500 rows per tick, and preserves immutable idempotency tombstones.
59
+ - Production source compaction is stage-budgeted on a durable 24-hour cadence. The first observation establishes the baseline instead of compacting a large historical source at startup; empty generations are not rotated.
60
+ - The feedback job is enabled on development agents and treats an unexpected dev 503 as degradation, preventing silent “healthy” darkness.
61
+
62
+ ## 6. External and operator surfaces
63
+
64
+ - New authenticated status/tick, run-cancellation, bounded backlog-analysis, failover-finalization, authority, promotion/revoke, and break-glass hold/release routes.
65
+ - Normal readiness ticks require Bearer auth, registered `X-Instar-AgentId`, mutation intent, and a one-use bounded nonce; no PIN or human readiness mutation is required.
66
+ - Operator mutations require PIN, `X-Instar-Request`, same-origin when an Origin is present, and the existing durable PIN-attempt brake.
67
+ - Responses expose bounded identifiers/counts/state only; raw report bodies, prompts, transcripts, credentials, and claim tokens are absent.
68
+ - Historical backlog analysis is metadata-only, registered-agent/nonce bound, capped by the authority batch limit (and an absolute 100-row ceiling), and cannot classify or dispatch work.
69
+ - The standing operator surface remains the phone-capable dashboard/API control plane. Primary actions are promotion/revocation and break-glass repair; destructive state deletion is not exposed. No raw filesystem paths or internal stack traces are returned. Phone-width behavior inherits the existing dashboard/API controls; no new desktop-only flow is introduced.
70
+
71
+ ## 7. Multi-machine posture
72
+
73
+ **Cluster-shared, canonical-holder writes with authenticated one-hop forwarding.** The mutating routes are registered `cluster-shared` in `WriteDomainRegistry`; the canonical host owns the local SQLite DB, source cursor, authority generation, promotion record, and Initiative handoff. Peer machines do not self-elect or run competing drains. Live lease epochs fence admission, stage heartbeats, claims, retries, and artifact acknowledgement. Backup recursively includes the operated feedback directory. PIN-rooted failover finalization verifies the successor epoch, restores/increments the durable owner epoch, reconciles Initiative links by immutable `feedbackWorkKey`, and forces a checkpointed failover backup before cadence resumes. The destructive restore fixture removes the entire operated state directory and rejects stale claims after restoration.
74
+
75
+ A destructively restored snapshot boots in `restorePending`: canonical ownership, ticks/proxying, backup cadence, nonce admission, cancellation, authority/readiness mutations, and consumer promotion/revocation remain fenced until checksum-bound PIN finalization succeeds. Routine same-file checkpoint restart remains live. The restore fixture proves pre-finalization database, promotion, run/work, and Initiative invariance and post-finalization successor activation.
76
+
77
+ ## 6b. Operator-surface quality
78
+
79
+ The dashboard addition is a read-only Feedback Drain status tab; it adds no operator mutation or destructive action.
80
+
81
+ 1. **Leads with the primary action:** yes. The tab opens directly on the current drain posture, followed by backlog, progress, and source-integrity summaries; no explanatory toggle hides the status.
82
+ 2. **Zero raw internals as primary content:** yes. The primary content uses plain state labels and bounded counts/ages. It does not render JSON, hashes, fingerprints, UUIDs, file paths, or claim tokens.
83
+ 3. **Destructive actions de-emphasized:** yes. There are no destructive or mutating actions in this surface.
84
+ 4. **Plain language + phone width:** yes. The tab reuses the existing responsive Process Health card layout, vertically stacks its three short sections, uses normal dashboard tap targets, and introduces no table, fixed width, horizontal scroll, or truncated identifier column.
85
+
86
+ ## 8. Rollback cost
87
+
88
+ - Immediate rollback: disable `feedbackFactory.drain.enabled`; processing can remain independently available. Disable/revoke the consumer promotion to return to simulation without deleting queue state.
89
+ - Revoke the authority generation to stop readiness decisions while preserving every audit row.
90
+ - Reverting code leaves additive SQLite tables and optional Initiative fields readable/ignorable; no destructive migration is required.
91
+ - Fleet is dark by default, bounding blast radius to development agents until an explicit future promotion.
92
+
93
+ ## Verification evidence
94
+
95
+ - Repository-wide delivery ratchets classify the dashboard tab on the glance floor, account for the process-lifetime SQLite handle, declare cancellation and failover as cluster-shared writes, preserve the keyword-intent baseline, and keep the no-silent-fallback baseline unchanged.
96
+ - Structural guard negative fixtures: missing intake/stage/owner/handoff/cadence/metrics/citation/CI collection.
97
+ - Runtime guard negative fixtures: unconstructed consumer, disabled cadence, ineffective idempotency, missing progress, fake wiring.
98
+ - Unit/integration: authority generations/restore/spend/demotion/canaries, proposal-set nonce binding, token fencing, stale owner epochs, exact idempotency, isolated simulation, crash-after-artifact recovery, source append/projection/handoff crash recovery, generated-default/posture visibility, cancellation boundaries, retention tombstones, backlog analysis, write-domain census, and destructive restore/failover finalization.
99
+ - E2E: canonical feedback intake records are projected and clustered by the real processing service, then traverse real AgentServer + SQLite + InitiativeTracker with no PIN on normal agent readiness.
100
+ - Multi-process/machine: two real OS processes create exactly one work/link pair; two conflicting approval writers create one approval plus an integrity hold; concurrent append+compaction loses no accepted source row. A separate network fixture uses two state trees, two SQLite/Initiative stores, asymmetric Ed25519 identities, real HTTP/fetch, and real services to prove only the registry owner executes and stale epoch/owner envelopes cannot mutate either side.
101
+ - Performance: one real drain tick over a 150,000-row source under concurrent ingest projects/processes 500, performs readiness/enqueue/live bounded consumption, proves the oldest pre-existing eligible row is claimed first within one tick, stays under 90 seconds and 512 MiB, and exposes remaining lag.
102
+ - CI correction: the destructive-restore fixture copies the exact checkpoint-authenticated SQLite bytes before close, and restored-file identity includes birth time as well as device/inode because Linux may immediately recycle a deleted inode. This preserves the production checksum/identity guard while distinguishing a real replacement from routine reopen. The operated-drain initialization fallback is explicitly annotated because it logs, exposes unavailable posture, and raises an urgent item for integrity failures. The exact push-config shard-4 invocation passes the destructive-restore case.
103
+
104
+ ## Second-pass review
105
+
106
+ Independent correction-pass review: **CONCUR**. The final review inspected the shared restore-pending gate, destructive restore invariance, checksum/identity-bound finalization, routine restart distinction, stale-owner fencing, and in-flight cancellation linkage, and ran the focused high-risk fixtures green.
107
+
108
+ ## Class-Closure Declaration
109
+
110
+ No feedback-drain self-action controller ships in this landing. Runtime recovery is owned by the separately tracked shared SelfHealGate/P19 foundation lane, so this feature does not claim an unbounded-self-action closure.