diff options
| author | aur-build <aur-build@localhost> | 2026-11-18 08:36:39 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-18 08:36:39 +0000 |
| commit | e27e90aa82b6c878e34b94a6fa238836f497b1c3 (patch) | |
| tree | 1667b469468192ea97d6d2d6aeb534e1ad5f0b46 /.pi/goals/active_goal_2026111720432444_mwl5tehk-xhe7fk.md | |
| parent | eefbefed9cbea6b2edef65900fbe6cb6da0b48e4 (diff) | |
| download | aur-build-e27e90aa82b6c878e34b94a6fa238836f497b1c3.tar.gz aur-build-e27e90aa82b6c878e34b94a6fa238836f497b1c3.zip | |
pipeline: dispatcher actor, worker pool and reaper (§8.2, §8.4)
One dispatcher thread, N workers, one crossbeam channel between them. The
dispatcher loop is reap -> cancel -> claim -> send, and the reaper runs first
on every pass including the first, so 'recover from a crash' and 'notice an
expired lease' are literally the same code path. There is no startup recovery
routine to get wrong.
- claim_batch does the SELECT and the UPDATE in one BEGIN IMMEDIATE
transaction. SQLite has no SKIP LOCKED, but with exactly one writer the
claim cannot race: nobody can see a row between the two statements.
- Backpressure is min(max_concurrent_builds - in_flight, disk headroom),
measured with statvfs. A build that cannot fit on disk stays queued instead
of filling the filesystem halfway through a compile.
- Retry policy (§8.4): transient failures (IO, HTTP) requeue up to
max_transient_attempts; a deterministic build failure is never retried, and
the release stays approved_but_unbuilt so the old version never looks
healthy. Tests assert attempt==1 for build-fails and attempt==3 for a
transient one.
- A superseded candidate sets cancel_requested on in-flight builds; the worker
stops at the step boundary rather than mid-step, which is what keeps the
checkpoints honest.
- Publish takes a process-wide lock so two workers cannot interleave the index
rewrite. The critical section is the db file rewrite, never a build.
- The deterministic build id makes re-enqueue an INSERT OR IGNORE no-op, so a
careless 'rebuild that again' is harmless.
tests/dispatch.rs drives the real threads: the pool takes a queued build all
the way to publication, a reaped build resumes from its checkpoints without
re-running makechrootpkg, and backpressure admits exactly one build per slot.
Serve now starts the pool alongside the watcher and the HTTP server.
Diffstat (limited to '.pi/goals/active_goal_2026111720432444_mwl5tehk-xhe7fk.md')
| -rw-r--r-- | .pi/goals/active_goal_2026111720432444_mwl5tehk-xhe7fk.md | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/.pi/goals/active_goal_2026111720432444_mwl5tehk-xhe7fk.md b/.pi/goals/active_goal_2026111720432444_mwl5tehk-xhe7fk.md index c228f43..4a64017 100644 --- a/.pi/goals/active_goal_2026111720432444_mwl5tehk-xhe7fk.md +++ b/.pi/goals/active_goal_2026111720432444_mwl5tehk-xhe7fk.md @@ -5,14 +5,14 @@ "status": "active", "autoContinue": true, "usage": { - "tokensUsed": 4907415, - "activeSeconds": 9918 + "tokensUsed": 5396378, + "activeSeconds": 10692 }, "sisyphus": false, "createdAt": "2026-11-17T20:43:24.440Z", - "updatedAt": "2026-11-18T08:23:09.937Z", + "updatedAt": "2026-11-18T08:36:29.628Z", "activePath": ".pi/goals/active_goal_2026111720432444_mwl5tehk-xhe7fk.md", - "revision": 527, + "revision": 573, "scheduler": { "version": 1, "owner": "01a1eb32-2e3f-757c-a79a-21ac993facc5", @@ -133,7 +133,7 @@ { "id": "task-p2", "title": "P2 — review surface (§12, §13, §6)", - "status": "pending", + "status": "complete", "subtasks": [ { "id": "task-p2-http", @@ -162,10 +162,14 @@ { "id": "task-p2-surfaces", "title": "Subscriptions, Index, Builds, Attention, Ops/audit pages", - "status": "pending", - "verificationContract": "Each §13 surface renders from live DB state; Attention shows outdated-dependency, downgrade and blocked-build rows; the package page shows timeline, deps in/out, staleness and aur_commit history; manual rebuild reuses the approved source identity without a new approval (I6)." + "status": "complete", + "verificationContract": "Each §13 surface renders from live DB state; Attention shows outdated-dependency, downgrade and blocked-build rows; the package page shows timeline, deps in/out, staleness and aur_commit history; manual rebuild reuses the approved source identity without a new approval (I6).", + "completedAt": "2026-11-18T08:23:18.650Z", + "evidence": "tests/surfaces.rs (7 tests): attention_lists_outdated_dependencies_from_the_recorded_world (dep-client stale after plain-make moves, dependency + built-against + now all named); attention_lists_a_down" } - ] + ], + "completedAt": "2026-11-18T08:24:11.640Z", + "evidence": "All four P2 children complete: tiny_http server + CSRF/session gate, inbox with the full eight-panel diff set, optimistic-concurrency approve/reject with 409-on-stale and per-item bulk confirmation, a" }, { "id": "task-p3", @@ -233,7 +237,7 @@ "blockCompletion": true, "proposedAt": "2026-11-17T20:39:23.165Z" }, - "currentTaskId": "task-p2-surfaces" + "currentTaskId": "task-p3-dispatch" } # Goal Prompt @@ -266,15 +270,15 @@ IF BLOCKED: stop and ask the user (e.g. no network for crates, toolchain uninsta - Status: running - Auto-continue: on - Sisyphus mode: no -- Time spent: 2h45m18s -- Tokens used: 4.9M (4,907,415) tokens +- Time spent: 2h58m12s +- Tokens used: 5.4M (5,396,378) tokens ## Tasks <!-- blockCompletion: true --> - [x] task-setup: Provision toolchain (pacman rustup + devtools) and initialize git — evidence: rustup 1.29.3 (pacman) + stable 1.100.0, devtools installed (mkarchroot/makechrootpkg present); git repo initialized on main with commit 3762c7c containing DESIGN.md, .gitignore, Cargo.toml; `cargo bu - [x] task-p0: P0 — walking skeleton + test harness (§17 P0, §16a) — evidence: All P0 children complete: schema+writer actor, shims+corpus, mirror watcher, approval semantics+CLI, 10-step pipeline with signed atomic publish, invariant index. 81 tests pass, clippy clean, 7 commit - [x] task-p1: P1 — VCS / computed pkgver detection (§5.2, §3) — evidence: All three P1 children complete: Stage A probe (every VCS source, #tag/#commit, short-circuit), Stage B resolution (pin capture, cache on pkgbase+recipe_hash+tip, cooldown, concurrency cap), notices+ri -- [ ] task-p2: P2 — review surface (§12, §13, §6) +- [x] task-p2: P2 — review surface (§12, §13, §6) — evidence: All four P2 children complete: tiny_http server + CSRF/session gate, inbox with the full eight-panel diff set, optimistic-concurrency approve/reject with 409-on-stale and per-item bulk confirmation, a - [ ] task-p3: P3 — durability (§8.2, §8.3, §8.4) - [ ] task-p4: P4 — staleness, retention, metrics (§10, §15) - [ ] task-verify: Final verification pass, real-chroot attempt, and documentation — contract: Full `cargo test` and `cargo clippy` run clean; every §2 invariant maps to a named passing test (list produced); README + docs/DECISIONS.md written; git history reviewed for incremental commits; the gated real-chroot integration attempt against devtools is run or explicitly recorded as skipped with the reason. |
