From 3dd414ed15f2611e7eca4148c9d4b99927fa847a Mon Sep 17 00:00:00 2001 From: sprooty Date: Wed, 5 Aug 2026 03:24:31 +0000 Subject: [PATCH] fix: do not track a run's own event stream `events.jsonl` from an rdpapp run was swept into the previous commit by `git add -A`. A run writes its event stream and its queue wherever it is started; neither is part of the harness's history. Co-Authored-By: Claude Opus 5 (1M context) --- .gitignore | 6 ++++++ events.jsonl | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 events.jsonl diff --git a/.gitignore b/.gitignore index 93e68f0..5d623f3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,9 @@ build/ # Session-local agent scratch; the worktrees under here are separate checkouts. .claude/ + +# Run artefacts. A run writes its event stream and queue wherever it is +# started, and neither belongs to the harness's own history. +events.jsonl +*.sqlite +*.sqlite-* diff --git a/events.jsonl b/events.jsonl deleted file mode 100644 index 50de244..0000000 --- a/events.jsonl +++ /dev/null @@ -1,5 +0,0 @@ -{"ts": 1785899243.5450313, "kind": "work", "worker": "mydevenv2-dev:3107904", "item_id": "R7", "issue": null, "outcome": "started", "error_class": null, "detail": null, "session_id": null, "session_url": null, "project_id": "rdpapp"} -{"ts": 1785899243.6182284, "kind": "work", "worker": "mydevenv2-dev:3107904", "item_id": "R7", "issue": null, "outcome": "agent_started", "error_class": null, "detail": "affa8f68-0507-446c-9281-34280bd77af3", "session_id": "affa8f68-0507-446c-9281-34280bd77af3", "session_url": "http://localhost:8910/t/affa8f68-0507-446c-9281-34280bd77af3", "project_id": "rdpapp"} -{"ts": 1785899353.6382027, "kind": "work", "worker": "mydevenv2-dev:3107904", "item_id": "R7", "issue": null, "outcome": "agent_finished", "error_class": null, "detail": null, "session_id": "affa8f68-0507-446c-9281-34280bd77af3", "session_url": null, "project_id": "rdpapp"} -{"ts": 1785899353.6437557, "kind": "work", "worker": "mydevenv2-dev:3107904", "item_id": "R7", "issue": null, "outcome": "refused_as_impossible", "error_class": null, "detail": "# Refusal: the support-bundle tests cannot build a bundle without a live Postgres\n\nThe item states its own stopping condition:\n\n> If the existing tests cannot build a bundle without a live Postgres, say so\n> and stop rather than introducing a mock \u2014 that is a correct outcome and a\n> different item.\n\nThat condition holds. Nothing else in the item is ambiguous; this one fact\nrules out delivering a test that \"passes now\" under the stated check.\n\n## What I found\n\n**The only support-bundle assertions live inside an ignored Postgres test.**\nEvery existing reference to the bundle in `crates/rdpapp-gateway/src/main.rs`\nis inside `postgres_auth_csrf_roles_and_connection_persistence`\n(`crates/rdpapp-gateway/src/main.rs:15195`), which is declared:\n\n```rust\n#[tokio::test]\n#[ignore = \"requires RDPAPP_TEST_DATABASE_URL\"]\nasync fn postgres_auth_csrf_roles_and_connection_persistence() {\n let database_url = env::var(\"RDPAPP_TEST_DATABASE_URL\")\n .expect(\"set RDPAPP_TEST_DATABASE_URL to a disposable Postgres database\");\n```\n\nIts own doc comment says the ignore is deliberate: \"Keeping this ignored in the\nordinary unit suite makes `cargo test` independent of a developer's local\nDocker setup.\" The bundle assertions run at\n`crates/rdpapp-gateway/src/main.rs:15841`-`15876`, including the existing\n`assert!(!support_bundle_text.contains(\"rotated-secret\"))` \u2014 the closest\nneighbour to what this item asks for.\n\n**The fixture is a real database, not an in-memory one.** That test builds\n`Repository::new(pool, test_vault())` from a `PgPoolOptions::connect(...)`,\nmigrates, `TRUNCATE`s, and calls `app_with_repository(...)`\n(`crates/rdpapp-gateway/src/main.rs:11996`\u2026 declared at\n`crates/rdpapp-gateway/src/main.rs:10996`). `just test-integration` (justfile\nline 25) exists precisely to bring up `docker compose ... postgres` for it.\n\n**There is no non-Postgres route to a serialised bundle.**\n`download_support_bundle` (`crates/rdpapp-gateway/src/main.rs:6915`) obtains its\ndata through `repository(&state)?`\n(`crates/rdpapp-gateway/src/main.rs:6252`), which returns the concrete\n`Repository` struct (`crates/rdpapp-gateway/src/main.rs:95`) or a\n`503 repository_unavailable` when `state.repository` is `None`. `Repository` is\na struct over a `PgPool`, not a trait, so it cannot be substituted. The snippet\nrows the bundle maps from come from\n`Repository::snippets` (`crates/rdpapp-gateway/src/main.rs:2807`), a direct\n`sqlx::query(\"SELECT id,name,text,revision FROM snippets ...\")` against\n`self.pool`. Creating a workspace snippet with a sentinel `text` and then\nserialising a bundle for that workspace \u2014 exactly what the item asks \u2014 therefore\nrequires a live Postgres.\n\n## Why this collides with the item as written\n\n- Scope point 2 requires the test to **pass now**. The judging check is\n `cargo test -p rdpapp-models -p rdpapp-sessions -p rdpapp-gateway`, which does\n not run `#[ignore]`d tests and does not set `RDPAPP_TEST_DATABASE_URL`. A test\n written against the neighbouring fixture would be skipped, not passed.\n- Scope point 4 requires reusing the neighbours' fixture rather than\n introducing a new one, and point 3 forbids any production change. So the two\n routes that would make the test run under the stated command are both closed:\n a fake/in-memory repository is the mock the item rules out, and making\n `Repository` substitutable is a production change.\n\n## What the different item would be\n\nAdding an `#[ignore = \"requires RDPAPP_TEST_DATABASE_URL\"]` sentinel test beside\n`postgres_auth_csrf_roles_and_connection_persistence`, guarding the bundle under\n`just test-integration` rather than under `cargo test`. That is a real guard and\nit is not a mock, but it does not satisfy \"passes now\" against the check this\nitem is judged by, so I have left it undone rather than quietly redefining the\nscope. Deciding whether the integration suite is the right home for this guard\nis the call the follow-up item should make.\n\nNo other change is left in the working tree.", "session_id": "affa8f68-0507-446c-9281-34280bd77af3", "session_url": null, "project_id": "rdpapp"} -{"ts": 1785899353.654138, "kind": "work", "worker": "mydevenv2-dev:3107904", "item_id": "R7", "issue": null, "outcome": "worktree_removed", "error_class": null, "detail": "reclaimed 13094912 bytes", "session_id": null, "session_url": null, "project_id": "rdpapp", "worktree_bytes": 13094912}