loki-mode 11.2.2 → 11.3.1
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.
- package/README.md +68 -650
- package/SKILL.md +4 -4
- package/VERSION +1 -1
- package/autonomy/completion-council.sh +2 -2
- package/autonomy/context-tracker.py +4 -4
- package/autonomy/council-v2.sh +1 -1
- package/autonomy/grill.sh +1 -1
- package/autonomy/lib/done-recognition.sh +1 -1
- package/autonomy/lib/prd-enrich.sh +1 -1
- package/autonomy/lib/skill-link-heal.sh +78 -1
- package/autonomy/lib/voter-agents.sh +1 -1
- package/autonomy/loki +99 -75
- package/autonomy/run.sh +30 -18
- package/autonomy/sandbox.sh +1 -1
- package/autonomy/tui.sh +6 -5
- package/autonomy/verify.sh +1 -1
- package/bin/loki +166 -59
- package/completions/_loki +2 -0
- package/completions/loki.bash +2 -2
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +25 -31
- package/docs/ARCHITECTURE.md +337 -0
- package/docs/BRANDING.md +124 -0
- package/docs/CLI-REFERENCE.md +7 -1
- package/docs/COMPONENTS.md +447 -0
- package/docs/DEPLOYMENT.md +9 -9
- package/docs/DOCKER.md +469 -0
- package/docs/INSTALLATION.md +67 -1045
- package/docs/KNOWN-ISSUES.md +11 -35
- package/docs/TESTING.md +161 -0
- package/docs/air-gapped.md +1 -2
- package/docs/alternative-installations.md +14 -24
- package/docs/architecture/DECISIONS.md +333 -0
- package/docs/audit-logging.md +7 -7
- package/docs/authentication.md +3 -3
- package/docs/authorization.md +1 -1
- package/docs/certification/04-production-deployment/lab.md +6 -6
- package/docs/certification/04-production-deployment/lesson.md +4 -4
- package/docs/certification/README.md +1 -1
- package/docs/control-plane-container.md +2 -2
- package/docs/dev/real-run.md +34 -0
- package/docs/dev/release-checklist.md +2 -2
- package/docs/exit-codes.md +3 -3
- package/docs/git-workflow.md +3 -3
- package/docs/metrics.md +37 -55
- package/docs/network-security.md +1 -1
- package/docs/siem-integration.md +5 -5
- package/docs/v10/CLI-MODERN.md +4 -3
- package/docs/v10/DECISIONS.md +44 -0
- package/docs/v10/DEPS.md +22 -22
- package/docs/v10/ENGINE.md +1 -1
- package/docs/v10/FAILURE-CLASSES.md +129 -1
- package/docs/v10/FOUNDER-QUEUE.md +1 -0
- package/docs/v10/GUARDS.md +13 -0
- package/docs/v10/LEGACY-REMOVAL.md +4 -6
- package/docs/v10/METRICS.md +2 -2
- package/docs/v10/MODERNIZE.md +1 -1
- package/docs/v10/OPERATING-MODEL.md +2 -1
- package/docs/v10/PROGRESS.md +29 -0
- package/docs/v11/COST-HALF.md +352 -0
- package/docs/v11/MARKET-SLICES.md +315 -0
- package/docs/v11/REGISTRIES.md +730 -0
- package/loki-ts/data/model-pricing.json +52 -24
- package/loki-ts/dist/loki.js +1036 -957
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/packages/control-plane/dist/server.js +2467 -736
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/src/protocols/mcp-client.js +6 -2
- package/src/protocols/mcp-server.js +13 -3
- package/tools/audit-docs.py +1 -1
- package/web-app/dist/assets/{AdminPage-C-iMLNxe.js → AdminPage-CMkHNJbF.js} +1 -1
- package/web-app/dist/assets/{Avatar-C7VUvwsO.js → Avatar-BJyjV7Zi.js} +1 -1
- package/web-app/dist/assets/{Badge-tGvQEhnw.js → Badge-D572l0uq.js} +1 -1
- package/web-app/dist/assets/{Button-_iHlH_yL.js → Button-T4BnOZgl.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-J_nNjbcR.js → CockpitPage-Cj_GFsNn.js} +1 -1
- package/web-app/dist/assets/{ComparePage-B05ui6Xt.js → ComparePage-A8m4ZXak.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-Bxex6DLn.js → ErrorBoundary-hugCg5yg.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-BsgWfdD1.js → EvidenceReceiptPanel-CuJKDC2G.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-DZBhZ8_X.js → GitHubIssuesPanel-BYGKjarC.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BaxlAl6R.js → GitHubPRsPanel-c7sFIJlf.js} +1 -1
- package/web-app/dist/assets/{HomePage-mVJvzqbF.js → HomePage-A1MIkG2P.js} +2 -2
- package/web-app/dist/assets/{LoginPage-B0zd4A_G.js → LoginPage-8KQMRhtR.js} +1 -1
- package/web-app/dist/assets/{MagicPage-DXLQ-y_R.js → MagicPage-C05QW2Lx.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-CLS34Xvr.js → MetricsPage-Oukv5hme.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-BXG8PbNV.js → NotFoundPage-DKIwsawz.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-D3kFFC0F.js → ProjectPage-DwFRPLCG.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-2bFn-gnC.js → ProjectsPage-CgY4YYDX.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-CBM0ziWE.js → SettingsPage-BpfcSjUA.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-BTaXhjI3.js → ShowcasePage-BqBakC4K.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-BrC2hyAr.js → SystemSettingsPage-CZLu5VB0.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-oqxdbVbY.js → TeamsPage-D55S1jKz.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CEbUIY21.js → TemplatesPage-D3SydvxN.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-aIoWLbJA.js → TerminalOutput-hNg8G1-e.js} +1 -1
- package/web-app/dist/assets/{activity-CPyi45gt.js → activity-D2C0VagO.js} +1 -1
- package/web-app/dist/assets/{bell-BhaNBaJp.js → bell-CMvYi36w.js} +1 -1
- package/web-app/dist/assets/{bot-Da8REaEP.js → bot-BvtQ6lmo.js} +1 -1
- package/web-app/dist/assets/{check-DPj99ArM.js → check-B13xkXed.js} +1 -1
- package/web-app/dist/assets/{chevron-left-CkxonN0X.js → chevron-left-emu6r49E.js} +1 -1
- package/web-app/dist/assets/{circle-alert-C0JkB1y5.js → circle-alert-CExlwjuy.js} +1 -1
- package/web-app/dist/assets/{clock-COzFIiWi.js → clock-D7Uas3oL.js} +1 -1
- package/web-app/dist/assets/{cloud-bjkac4kn.js → cloud-CkB4S86C.js} +1 -1
- package/web-app/dist/assets/{code-xml-hlKlvXUJ.js → code-xml-SL9IIWIn.js} +1 -1
- package/web-app/dist/assets/{database-D555S5Km.js → database-BQFkd7t1.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-CVcApzcD.js → dollar-sign-qHmnNYsU.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-UORaMIcO.js → file-code-corner-C2YUDP0K.js} +1 -1
- package/web-app/dist/assets/{file-plus-ALJtDoI2.js → file-plus-C_ooIkDe.js} +1 -1
- package/web-app/dist/assets/{globe-CPlrM_IC.js → globe-CQ-GL485.js} +1 -1
- package/web-app/dist/assets/{hammer-qaGZHpja.js → hammer-U05L_D7V.js} +1 -1
- package/web-app/dist/assets/{index-BcXljIAO.js → index-CooHd7I-.js} +3 -3
- package/web-app/dist/assets/{layers-BV8R9VUK.js → layers-Buo17rjW.js} +1 -1
- package/web-app/dist/assets/{loader-circle-6TlDS9Tu.js → loader-circle-15vK3oV1.js} +1 -1
- package/web-app/dist/assets/{lock-B9t6oWI0.js → lock-BeXLebuJ.js} +1 -1
- package/web-app/dist/assets/{package-2gEUAtZJ.js → package-MVh_6-6R.js} +1 -1
- package/web-app/dist/assets/{plus-DXocxPjU.js → plus-Dh_nd9vS.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-D3dWHBd6.js → refresh-cw-C9cBJEAT.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-CvuWqaSB.js → rotate-ccw-D3PAtzST.js} +1 -1
- package/web-app/dist/assets/{scroll-text-ktmD_xJY.js → scroll-text-DZCoXQjo.js} +1 -1
- package/web-app/dist/assets/{server-E7pZtj5A.js → server-OCOLI5J_.js} +1 -1
- package/web-app/dist/assets/{shield-alert-968j9z0V.js → shield-alert-oVhmf1_h.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-Tz_8rpU_.js → thumbs-up-B-kbX4vN.js} +1 -1
- package/web-app/dist/assets/{trash-2-Drh9IIj8.js → trash-2-EL6moveW.js} +1 -1
- package/web-app/dist/assets/{trending-down-DCQXtVSL.js → trending-down-Cl3kjpsx.js} +1 -1
- package/web-app/dist/assets/{trending-up-BIiwQbWV.js → trending-up-DST7I6M2.js} +1 -1
- package/web-app/dist/assets/{upload-sCbPkfmy.js → upload-CUOT780G.js} +1 -1
- package/web-app/dist/assets/{usePolling-BMIg6ZVT.js → usePolling-Djmt90eb.js} +1 -1
- package/web-app/dist/assets/{user-kGzXC3V2.js → user-BRBohA6J.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
- package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
- package/docs/COCKPIT-SPEC.md +0 -72
- package/docs/COCKPIT-UX-MANDATE.md +0 -53
- package/docs/COMPETITIVE-ANALYSIS.md +0 -303
- package/docs/COMPETITIVE-NEXT-10.md +0 -316
- package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
- package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
- package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
- package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
- package/docs/DEMOS.md +0 -63
- package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
- package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
- package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
- package/docs/GATE-FAILURE-TRIAGE.md +0 -254
- package/docs/HANDOFF-2026-08-03.md +0 -439
- package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
- package/docs/LOOP-HARNESS-AUDIT.md +0 -684
- package/docs/MERGE-DEDUP-MAP.md +0 -420
- package/docs/MERGE-ROUTE-MAP.md +0 -139
- package/docs/MODEL-REGISTRY-PLAN.md +0 -155
- package/docs/OUTCOME-FRONTIER.md +0 -536
- package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
- package/docs/PLANS-INDEX.md +0 -32
- package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
- package/docs/PROMPT-ABLATION-RESULT.md +0 -97
- package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
- package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
- package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
- package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
- package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
- package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
- package/docs/RARV-C-100X-PLAN.md +0 -286
- package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
- package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
- package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
- package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
- package/docs/STALE-STATE-AUDIT.md +0 -174
- package/docs/SYNERGY-TASKS.md +0 -143
- package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
- package/docs/TOP-100-BACKLOG.md +0 -159
- package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
- package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
- package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
- package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
- package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
- package/docs/WELCOME-OPENER-PLAN.md +0 -106
- package/docs/adoption-baseline-2026-07-31.md +0 -84
- package/docs/architecture/bmad-integration-epic.md +0 -271
- package/docs/architecture/bmad-integration-review.md +0 -86
- package/docs/architecture/bmad-integration-validation.md +0 -249
- package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
- package/docs/auto-claude-comparison.md +0 -250
- package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
- package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
- package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
- package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
- package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
- package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
- package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
- package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
- package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
- package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
- package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
- package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
- package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
- package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
- package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
- package/docs/bug-fixes/agent-19-code-review.md +0 -316
- package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
- package/docs/competitive/bolt-new-analysis.md +0 -579
- package/docs/competitive/emergence-others-analysis.md +0 -605
- package/docs/competitive/replit-lovable-analysis.md +0 -622
- package/docs/dashboard-guide.md +0 -487
- package/docs/enterprise/migration.md +0 -265
- package/docs/history/one-run-audit.md +0 -304
- package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
- package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
- package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
- package/docs/prd-purple-lab-ide.md +0 -152
- package/docs/prd-purple-lab-platform-v2.md +0 -223
- package/docs/prd-purple-lab-platform.md +0 -319
- package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
- package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
- package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
- package/docs/show-hn-post.md +0 -46
- package/docs/test-scenarios/enterprise-scenarios.md +0 -732
- package/docs/thick2thin.md +0 -173
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
# Loki Mode Migration Guide
|
|
2
|
-
|
|
3
|
-
## Upgrading from v5.50.0 to v5.51.0
|
|
4
|
-
|
|
5
|
-
### What Changed
|
|
6
|
-
|
|
7
|
-
v5.50.0 introduced the enterprise protocol layer (P0-1 through P0-9) as foundational infrastructure. v5.51.0 activates the P0.5 wiring that connects these components into a production-ready enterprise system, and adds new capabilities on top.
|
|
8
|
-
|
|
9
|
-
**Key difference:** In v5.50.0, enterprise features were implemented but required manual integration. In v5.51.0, setting an environment variable is sufficient to activate a feature end-to-end.
|
|
10
|
-
|
|
11
|
-
### Breaking Changes
|
|
12
|
-
|
|
13
|
-
**None.** All new features are opt-in via environment variables. Existing configurations continue to work without modification.
|
|
14
|
-
|
|
15
|
-
### New Features
|
|
16
|
-
|
|
17
|
-
#### Slack and Microsoft Teams Notifications
|
|
18
|
-
|
|
19
|
-
Real-time notifications for execution events, approval requests, and quality gate results.
|
|
20
|
-
|
|
21
|
-
| Feature | Env Var |
|
|
22
|
-
|---------|---------|
|
|
23
|
-
| Slack bot notifications | `LOKI_SLACK_BOT_TOKEN` |
|
|
24
|
-
| Slack webhook verification | `LOKI_SLACK_SIGNING_SECRET` |
|
|
25
|
-
| Teams webhook notifications | `LOKI_TEAMS_WEBHOOK_URL` |
|
|
26
|
-
| Teams webhook verification | `LOKI_TEAMS_WEBHOOK_SECRET` |
|
|
27
|
-
|
|
28
|
-
See `docs/enterprise/integration-cookbook.md` for setup guides.
|
|
29
|
-
|
|
30
|
-
#### Control Plane v2 API
|
|
31
|
-
|
|
32
|
-
New `/api/v2/` endpoints provide tenant-scoped resource management, run lifecycle control, and structured event timelines.
|
|
33
|
-
|
|
34
|
-
| Endpoint | Method | Description |
|
|
35
|
-
|----------|--------|-------------|
|
|
36
|
-
| `/api/v2/tenants` | GET, POST | List and create tenants |
|
|
37
|
-
| `/api/v2/tenants/:id` | GET, DELETE | Get or delete a tenant |
|
|
38
|
-
| `/api/v2/runs` | GET | List runs (filterable by project, status) |
|
|
39
|
-
| `/api/v2/runs/:id` | GET | Get run details |
|
|
40
|
-
| `/api/v2/runs/:id/cancel` | POST | Cancel a running execution |
|
|
41
|
-
| `/api/v2/runs/:id/replay` | POST | Replay a previous run |
|
|
42
|
-
| `/api/v2/runs/:id/timeline` | GET | Get run event timeline |
|
|
43
|
-
| `/api/v2/keys` | GET, POST | List and create API keys |
|
|
44
|
-
| `/api/v2/keys/:id/rotate` | POST | Rotate an API key |
|
|
45
|
-
| `/api/v2/keys/:id` | DELETE | Revoke an API key |
|
|
46
|
-
| `/api/v2/audit` | GET | Query audit logs |
|
|
47
|
-
| `/api/v2/audit/verify` | GET | Verify audit chain integrity |
|
|
48
|
-
|
|
49
|
-
The v1 API (`/api/`) continues to work unchanged. The v2 API adds tenant isolation, pagination, and structured error responses.
|
|
50
|
-
|
|
51
|
-
#### Python and TypeScript SDKs
|
|
52
|
-
|
|
53
|
-
Official SDKs for programmatic access to the Control Plane API.
|
|
54
|
-
|
|
55
|
-
**Python SDK (`loki-mode-sdk`):**
|
|
56
|
-
- Zero external dependencies (stdlib only)
|
|
57
|
-
- Synchronous client using `urllib`
|
|
58
|
-
- Type-safe dataclasses for all API resources
|
|
59
|
-
|
|
60
|
-
**TypeScript SDK (`loki-mode-sdk`):**
|
|
61
|
-
- Zero external dependencies (uses Node.js built-in `fetch`)
|
|
62
|
-
- Async/await API
|
|
63
|
-
- TypeScript interfaces for all resources
|
|
64
|
-
|
|
65
|
-
See `docs/enterprise/sdk-guide.md` for installation and usage.
|
|
66
|
-
|
|
67
|
-
### New Environment Variables
|
|
68
|
-
|
|
69
|
-
| Variable | Default | Description |
|
|
70
|
-
|----------|---------|-------------|
|
|
71
|
-
| `LOKI_SLACK_BOT_TOKEN` | (unset) | Slack Bot User OAuth Token |
|
|
72
|
-
| `LOKI_SLACK_SIGNING_SECRET` | (unset) | Slack request signing secret |
|
|
73
|
-
| `LOKI_SLACK_CHANNEL` | (unset) | Default Slack channel |
|
|
74
|
-
| `LOKI_SLACK_WEBHOOK_URL` | (unset) | Slack Incoming Webhook URL |
|
|
75
|
-
| `LOKI_TEAMS_WEBHOOK_URL` | (unset) | Teams Incoming Webhook URL |
|
|
76
|
-
| `LOKI_TEAMS_WEBHOOK_SECRET` | (unset) | Teams webhook shared secret |
|
|
77
|
-
| `LOKI_OIDC_ISSUER` | (unset) | OIDC identity provider URL |
|
|
78
|
-
| `LOKI_OIDC_CLIENT_ID` | (unset) | OIDC client ID |
|
|
79
|
-
| `LOKI_DASHBOARD_CORS` | localhost | Allowed CORS origins |
|
|
80
|
-
|
|
81
|
-
### Existing Environment Variables (Unchanged)
|
|
82
|
-
|
|
83
|
-
These variables from v5.50.0 continue to work identically:
|
|
84
|
-
|
|
85
|
-
| Variable | Default | Description |
|
|
86
|
-
|----------|---------|-------------|
|
|
87
|
-
| `LOKI_OTEL_ENDPOINT` | (unset) | OTLP/HTTP endpoint for traces and metrics |
|
|
88
|
-
| `LOKI_SERVICE_NAME` | `loki-mode` | Service name for OTEL resource |
|
|
89
|
-
| `LOKI_ENTERPRISE_AUTH` | (unset) | Enable token authentication |
|
|
90
|
-
| `LOKI_ENTERPRISE_AUDIT` | (unset) | Force-enable audit logging |
|
|
91
|
-
| `LOKI_AUDIT_DISABLED` | `false` | Disable audit logging |
|
|
92
|
-
| `LOKI_AUDIT_NO_INTEGRITY` | `false` | Disable hash chain integrity |
|
|
93
|
-
| `LOKI_AUDIT_MAX_SIZE_MB` | `10` | Audit log rotation size |
|
|
94
|
-
| `LOKI_AUDIT_MAX_FILES` | `10` | Max rotated audit files |
|
|
95
|
-
| `LOKI_AUDIT_SYSLOG_HOST` | (unset) | Syslog forwarding host |
|
|
96
|
-
| `LOKI_AUDIT_SYSLOG_PORT` | `514` | Syslog forwarding port |
|
|
97
|
-
| `LOKI_AUDIT_SYSLOG_PROTO` | `udp` | Syslog protocol |
|
|
98
|
-
| `LOKI_TLS_CERT` | (unset) | TLS certificate path |
|
|
99
|
-
| `LOKI_TLS_KEY` | (unset) | TLS key path |
|
|
100
|
-
| `LOKI_JIRA_URL` | (unset) | Jira Cloud base URL |
|
|
101
|
-
| `LOKI_JIRA_EMAIL` | (unset) | Jira user email for the API token |
|
|
102
|
-
| `LOKI_JIRA_TOKEN` | (unset) | Jira API token |
|
|
103
|
-
| `LOKI_JIRA_EPIC_KEY` | (unset) | Jira epic that run events sync to |
|
|
104
|
-
| `LOKI_LINEAR_TOKEN` | (unset) | Linear API key |
|
|
105
|
-
| `LOKI_LINEAR_TEAM_ID` | (unset) | Linear team ID |
|
|
106
|
-
| `LOKI_LINEAR_PROJECT_ID` | (unset) | Linear project that run events sync to |
|
|
107
|
-
| `LOKI_GITHUB_SYNC` | (unset) | Enable GitHub sync |
|
|
108
|
-
|
|
109
|
-
### API Changes
|
|
110
|
-
|
|
111
|
-
#### v2 API Additions
|
|
112
|
-
|
|
113
|
-
The v2 API is a superset of v1 with additional capabilities:
|
|
114
|
-
|
|
115
|
-
| v1 Endpoint | v2 Endpoint | Changes |
|
|
116
|
-
|-------------|-------------|---------|
|
|
117
|
-
| `/api/projects` | `/api/v2/projects` | Adds `tenant_id` filter |
|
|
118
|
-
| `/api/tasks` | `/api/v2/tasks` | Adds pagination (`limit`, `offset`) |
|
|
119
|
-
| `/api/status` | `/api/v2/status` | Adds enterprise feature status |
|
|
120
|
-
| (new) | `/api/v2/tenants` | Tenant management |
|
|
121
|
-
| (new) | `/api/v2/runs` | Run lifecycle management |
|
|
122
|
-
| (new) | `/api/v2/runs/:id/timeline` | Structured event timeline |
|
|
123
|
-
| (new) | `/api/v2/keys` | API key management |
|
|
124
|
-
| (new) | `/api/v2/keys/:id/rotate` | Key rotation with grace period |
|
|
125
|
-
| (new) | `/api/v2/audit` | Audit log queries |
|
|
126
|
-
| (new) | `/api/v2/audit/verify` | Chain integrity verification |
|
|
127
|
-
|
|
128
|
-
#### v1 API Compatibility
|
|
129
|
-
|
|
130
|
-
All v1 endpoints continue to work without changes. No deprecation is planned for v1 in this release.
|
|
131
|
-
|
|
132
|
-
### Database Schema Changes
|
|
133
|
-
|
|
134
|
-
v5.51.0 introduces new models for the Control Plane:
|
|
135
|
-
|
|
136
|
-
#### Tenant Model
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
Tenant
|
|
140
|
-
id: integer (primary key)
|
|
141
|
-
name: string (unique)
|
|
142
|
-
slug: string (unique, auto-generated)
|
|
143
|
-
description: string (optional)
|
|
144
|
-
created_at: datetime
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
#### Run Model
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
Run
|
|
151
|
-
id: integer (primary key)
|
|
152
|
-
project_id: integer (foreign key -> Project)
|
|
153
|
-
status: string (pending | running | completed | failed | cancelled)
|
|
154
|
-
trigger: string (manual | webhook | schedule)
|
|
155
|
-
config: json (optional)
|
|
156
|
-
started_at: datetime (optional)
|
|
157
|
-
ended_at: datetime (optional)
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
#### RunEvent Model
|
|
161
|
-
|
|
162
|
-
```
|
|
163
|
-
RunEvent
|
|
164
|
-
id: integer (primary key)
|
|
165
|
-
run_id: integer (foreign key -> Run)
|
|
166
|
-
event_type: string (phase_change | quality_gate | agent_action | error)
|
|
167
|
-
phase: string (optional, REASON | ACT | REFLECT | VERIFY)
|
|
168
|
-
details: json (optional)
|
|
169
|
-
timestamp: datetime
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Step-by-Step Upgrade Process
|
|
173
|
-
|
|
174
|
-
#### 1. Update Loki Mode
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
# npm
|
|
178
|
-
npm update -g loki-mode
|
|
179
|
-
|
|
180
|
-
# Homebrew
|
|
181
|
-
brew update && brew upgrade loki-mode
|
|
182
|
-
|
|
183
|
-
# Docker
|
|
184
|
-
docker pull asklokesh/loki-mode:5.51.0
|
|
185
|
-
|
|
186
|
-
# Git
|
|
187
|
-
cd ~/git/loki-mode && git pull origin main
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
#### 2. Verify Version
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
loki version
|
|
194
|
-
# Expected: v5.51.0
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
#### 3. Review New Environment Variables
|
|
198
|
-
|
|
199
|
-
Check if any new features are relevant to your deployment. All new features are opt-in:
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
# No env vars needed for basic operation
|
|
203
|
-
# Set these only if you want the features:
|
|
204
|
-
|
|
205
|
-
# Slack notifications
|
|
206
|
-
export LOKI_SLACK_BOT_TOKEN="xoxb-..."
|
|
207
|
-
export LOKI_SLACK_SIGNING_SECRET="..."
|
|
208
|
-
|
|
209
|
-
# Teams notifications
|
|
210
|
-
export LOKI_TEAMS_WEBHOOK_URL="https://..."
|
|
211
|
-
|
|
212
|
-
# OIDC authentication
|
|
213
|
-
export LOKI_OIDC_ISSUER="https://..."
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
#### 4. Install SDKs (Optional)
|
|
217
|
-
|
|
218
|
-
```bash
|
|
219
|
-
# Python SDK
|
|
220
|
-
pip install loki-mode-sdk
|
|
221
|
-
|
|
222
|
-
# TypeScript SDK
|
|
223
|
-
npm install loki-mode-sdk
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
#### 5. Test Enterprise Features
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
# Open the Control Plane (the classic /api/* routes are replaced by /v1/*, see docs/control-plane-migration.md)
|
|
230
|
-
loki dashboard
|
|
231
|
-
|
|
232
|
-
# Test API
|
|
233
|
-
curl http://localhost:57374/api/status
|
|
234
|
-
|
|
235
|
-
# Test audit
|
|
236
|
-
curl http://localhost:57374/api/audit?limit=5
|
|
237
|
-
|
|
238
|
-
# Verify audit chain
|
|
239
|
-
curl http://localhost:57374/api/audit/verify
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
#### 6. Update CI/CD Pipelines (if applicable)
|
|
243
|
-
|
|
244
|
-
If you use the GitHub Action, update the version:
|
|
245
|
-
|
|
246
|
-
```yaml
|
|
247
|
-
- uses: asklokesh/loki-mode@v5.51.0
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### Rollback
|
|
251
|
-
|
|
252
|
-
If issues arise, rolling back to v5.50.0 is safe:
|
|
253
|
-
|
|
254
|
-
```bash
|
|
255
|
-
# npm
|
|
256
|
-
npm install -g loki-mode@5.50.0
|
|
257
|
-
|
|
258
|
-
# Homebrew
|
|
259
|
-
brew install loki-mode@5.50.0
|
|
260
|
-
|
|
261
|
-
# Docker
|
|
262
|
-
docker pull asklokesh/loki-mode:5.50.0
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
No data migration is needed. The v5.51.0 database schema additions are backward-compatible -- v5.50.0 ignores the new tables/columns.
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
date: 2026-09-14
|
|
3
|
-
status: historical
|
|
4
|
-
note: Historical record, last changed 2026-09-14. Superseded by Loki 10; kept for reference only.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# One-Run Completion Audit
|
|
8
|
-
|
|
9
|
-
Empirical audit of whether ONE RUN completes the job today. Read against
|
|
10
|
-
committed source at `bb73addb` (branch `main`). No files were changed; this
|
|
11
|
-
document is the only artifact.
|
|
12
|
-
|
|
13
|
-
The demand under audit: a user hands over a PR, an issue, or a spec, and the
|
|
14
|
-
run completes all development, testing, and release work and hands back
|
|
15
|
-
completion proof, with least cost and highest task value per dollar, without
|
|
16
|
-
back-and-forth or failing loops.
|
|
17
|
-
|
|
18
|
-
Verdict: a default run does reach working code, a session branch, quality
|
|
19
|
-
gates, and an Evidence Receipt without human input. It breaks the one-run
|
|
20
|
-
promise in five specific places, ranked below. Two of the five are hard stops
|
|
21
|
-
that wait on a person. Two are missing measurements, not defects. One is the
|
|
22
|
-
last mile of the deliverable.
|
|
23
|
-
|
|
24
|
-
## Method notes
|
|
25
|
-
|
|
26
|
-
Every zero reported here carries a positive control, because an unproven zero
|
|
27
|
-
is an absent measurement rather than a finding. Controls are printed inline
|
|
28
|
-
with each finding. Claims are read against committed source, and each cited
|
|
29
|
-
function was read in full before it was judged.
|
|
30
|
-
|
|
31
|
-
Two mid-audit hypotheses were refuted by the source and are recorded in
|
|
32
|
-
"Refuted during this audit" so they are not re-raised.
|
|
33
|
-
|
|
34
|
-
## 1. A blocked gate escalates to a PAUSE that waits forever, with no timeout and no tty guard
|
|
35
|
-
|
|
36
|
-
Highest user pain. This is the failing loop the demand names, and in
|
|
37
|
-
background mode nobody is watching it.
|
|
38
|
-
|
|
39
|
-
The escalation ladder defaults are `GATE_CLEAR_LIMIT=3`,
|
|
40
|
-
`GATE_ESCALATE_LIMIT=5`, `GATE_PAUSE_LIMIT=10` (`autonomy/run.sh:1513-1515`).
|
|
41
|
-
`gate_failure_disposition` (`autonomy/run.sh:11293-11302`) returns `pause`
|
|
42
|
-
once a gate's consecutive-failure count reaches 10.
|
|
43
|
-
|
|
44
|
-
For code review, that disposition does this (`autonomy/run.sh:24473-24477`):
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
log_error "Gate escalation: code_review failed $cr_count times (>= $GATE_PAUSE_LIMIT) - forcing PAUSE for human intervention"
|
|
48
|
-
echo "PAUSE" > "${TARGET_DIR:-.}/.loki/signals/GATE_ESCALATION"
|
|
49
|
-
touch "${TARGET_DIR:-.}/.loki/PAUSE"
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
`check_human_intervention` (`autonomy/run.sh:25460`) sees that file and calls
|
|
53
|
-
`handle_pause` (`autonomy/run.sh:25690`). The wait loop
|
|
54
|
-
(`autonomy/run.sh:25793-25818`) is:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
while [ "$PAUSED" = "true" ]; do
|
|
58
|
-
if [ -f "$loki_dir/STOP" ]; then ... return 1; fi
|
|
59
|
-
if [ ! -f "$loki_dir/PAUSE" ]; then PAUSED=false; break; fi
|
|
60
|
-
if read -t 1 -n 1 2>/dev/null; then rm -f "$loki_dir/PAUSE"; PAUSED=false; break; fi
|
|
61
|
-
sleep 1
|
|
62
|
-
done
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
There is no timeout and no maximum wait. The loop exits only on a person
|
|
66
|
-
removing `.loki/PAUSE`, creating `.loki/STOP`, or pressing a key. With no TTY
|
|
67
|
-
attached (`--bg`, a container, a CI job) the `read` can never fire, so the run
|
|
68
|
-
spins on `sleep 1` indefinitely.
|
|
69
|
-
|
|
70
|
-
There is no non-interactive guard on this path. Positive control: `grep -c
|
|
71
|
-
"-t 0" autonomy/run.sh` returns `1`, so the grep does find tty checks in this
|
|
72
|
-
file; the single hit is `autonomy/run.sh:22411`, inside the unrelated
|
|
73
|
-
spec-contradiction fast-fail. `handle_pause` has none.
|
|
74
|
-
|
|
75
|
-
Scope it honestly: perpetual mode auto-clears PAUSE and continues
|
|
76
|
-
(`autonomy/run.sh:25470-25500`), except when the pause came from budget
|
|
77
|
-
enforcement. Default mode does not auto-clear.
|
|
78
|
-
|
|
79
|
-
## 2. Gate-stuck was the only terminal that told the user nothing (FIXED)
|
|
80
|
-
|
|
81
|
-
**Partly refuted, then fixed. The original framing of this finding was wrong,
|
|
82
|
-
and the correction is the useful part.**
|
|
83
|
-
|
|
84
|
-
`_loki_gate_stuck` (threshold `LOKI_GATE_STUCK_THRESHOLD:-3`) compares a stable
|
|
85
|
-
cause line across consecutive failures. When the same gate fails for the same
|
|
86
|
-
reason three times the run stops rather than grinding, for static analysis,
|
|
87
|
-
mock integrity and mutation integrity. Each does `save_state ... 20` then
|
|
88
|
-
`return 20` out of `run_autonomous`. (Line numbers are deliberately omitted:
|
|
89
|
-
every one this section originally cited had drifted before the fix landed.
|
|
90
|
-
Anchor on the function names.)
|
|
91
|
-
|
|
92
|
-
**What was wrong with the original finding.** It claimed "the deliverable stays
|
|
93
|
-
on the session branch and the user must discover and finish it by hand".
|
|
94
|
-
`commit_session_changes` is commit-always by design, including on failed runs,
|
|
95
|
-
and both it and `create_session_pr` are called from `main()` AFTER
|
|
96
|
-
`run_autonomous` returns 20. `create_session_pr` then calls `print_pr_advice`
|
|
97
|
-
(`autonomy/lib/git-pr-advisory.sh`), which prints the branch, the `git push -u`
|
|
98
|
-
line and the `gh pr create` line. So the work was already committed and the push
|
|
99
|
-
commands already printed. Two real bounds on that: `create_session_pr` returns
|
|
100
|
-
early when there are no commits, and `commit_session_changes` only commits on a
|
|
101
|
-
Loki-minted `loki/session-*` branch.
|
|
102
|
-
|
|
103
|
-
**The defect that was real.** Gate-stuck was the ONLY terminal in
|
|
104
|
-
`run_autonomous` that never called `emit_completion_summary`. Every other one
|
|
105
|
-
does, including the council force-stop. So it wrote no COMPLETION.txt, rendered
|
|
106
|
-
no completion card, and sent no notification. A `--bg` user got no ping and
|
|
107
|
-
nothing in the one file they are told to read, and `print_pr_advice` goes to a
|
|
108
|
-
stdout a detached run never shows them.
|
|
109
|
-
|
|
110
|
-
**Fixed:** all three branches now call `emit_completion_summary` with their own
|
|
111
|
-
outcome, each outcome has a literal label arm in both `build_completion_summary`
|
|
112
|
-
and `print_completion_card`, and the three statuses were added to the ENT-3
|
|
113
|
-
terminal-failure arm so exit 20 is classified by intent rather than reached by
|
|
114
|
-
fall-through (the log line previously read "crash, retryable").
|
|
115
|
-
|
|
116
|
-
**Not changed, deliberately:** no PR is opened. The council force-stop carries
|
|
117
|
-
the comment "No on_run_complete: a force-stop must never open a 'done' PR", and
|
|
118
|
-
that precedent bans the PR while mandating the summary in the same breath. This
|
|
119
|
-
applies the precedent rather than violating it.
|
|
120
|
-
|
|
121
|
-
Guards: `tests/test-completion-outcome-labels.sh` (now fast-tier; its literal
|
|
122
|
-
matcher is what caught a wildcard arm that rendered correctly but read as
|
|
123
|
-
unlabelled), `tests/test-exit-code-contract.sh` (10 to 13 assertions), and an
|
|
124
|
-
executed wiring assertion in `tests/test-terminal-next-step.sh`.
|
|
125
|
-
|
|
126
|
-
## 3. There is no cost-per-completed-task anywhere; only cost per iteration
|
|
127
|
-
|
|
128
|
-
This is a missing measurement, reported plainly rather than invented.
|
|
129
|
-
|
|
130
|
-
The per-iteration writer is `autonomy/run.sh:8303-8318`, emitting
|
|
131
|
-
`.loki/metrics/efficiency/iteration-N.json` with `cost_usd` at
|
|
132
|
-
`autonomy/run.sh:8315`.
|
|
133
|
-
|
|
134
|
-
The only aggregation that divides cost by anything is
|
|
135
|
-
`autonomy/loki:6447`:
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
'avg_cost_per_iteration': round(total_cost / iteration_count, 2) if iteration_count > 0 else 0,
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
plus the same division at `autonomy/loki:6518`. Both denominators are
|
|
142
|
-
iterations, not completed tasks.
|
|
143
|
-
|
|
144
|
-
The sharpest evidence that the metric was never built: in one script,
|
|
145
|
-
`total_cost` is computed at `autonomy/loki:28461` and `tasks_completed` is
|
|
146
|
-
emitted at `autonomy/loki:28514` and printed at `autonomy/loki:28557`, about
|
|
147
|
-
fifty lines apart, with no division between them. Both numbers are in hand at
|
|
148
|
-
the same moment and are never combined.
|
|
149
|
-
|
|
150
|
-
Searched two ways. Positive control first: `grep -c "cost_usd" autonomy/loki`
|
|
151
|
-
returns `19`, so the file and the pattern style both resolve.
|
|
152
|
-
|
|
153
|
-
- Division by any completed or task count, across `autonomy/loki`,
|
|
154
|
-
`autonomy/run.sh`, `dashboard/*.py`: only the two
|
|
155
|
-
`total_cost / iteration_count` hits above.
|
|
156
|
-
- Identifier search for `per_task`, `per-task`, `cost_per`, `per_completed`
|
|
157
|
-
across `autonomy/`, `dashboard/*.py`, `loki-ts/src/`: only
|
|
158
|
-
`avg_cost_per_iteration` at `autonomy/loki:6447`.
|
|
159
|
-
|
|
160
|
-
An iteration is not a unit of delivered value. A run that solves the task in
|
|
161
|
-
two iterations and one that thrashes for twenty both report a healthy average
|
|
162
|
-
cost per iteration.
|
|
163
|
-
|
|
164
|
-
## 4. There is no task-value-per-dollar metric
|
|
165
|
-
|
|
166
|
-
Zero hits, with a positive control, searched two ways.
|
|
167
|
-
|
|
168
|
-
Positive control: `grep -rln "cost_usd" autonomy/` resolves to
|
|
169
|
-
`autonomy/loki`, `autonomy/run.sh`, `autonomy/context-tracker.py`, so the
|
|
170
|
-
recursive search reaches these trees.
|
|
171
|
-
|
|
172
|
-
- Case-insensitive `value.per.dollar`, `value_per_dollar`, `valuePerDollar`
|
|
173
|
-
across `autonomy/`, `dashboard/`, `memory/`, `loki-ts/src/`: 0 hits.
|
|
174
|
-
- Identifier search for `task_value`, `value_score`, `roi` across
|
|
175
|
-
`autonomy/`, `dashboard/`: no metric definition. Hits were unrelated
|
|
176
|
-
substrings (a template line in `autonomy/quickstart.sh:136`, bundled
|
|
177
|
-
`mermaid.min.js`).
|
|
178
|
-
|
|
179
|
-
Nothing computes value per dollar, and nothing defines task value as a
|
|
180
|
-
quantity. The closest artifact is the productivity report at
|
|
181
|
-
`autonomy/loki:28535-28545`, which estimates "time saved" as
|
|
182
|
-
`total_iterations x 15 minutes`. That is a fixed multiplier applied to
|
|
183
|
-
iteration count, not a measure of delivered value, and it rises with a run
|
|
184
|
-
that iterates more.
|
|
185
|
-
|
|
186
|
-
## 5. On the headline issue use case, the PR rests entirely on one default-on guard chain, and the teardown then tells the user to open a PR that already exists
|
|
187
|
-
|
|
188
|
-
The back-and-forth is not conversational. The agent almost never stops to ask
|
|
189
|
-
a question mid-run.
|
|
190
|
-
|
|
191
|
-
Searched for blocking interactive prompts two ways. Only two exist in the CLI,
|
|
192
|
-
both in `cmd_config_init` (`autonomy/loki:12652`): `read -p "Choice [1]: "` at
|
|
193
|
-
`autonomy/loki:12669`, and `autonomy/loki:12719`, which already auto-confirms
|
|
194
|
-
under `LOKI_AUTO_CONFIRM`, `CI`, or a non-TTY stdin. Neither is on the
|
|
195
|
-
`loki start` build path. The `LOKI_PROMPT_INJECTION` handling in
|
|
196
|
-
`check_human_intervention` is default-off and consumes input rather than
|
|
197
|
-
requesting it (`autonomy/run.sh:25557-25565`).
|
|
198
|
-
|
|
199
|
-
The real issue is on the founder's named use case, `loki start
|
|
200
|
-
owner/repo#123`. With no flags, `create_pr` and `use_worktree` both stay false:
|
|
201
|
-
they are set only by `--pr`, `--ship`, `--prepare-pr`, `--worktree`, or
|
|
202
|
-
`--detach` (`autonomy/loki:2602`, `:2616`, `:10330`, `:10383`). So the issue
|
|
203
|
-
path's own PR block at `autonomy/loki:10762` (`if $create_pr;`) never executes
|
|
204
|
-
on a bare no-flag run.
|
|
205
|
-
|
|
206
|
-
The PR therefore rests entirely on one other path: `on_run_complete`
|
|
207
|
-
(`autonomy/run.sh:5246`), which is default ON (`LOKI_DELEGATE_PR:-1`,
|
|
208
|
-
`autonomy/run.sh:5259`) and is called from the success exits
|
|
209
|
-
(`autonomy/run.sh:24803`, `:25025`, `:25661`). Its guard chain does hold on a
|
|
210
|
-
normal run: `GITHUB_PR:-false` does not trigger the early return at
|
|
211
|
-
`autonomy/run.sh:5263`; branch protection is on by default
|
|
212
|
-
(`autonomy/run.sh:8922`) and `setup_agent_branch` is called unconditionally in
|
|
213
|
-
`main()` (`autonomy/run.sh:26681`) before `run_autonomous` at
|
|
214
|
-
`autonomy/run.sh:26783`, minting `loki/session-<ts>-<pid>`
|
|
215
|
-
(`autonomy/run.sh:8984-8999`), so the non-default-branch guard at
|
|
216
|
-
`autonomy/run.sh:5296-5298` passes.
|
|
217
|
-
|
|
218
|
-
But every remaining link is a silent no-op. Missing `gh`
|
|
219
|
-
(`autonomy/run.sh:5279`), failing `gh auth status` (`autonomy/run.sh:5282`),
|
|
220
|
-
or a non-GitHub remote (`autonomy/run.sh:5287-5290`) each `return 0` with no
|
|
221
|
-
log line at all. On the headline use case the deliverable is the PR, and three
|
|
222
|
-
environment conditions can remove it without saying so.
|
|
223
|
-
|
|
224
|
-
Then the teardown contradicts itself. `create_session_pr` runs later, from
|
|
225
|
-
`main()` at `autonomy/run.sh:26956`, after the in-loop `on_run_complete` has
|
|
226
|
-
already opened the PR. It reaches `autonomy/run.sh:9175`:
|
|
227
|
-
|
|
228
|
-
```
|
|
229
|
-
if [ "${LOKI_AUTO_PR:-0}" != "1" ]; then
|
|
230
|
-
print_pr_advice "$base" "$branch_name"
|
|
231
|
-
...
|
|
232
|
-
return 0
|
|
233
|
-
fi
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
`print_pr_advice` (`autonomy/lib/git-pr-advisory.sh:69-111`) takes only base,
|
|
237
|
-
head, and dir. It consults nothing about an existing PR and unconditionally
|
|
238
|
-
prints "To open a pull request: git push -u origin ...". Note that
|
|
239
|
-
`_loki_persist_pr_url` writes the opened PR url to `.loki/state/pr-url.txt`
|
|
240
|
-
(`autonomy/run.sh:5242`), and repo-wide the only other references are in
|
|
241
|
-
`tests/test-issue-to-pr-action.sh`: nothing in the advice path reads it.
|
|
242
|
-
|
|
243
|
-
So a successful run opens the PR, folds its url into the completion summary
|
|
244
|
-
via `build_completion_summary` (`autonomy/run.sh:4644`, reached through
|
|
245
|
-
`emit_completion_summary` at `autonomy/run.sh:5064`, called at `:24804` and
|
|
246
|
-
`:25026`), and then prints instructions to create the PR it just created. That
|
|
247
|
-
is a contradictory instruction at the moment the user is deciding whether the
|
|
248
|
-
job is done.
|
|
249
|
-
|
|
250
|
-
The same hand-back shape appears on the pause path: the guidance written into
|
|
251
|
-
`PAUSED.md` (`autonomy/run.sh:25778`) tells the user to read the findings file,
|
|
252
|
-
fix what it names, and resume.
|
|
253
|
-
|
|
254
|
-
## What works, and should not be disturbed
|
|
255
|
-
|
|
256
|
-
Stated so the defect list is not mistaken for a verdict on the whole system.
|
|
257
|
-
|
|
258
|
-
- The Evidence Receipt is automatic, not a second command. `loki proof` is an
|
|
259
|
-
inspection surface; generation happens in-run via `generate_proof_of_run`
|
|
260
|
-
(`autonomy/run.sh:7926`), default on (`LOKI_PROOF:-1`), called from
|
|
261
|
-
`main()` at `autonomy/run.sh:26811`, `:26895`, `:26980` and from `cleanup()`
|
|
262
|
-
at `autonomy/run.sh:26016`.
|
|
263
|
-
- That receipt survives a gate-stuck exit 20. `autonomy/run.sh:26783` is
|
|
264
|
-
`run_autonomous "$PRD_PATH" || result=$?`, which catches the 20, and the
|
|
265
|
-
zombie-receipt guard at `autonomy/run.sh:26802-26812` generates the proof
|
|
266
|
-
immediately after the loop returns.
|
|
267
|
-
- PRs that are opened carry the receipt inline: `autonomy/run.sh:5331` and
|
|
268
|
-
`:9257`, plus the issue path at `autonomy/loki:10779-10793`.
|
|
269
|
-
- The receipt is independently re-checkable, which is the substantive answer to
|
|
270
|
-
"does the user get proof they can verify." `cmd_verify` (`autonomy/loki:18131`)
|
|
271
|
-
has a `--fast` path through `lib/fast_verify.py` that runs only exogenous,
|
|
272
|
-
deterministic checks with no model call and no network, so any third party
|
|
273
|
-
with the same commit re-derives the same verdict; the deeper route is
|
|
274
|
-
`autonomy/verify.sh`. `loki proof verify <id>` (`autonomy/loki:36196`)
|
|
275
|
-
re-checks a receipt for tamper and drift, with `--jwks` for attestation
|
|
276
|
-
against a published key set.
|
|
277
|
-
- The stuck-gate valve itself is sound. `_loki_gate_stuck` skips the static
|
|
278
|
-
banner and compares the first real cause line
|
|
279
|
-
(`autonomy/run.sh:11132-11145`), so a run making genuine progress through
|
|
280
|
-
different findings is not misread as stuck.
|
|
281
|
-
|
|
282
|
-
## Refuted during this audit
|
|
283
|
-
|
|
284
|
-
Recorded so neither is raised again.
|
|
285
|
-
|
|
286
|
-
- "`enforce_mock_integrity || true` at `autonomy/run.sh:24187` discards the
|
|
287
|
-
BLOCK." False. The verdict travels via the global
|
|
288
|
-
`_LOKI_MOCK_INTEGRITY_STATUS`, read on the next line
|
|
289
|
-
(`autonomy/run.sh:24188`); the `fail` arm runs `track_gate_failure`,
|
|
290
|
-
escalation guidance, and the `_loki_gate_stuck` abort
|
|
291
|
-
(`autonomy/run.sh:24190-24228`). The `|| true` only prevents `set -e` from
|
|
292
|
-
killing the script.
|
|
293
|
-
- "The receipt is lost on the gate-stuck path." False, refuted by
|
|
294
|
-
`autonomy/run.sh:26783` and `:26810-26812` as described above.
|
|
295
|
-
|
|
296
|
-
## Ranked summary
|
|
297
|
-
|
|
298
|
-
| # | Break | Evidence | Pain |
|
|
299
|
-
|---|---|---|---|
|
|
300
|
-
| 1 | Gate escalation forces a PAUSE that waits forever, no timeout, no tty guard | `run.sh:24473-24477`, `run.sh:25793-25818`, defaults `run.sh:1513-1515` | Run stalls silently in `--bg`; the failing loop the demand names |
|
|
301
|
-
| 2 | FIXED. Gate-stuck was the only terminal that called no `emit_completion_summary`, so it wrote no COMPLETION.txt and sent no ping | `_loki_gate_stuck` branches in `run_autonomous`; label arms in `build_completion_summary` and `print_completion_card`; ENT-3 terminal arm | A `--bg` user got no notification and nothing in the file they are told to read. No PR, deliberately: same precedent as the council force-stop |
|
|
302
|
-
| 3 | No cost-per-completed-task; only per-iteration | `loki:6447`, `:6518`; cost `loki:28461` and tasks `loki:28514` never divided | "Least cost per task" is unmeasurable today |
|
|
303
|
-
| 4 | No task-value-per-dollar metric | 0 hits with positive control; `loki:28535-28545` is a fixed 15-min multiplier | The demand's headline metric does not exist |
|
|
304
|
-
| 5 | No-flag issue run never uses its own PR block; PR depends on a guard chain with three silent no-ops, then teardown prints advice for the PR it already opened | `loki:10762` unreached (`loki:2602`, `:10330`); `run.sh:5279`, `:5282`, `:5287-5290`; `run.sh:9175` + `git-pr-advisory.sh:69-111` | Deliverable can vanish silently on the headline use case; contradictory closing instruction |
|