From 2df197e9b1df85bf9a1cd8faf3b3c02b8af064a4 Mon Sep 17 00:00:00 2001 From: "napkinstack-agent[bot]" <330339777+napkinstack-agent[bot]@users.noreply.github.com> Date: Sat, 14 Nov 2026 15:23:00 +0100 Subject: [PATCH] =?UTF-8?q?D217=20=E2=80=94=20a=20platform=20test=20never?= =?UTF-8?q?=20waits=20on=20the=20machine's=20end-to-end=20lock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_evidence.py starts real end-to-end runs, which take the machine's lock ($XDG_RUNTIME_DIR/nstack-e2e.lock). While another project ran its own end-to-end tests, the platform suite hung there. Every test now has a runtime folder of its own. Agent-Session: nstack-os-d217 Co-Authored-By: Claude Opus 5.5 --- docs/governance/workstreams.md | 1 + platform/tests/conftest.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/governance/workstreams.md b/docs/governance/workstreams.md index 992ba766..527b689d 100644 --- a/docs/governance/workstreams.md +++ b/docs/governance/workstreams.md @@ -230,6 +230,7 @@ state to its index: [`docs/adr/`](../adr/README.md), [`docs/pdr/`](../pdr/README | D214 | **A verified sheet row could be moved to an untested head** (#384). The sheet lives in the pull request's description, which the author edits too. On a multi-agent project, 2026-11-13, an author moved the Commit cells of rows a verifier had passed on the previous head to the new one; T4 reads « Commit = head » and passed. Another author's stale description update wiped a verifier's filled sheet: T5 failed, and nothing said what had been there | **Done**: `nstack attest` keeps in its record each sheet row's kind, result, commit and a digest of its evidence — never the evidence. `pr-check` reads the records of the pull request's commits, every run of each: an **explored** row whose Commit cell now names another commit with the same evidence fails T4, naming the row and the commit it moved from — as a forge dismisses an approval the head moved past. An automated row may move: CI, or the head's record, ran it. A row a record held and the sheet no longer shows is a warning. The handbook says evidence names its run. Not built: who edited a cell, which the forge's edit history holds and an offline check cannot read; detection needs the earlier state attested, on a commit the branch still holds — a rebase or a squash drops those records. It detects a mistake, not a forgery: the records are the author's too. A move to a commit with the same files as the one verified stands (D93). Reproducer from the issue seen red first; three legitimate paths kept green (new evidence, Confirmed, automated) | | D215 | **Three limits an agent met by failing first** (#386, #388, #368). On a multi-agent project, 2026-11-13/14: verifier sessions under a sandbox could not follow the playbook's « a worktree of your own, a build cache of your own » — `.git` read-only, the person's cache read-only — and each improvised the same answer; one build in the system's temporary folder filled the person's quota. Agents learned from a 403 that a workflow dispatch, or a change under `.github/workflows/`, is not theirs, and one asked another session to make it. Run locally without labels, `pr-check` failed K3 on an out-of-cycle pull request with no hint, and two sessions misread it | **Done**: `verification.md` names the way that works — a `git clone --shared` at the head, outputs under the agent's own cache, never the system's temporary folder, both deleted. 07 §7 and `nstack agent add`'s output say a dispatch and, without `--workflows`, a workflow change are the person's, and that the agent never asks another session. K3 says when no label was given. Not built: reading the pull request's own labels from the forge — #368's root, kept there. Two assertions seen red first | | D216 | **Out-of-cycle work had no hold** (#385). On a multi-agent project, 2026-11-13/14, about 6 of 14 pull requests were out of cycle — a gap found in review, a flaky check — assigned in a chat message only: two sessions could take one issue unseen. `nstack claim` held only a deliverable of the accepted cycle | **Done**: `nstack claim '#'` holds an issue on `nstack/hold/issues/issue-`, the same events, the same refusal of a second taker, take-over and staleness; its work branches `issue--…`, named from the issue's title when the forge answers; in a framed project or not. On GitHub a comment on the issue says who holds it, as a person writes « I take it »: the assignee stays the person's to set. `nstack unclaim '#'` gives it back once its work is merged — an issue's hold does not end with a cycle; `nstack plan` lists the issues held. `14` and `issue-14` name it too, `#` starting a shell comment. The issue's comment names the person, never an email address. Market: a forge's assignee (GitHub, GitLab, Jira) refuses nobody; the hold, git's first push wins, does on any forge. Not built: K5 for out-of-cycle pull requests — a hold says, it does not yet gate. Five tests seen red first; an independent verifier's findings written in | +| D217 | **The platform tests hung while another project ran its end-to-end tests.** On a workstation where a project ran a long end-to-end run, 2026-11-14, the platform suite stopped at the same test, again and again: `test_evidence.py` starts a real run, which waits on the machine's end-to-end lock (`$XDG_RUNTIME_DIR/nstack-e2e.lock`, D84's one run at a time) — held, rightly, by the other project's run | **Done**: every test has a runtime folder of its own (`conftest.py`), so no test ever takes or waits on the machine's lock; the tests of the lock itself already set theirs. Seen red first: the file hung under a held lock, and passes in seconds under the same lock | | v0.6.0 | **What is announced refuses, and the documents say what is true**: D51 to D54, and the documentary lot of the internal audit | **Done (2026-09-20)**: five workstreams merged (#83, #84, #85, #86, #87), **v0.6.0 published**, tag on `8ae544c`, verified on published artefacts — including an update of `tool-library` from v0.5.0, 9 files and no conflict, still compliant. Found doing it: D55. Next: the pilot, and M11 beside it | | Pilot | **`NapkinStack/flet`, the first real project**, run by a session that knew nothing of this repository, with the maintainer as decider and this repository's agent as observer — public on the Free plan, where the whole checklist is available, rather than private on Team where G5 is paid and G6 does not exist | **Set aside by the maintainer, 2026-10-15**, at its cycle boundary; the real product followed since is `summit`. **Ran from 2026-09-20**: discovery decided *go* after three rounds and two independent challenges, charter accepted; cycle 01 closed `stopped/reframed`, **cycle 02 closed** with two deliverables accepted and one deferred (its #27), **cycle 03 framed and approved** (#28, #30), which starts its first `critical` module; the framework taken to v0.6.1 by itself at the boundary (#29), v0.6.2 proposed (#31). It has produced D56 to D63, D68, D70 to D77, replicated D26 and D55, and measured D49 — the first figures on what an independent verifier finds (PDR-0003) | | M11 | **Ceremony follows consequence** (PDR-0011): the framework charges what a failure costs, per module and per project, and states each price before it is paid; with PDR-0004's routing, and PDR-0007, PDR-0008 and PDR-0010 — through to v0.7.0 | **Published as v0.7.0 (2026-10-12).** Planned 2026-09-23 (#98). Merged: **M11f** (#101), **M11a** (#102), **M11b** (#103), **M11d** (#104), **M11e** (#105), **M11c** (#106), **M11h** (#107), **M11g** (#108) closed by its probe — not clean, returned to M13; **M11m** (D68, D74, D75); **M11l** (PDR-0010, D59, D60); **M11n** (D79); **M11o** (PDR-0010 extended: every document has its moment); **M11p** (PDR-0002's three levels given a place: `docs/project/rules/`); **M11j** (PDR-0007: the unframed stage); **M11q** (no folder created empty; PDR-0012 proposed: a project's tree is the project's). **M11k** (PDR-0008's print mode: `nstack settings`; D77, D78). **M11s** (PDR-0012 accepted; the framework's files under `.nstack/`; an update carries what a project adapted); **M11u** (an update rewrites the old addresses a project wrote in its own files, D85). **M11t** (`nstack new-contract`: the contracts module is created by the first contract; PDR-0012 built in full); **M11v** (what the third project found: D81, D82, D83, D86, D87). **M11i**: v0.7.0 published 2026-10-12 (#125, D88). To do: **M11r** PDR-0008's apply mode and D57, after a probe on the real forge; the two earlier projects take v0.7.0 themselves, observed | diff --git a/platform/tests/conftest.py b/platform/tests/conftest.py index edb03c69..e4c3a1d4 100644 --- a/platform/tests/conftest.py +++ b/platform/tests/conftest.py @@ -1,5 +1,7 @@ """No test asks the real registry or the real forge: `nstack doctor` reads the first for a newer -version (D91), the second for where an unpublished pin stands.""" +version (D91), the second for where an unpublished pin stands. No test waits on the machine's +end-to-end lock either: a real run of another project holds it for minutes, and a test that took it +hung the suite (D217) — each test has a runtime folder of its own.""" import pytest @@ -8,3 +10,10 @@ def _no_registry(monkeypatch): monkeypatch.setenv("NSTACK_REGISTRY_URL", "http://127.0.0.1:9") monkeypatch.setenv("GITHUB_API_URL", "http://127.0.0.1:9") + + +@pytest.fixture(autouse=True) +def _own_runtime(monkeypatch, tmp_path_factory): + runtime = tmp_path_factory.mktemp("runtime") + runtime.chmod(0o700) + monkeypatch.setenv("XDG_RUNTIME_DIR", str(runtime))