Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .pa/ACTIVITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Append-only: neue Einträge am Ende. Regeln: AGENTS.md.
- Commits: keine
- Uncommitted: keine

## 2026-10-04 19:39 — Codex GPT-5 (codex/hq2-05b-p4-docs-r, srv-hq2-05b-p4-docs)
- Zusammenfassung: HQ2-05b package 4 updates collector documentation and not-reported reasons from merged real probes; implementation commit e511615 pushed; draft PR #341; Tier B review pending coordinator.
- Commits: e511615
## 2026-10-04 19:42 — Codex GPT-5 (codex/state-7-error-contract, srv-state-7-error-contract)
- Zusammenfassung: STATE-7 completed: red-first tests, visible frontend error contract, prepush exit 0, pushed SHA 63effdd, draft PR #342; tier B review and Windows queue lane pending.
- Commits: keine
Expand All @@ -48,6 +51,13 @@ Append-only: neue Einträge am Ende. Regeln: AGENTS.md.
- Commits: 13d5357
- Uncommitted: keine

## 2026-10-04 20:28 — codex/hq2-05b-p4-docs-r (codex/hq2-05b-p4-docs-r, srv-hq2-05b-p4-docs)
- Zusammenfassung: Merged origin/main without manual conflict hunks; refreshed HQ snapshots in 1b64032; prepush and push verification green; PR 341 report updated; review pending Tier B; queue after final verification.
- Commits: keine
- Uncommitted: keine

## 2026-10-04 21:21 — codex/hq2-05b-p4-docs-r (codex/hq2-05b-p4-docs-r, srv-hq2-05b-p4-docs)
- Zusammenfassung: PR #341 conflict resolved by merging origin/main; regenerated HQ snapshots in f4254b8; prepush green; pushed and verified; report updated and Mergify queue requested.
## 2026-10-04 20:32 — codex/state-7-error-contract (codex/state-7-error-contract, srv-state-7-error-contract)
- Zusammenfassung: PR #342 conflict resolved by merging origin/main; HQ snapshots refreshed; prepush exit 0; pushed 353f49f and verified remote; report updated and Mergify queue requested.
- Commits: keine
Expand Down
68 changes: 61 additions & 7 deletions docs/dev-hq/data.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
window.HQ_DATA = {
"generatedAt": "2026-10-04T19:09:51.784Z",
"commit": "d2dcb45",
"generatedAt": "2026-10-04T20:11:27.380Z",
"commit": "a3b5be1",
"dirty": true,
"sources": [
{
Expand All @@ -9,7 +9,7 @@ window.HQ_DATA = {
},
{
"path": "docs/PLAN.md",
"sha256": "5f7c455c8d0bd024809ea67407876fc2a725f76b40a485dda1a5afe38cb52964"
"sha256": "83ac353a7dad7a99bc9ae7854310587818d00b55aa45b73cc9e9e7cf658c2995"
},
{
"path": ".pa/task_w1-05.md",
Expand Down Expand Up @@ -1021,13 +1021,67 @@ window.HQ_DATA = {
},
{
"id": "M4-R7-02",
"title": "Negative Fake-Adapter-Matrix (Matrixzeile 7): Tests, die Starts ohne akzeptierte Gates ablehnen",
"title": "Negative Fake-Adapter-Matrix (Matrixzeile 7): Tests, die Starts ohne akzeptierte Gates ablehnen, plus Matrixzeilen 5 und 9: zwei gleichzeitige dispatch_once auf eine Aufgabe starten genau einen Worker, der veraltete Schreiber wird abgewiesen; Abhängigkeiten erfüllt/offen/fehlend/projektfremd/65 Einträge -> genau ein Start nur im erfüllten Fall",
"size": "S",
"lane": "wk",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-R15-01",
"title": "Stabile Policy-Revision aus der unveränderlichen Laufpolicy, an Kandidat- und Evidenzzeilen gespeichert, alte Zeilen fail-closed (Matrixzeile 15)",
"size": "S",
"lane": "st",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-R15-02",
"title": "Revision bei Schreiben, Replay, Lesen, Kontext und Seiten erzwingen; fremde Revision abgewiesen ohne Schreiben (Zeile 15)",
"size": "S",
"lane": "st",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-R17-01",
"title": "Store-eigene Release-Bereitschaft, an aktuellen Kandidaten/Evidenz/Reviews gebunden (Zeile 17); wartet auf E19",
"size": "S",
"lane": "st",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-E2E-14",
"title": "Echter HTTP-Router + Store + Fake-Agentenprozess: Checkpoint -> Abbruch -> Fortsetzen (Zeile 14)",
"size": "S",
"lane": "api",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-E2E-15",
"title": "HTTP-Matrix Kandidat/Evidenz mit Policy-Revision (Zeile 15)",
"size": "S",
"lane": "api",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-E2E-17",
"title": "Kandidat-Delta macht frühere Freigabekette über HTTP ungültig (Zeile 17)",
"size": "S",
"lane": "api",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-R19-01",
"title": "Typisierter Audit-Envelope: Einträge ohne project/run/result/sourceRef werden abgewiesen (Matrixzeile 19)",
Expand Down Expand Up @@ -1066,7 +1120,7 @@ window.HQ_DATA = {
}
],
"done": 16,
"total": 32
"total": 38
},
{
"id": "M5",
Expand Down Expand Up @@ -1816,7 +1870,7 @@ window.HQ_DATA = {
"badges": {
"label": "new",
"confidence": null,
"ageDays": 22,
"ageDays": 23,
"votes": 0
}
},
Expand All @@ -1837,7 +1891,7 @@ window.HQ_DATA = {
"badges": {
"label": "new",
"confidence": null,
"ageDays": 22,
"ageDays": 23,
"votes": 0
}
},
Expand Down
68 changes: 61 additions & 7 deletions docs/dev-hq/data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"generatedAt": "2026-10-04T19:09:51.784Z",
"commit": "d2dcb45",
"generatedAt": "2026-10-04T20:11:27.380Z",
"commit": "a3b5be1",
"dirty": true,
"sources": [
{
Expand All @@ -9,7 +9,7 @@
},
{
"path": "docs/PLAN.md",
"sha256": "5f7c455c8d0bd024809ea67407876fc2a725f76b40a485dda1a5afe38cb52964"
"sha256": "83ac353a7dad7a99bc9ae7854310587818d00b55aa45b73cc9e9e7cf658c2995"
},
{
"path": ".pa/task_w1-05.md",
Expand Down Expand Up @@ -1021,13 +1021,67 @@
},
{
"id": "M4-R7-02",
"title": "Negative Fake-Adapter-Matrix (Matrixzeile 7): Tests, die Starts ohne akzeptierte Gates ablehnen",
"title": "Negative Fake-Adapter-Matrix (Matrixzeile 7): Tests, die Starts ohne akzeptierte Gates ablehnen, plus Matrixzeilen 5 und 9: zwei gleichzeitige dispatch_once auf eine Aufgabe starten genau einen Worker, der veraltete Schreiber wird abgewiesen; Abhängigkeiten erfüllt/offen/fehlend/projektfremd/65 Einträge -> genau ein Start nur im erfüllten Fall",
"size": "S",
"lane": "wk",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-R15-01",
"title": "Stabile Policy-Revision aus der unveränderlichen Laufpolicy, an Kandidat- und Evidenzzeilen gespeichert, alte Zeilen fail-closed (Matrixzeile 15)",
"size": "S",
"lane": "st",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-R15-02",
"title": "Revision bei Schreiben, Replay, Lesen, Kontext und Seiten erzwingen; fremde Revision abgewiesen ohne Schreiben (Zeile 15)",
"size": "S",
"lane": "st",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-R17-01",
"title": "Store-eigene Release-Bereitschaft, an aktuellen Kandidaten/Evidenz/Reviews gebunden (Zeile 17); wartet auf E19",
"size": "S",
"lane": "st",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-E2E-14",
"title": "Echter HTTP-Router + Store + Fake-Agentenprozess: Checkpoint -> Abbruch -> Fortsetzen (Zeile 14)",
"size": "S",
"lane": "api",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-E2E-15",
"title": "HTTP-Matrix Kandidat/Evidenz mit Policy-Revision (Zeile 15)",
"size": "S",
"lane": "api",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-E2E-17",
"title": "Kandidat-Delta macht frühere Freigabekette über HTTP ungültig (Zeile 17)",
"size": "S",
"lane": "api",
"stand": "offen",
"state": "open",
"prNumbers": []
},
{
"id": "M4-R19-01",
"title": "Typisierter Audit-Envelope: Einträge ohne project/run/result/sourceRef werden abgewiesen (Matrixzeile 19)",
Expand Down Expand Up @@ -1066,7 +1120,7 @@
}
],
"done": 16,
"total": 32
"total": 38
},
{
"id": "M5",
Expand Down Expand Up @@ -1816,7 +1870,7 @@
"badges": {
"label": "new",
"confidence": null,
"ageDays": 22,
"ageDays": 23,
"votes": 0
}
},
Expand All @@ -1837,7 +1891,7 @@
"badges": {
"label": "new",
"confidence": null,
"ageDays": 22,
"ageDays": 23,
"votes": 0
}
},
Expand Down
14 changes: 7 additions & 7 deletions docs/development/CONTINUOUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -551,16 +551,16 @@ without a reservation). Only `measured`
settles; any other state keeps the entire reservation, as above - except the
proven `exited_undelivered` release (DF-15b), which frees it unused.

Collectors per adapter (W2-03a):
Collectors per adapter (W2-03a, updated by the HQ2-05b probes):

| Adapter | Source | Collector |
|---|---|---|
| Codex, native `codex exec --json` | final `turn.completed` usage from process-owned stdout | `codex-exec-json-v1`, input plus output; cached and reasoning counts are checked subsets; nonzero cache-write counts are rejected |
| Codex over the interactive PTY | none | `not_reported` |
| Kimi | the PTY status line shows `context: N% (X/1M)`, i.e. context-window occupancy, not billed usage | `not_reported` |
| OpenCode | no recorded status-line bytes exist yet (only a prose smoke note) | `not_reported`; needs a `PROJECTA_PTY_TRACE_DIR` probe |
| Claude | the `statusLine` hook reports account-wide rate windows (live quota), not per-run tokens | `not_reported` |
| Ollama | no per-run collector | `not_reported` |
| Codex, native `codex exec --json` | final `turn.completed` usage from process-owned stdout; confirmed by the real `codex-cli 0.160.0` fixture in #289 | `codex-exec-json-v1`, input plus output; cached and reasoning counts are checked subsets; nonzero cache-write counts are rejected |
| Codex over the interactive PTY | the real probe exposed usage only on the native JSON route | `not_reported` |
| Claude, `claude -p --output-format json` | one final JSON result with separate input, cache-creation, cache-read, and output counters; confirmed by the real Claude Code 2.1.287 fixture in #299 | `claude-print-json-v1` parser exists; trusted capture, route, and store settlement are not wired yet |
| OpenCode, `opencode run --format json` | each `step_finish` event reports per-call counters; confirmed by the real OpenCode 1.18.34 fixture in #318 | parser exists and sums every step; trusted route and store settlement are not wired yet |
| Kimi | no current probe: the subscription expired before HQ2-05b could run it | `not_reported` |
| Ollama | no per-run usage route | `not_reported`; collector work is deferred until after M4 |

The native capture result stores the same receipt under `usage`, and the
`development_capture_completed` event carries its `usageState`. A capture
Expand Down
29 changes: 29 additions & 0 deletions docs/drills/backup-drill.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Backup-Drill (W3-03a, Matrixzeile 22)

Du prüfst, ob eine Sicherung deiner ProjectA-Datenbank wirklich wieder lesbar
ist. Deine echte Datenbank wird dabei **nur gelesen**, nie verändert; die
Wiederherstellung läuft in einem Wegwerf-Ordner. Dauer: etwa 5 Minuten.

Voraussetzung: ProjectA, PowerShell 7, Node 24 und dieses Repository sind da.

1. **Version notieren.** Starte ProjectA einmal, öffne „Info" und merke dir die
Versionsnummer; du gibst sie in Schritt 4 mit `-AppVersion` an.
2. **Laufende Arbeit beenden.** Warte, bis kein Worker mehr läuft. Es gibt noch
keinen Knopf für „Wartungsmodus"; dieser Drill nutzt deshalb „App schließen"
als Leerlauf-Zustand.
3. **ProjectA schließen** (Fenster zu, auch im Tray beenden). Erwartet: Die Datei
`projecta-api.json` im App-Ordner ist weg.
4. **Skript starten.** Öffne PowerShell 7 im Repository-Ordner und tippe:
`pwsh scripts/drills/backup-drill.ps1 -AppVersion 1.4.1 -OutDir C:\Belege\backup-drill`
(ohne `-OutDir` entsteht ein neuer Ordner mit Zeitstempel im aktuellen Ordner).
Jeder Lauf braucht einen neuen oder leeren Zielordner, damit keine alten Dateien in den Beleg geraten.
5. **Ausgabe lesen.** Erwartet: fünf Zeilen mit `OK` und am Ende `Ergebnis: pass`.
Bei `FEHLER` den Ordner nicht löschen und mir melden.
6. **Beleg prüfen.** Im Ordner liegt `manifest.json` (Schritte, Exit-Codes,
Hashes, Ergebnis, Nicht-abgedeckt) und die Prüfdateien. Die Textbelege sind
geschwärzt. **Der Unterordner `backup` enthält die vollständige, ungeschwärzte
Datenbank mit privaten Inhalten und Tokens: nie weitergeben.** Textbelege erst prüfen.
7. **ProjectA wieder starten**; alles soll wie vorher aussehen.

Nicht abgedeckt: Wartungs-Drain per App (kein Auslöser), Sicherung bei laufender
App, Wiederherstellung über die Live-Datenbank.
25 changes: 25 additions & 0 deletions scripts/drills/backup-drill.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// CLI entry of the backup drill (see docs/drills/backup-drill.md).
import { execFileSync } from 'node:child_process';
import { readFileSync } from 'node:fs';
import { parseArgs } from 'node:util';
import { fileURLToPath } from 'node:url';
import { defaultOutDir } from '../lib/drill-kit.mjs';
import { runBackupDrill } from '../lib/backup-drill.mjs';

const { values: v } = parseArgs({
options: {
'app-dir': { type: 'string' }, out: { type: 'string' }, 'app-version': { type: 'string' },
commit: { type: 'string' }, 'process-list': { type: 'string' }, 'allow-running': { type: 'boolean' },
},
});
if (!v['app-dir']) { console.error('FEHLER: --app-dir fehlt'); process.exit(2); }
const outDir = v.out ?? defaultOutDir('backup-drill');
const commit = v.commit ?? execFileSync('git', ['rev-parse', 'HEAD'], {
cwd: fileURLToPath(new URL('../..', import.meta.url)), encoding: 'utf8' }).trim();
const manifest = runBackupDrill({
appDir: v['app-dir'], outDir, appVersion: v['app-version'], commit, allowRunning: v['allow-running'],
processList: v['process-list'] ? readFileSync(v['process-list'], 'utf8') : '',
});
for (const s of manifest.steps) console.log(`${s.exitCode === 0 ? 'OK ' : 'FEHLER'} ${s.n}. ${s.name}${s.detail ? ` - ${s.detail}` : ''}`);
console.log(`Ergebnis: ${manifest.result}. Beleg-Ordner: ${outDir}`);
process.exit(manifest.result === 'pass' ? 0 : 1);
23 changes: 23 additions & 0 deletions scripts/drills/backup-drill.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Backup drill launcher (PowerShell 7); steps: docs/drills/backup-drill.md
param(
[string]$OutDir,
[string]$AppDir = (Join-Path $env:APPDATA "com.projecta.app"),
[string]$AppVersion = "unknown",
[switch]$AllowRunning
)
$ErrorActionPreference = "Stop"
$repo = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if (-not (Get-Command node -ErrorAction SilentlyContinue)) { throw "Node 24+ wird gebraucht (node nicht gefunden)" }

# Process list for the bundle (names only, no command lines).
$procFile = Join-Path ([IO.Path]::GetTempPath()) ("projecta-procs-" + [guid]::NewGuid().ToString("n") + ".txt")
Get-Process | Sort-Object ProcessName | Select-Object Id, ProcessName | Out-String | Set-Content $procFile

$argList = @("--app-dir", $AppDir, "--process-list", $procFile, "--app-version", $AppVersion)
if ($OutDir) { $argList += @("--out", $OutDir) }
if ($AllowRunning) { $argList += "--allow-running" }

& node (Join-Path $repo "scripts/drills/backup-drill.mjs") @argList
$code = $LASTEXITCODE
Remove-Item $procFile -ErrorAction SilentlyContinue
exit $code
Loading
Loading