From 4a28bb9ffd8676eb5e7d32022149b71de18cd527 Mon Sep 17 00:00:00 2001 From: Boki Date: Wed, 28 Oct 2026 00:39:21 -0400 Subject: [PATCH] docs(research): close original hypothesis read task --- docs/development/backlog/README.md | 4 ++-- docs/development/backlog/manifest.json | 17 ++++++++++------- docs/development/backlog/tasks/RP29.md | 2 ++ docs/development/real-data-research.md | 15 +++++++++++++++ 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/docs/development/backlog/README.md b/docs/development/backlog/README.md index 4b3745d4..55f29ad3 100644 --- a/docs/development/backlog/README.md +++ b/docs/development/backlog/README.md @@ -8,7 +8,7 @@ [manifest.json](manifest.json) owns scheduling metadata: status, priorities, dependencies, ADR approvals, assignments and write locks. Task Markdown owns implementation scope/evidence/acceptance. This index and the [graph](dependencies.mmd) are derived views. Only the planning/integration owner updates scheduling state. -**Current total: 105 retained IDs — 93 done, 1 in progress, 7 deferred, 4 merged.** RP18 completes the bounded October multi-session pilot; RP01–RP17 add the authorized real-data workflow and its dataset reuse, export and workflow recovery follow-ups. The earlier 68 IDs retain their state. E11 adds seven authorized cleanup tasks and one conditional replay extraction; see the manifest for current scheduling. The original backlog accounted for 55 IDs. F09/P07 added projection/profiling work; the owner deferred P08's TypeScript optimization. Merged records preserve traceability; never execute them separately. Deferred work requires its stated trigger and explicit activation. +**Current total: 105 retained IDs — 94 done, 7 deferred, 4 merged.** RP18 completes the bounded October multi-session pilot; RP01–RP17 add the authorized real-data workflow and its dataset reuse, export and workflow recovery follow-ups. The earlier 68 IDs retain their state. E11 adds seven authorized cleanup tasks and one conditional replay extraction; see the manifest for current scheduling. The original backlog accounted for 55 IDs. F09/P07 added projection/profiling work; the owner deferred P08's TypeScript optimization. Merged records preserve traceability; never execute them separately. Deferred work requires its stated trigger and explicit activation. States: ready, claimed, in_progress, review, done, blocked, deferred, merged. “Ready” means no code/ADR prerequisite, not execution authority. Implementation dependencies require accepted integration. `release_gates` govern enabling an end-to-end feature, not component coding or integration; conditional gates apply only to the named capability. F05 may integrate before F06, but its replay behavior is not released until F06 proves it. @@ -208,4 +208,4 @@ Owner authorized planning and per-task implementation commits. [Execution plan a - [RP27: Complete canonical run reads](tasks/RP27.md) — done, `66af201d`; research credentials inspect full native results through shared validation while the backend preserves trusted SQL binding. - [RP28: Frozen data reads for research](tasks/RP28.md) — done (`4b9c6428`); exact retained exports with complete content/hash verification in the typed client. -- [RP29: Original hypothesis reads](tasks/RP29.md) — in progress; reopen saved hypotheses and select their original immutable revisions through the typed client. +- [RP29: Original hypothesis reads](tasks/RP29.md) — done (`fa78b6a7`); reopen saved hypotheses and select their original immutable revisions through the typed client. diff --git a/docs/development/backlog/manifest.json b/docs/development/backlog/manifest.json index 29db4ca1..77169995 100644 --- a/docs/development/backlog/manifest.json +++ b/docs/development/backlog/manifest.json @@ -1,8 +1,8 @@ { "schema_version": 1, - "plan_revision": "2026-10-28.130", + "plan_revision": "2026-10-28.131", "repository_base": "b7aeca4", - "plan_status": "research_hypothesis_reads_in_progress", + "plan_status": "research_hypothesis_reads_complete", "execution_authorized": true, "execution_scope": { "authorized_by": "Owner: commit and continue with the rest of the tasks till 100%", @@ -3588,7 +3588,7 @@ "epic": "E12", "priority": "P2", "severity": "Medium", - "status": "in_progress", + "status": "done", "dependencies": ["A03", "R03", "RP25"], "decision_dependencies": [], "task_file": "backlog/tasks/RP29.md", @@ -3596,13 +3596,16 @@ "assignment": "/root", "write_locks": ["research-hypothesis-reads"], "blocker": null, - "integration_state": "in_progress", - "review_status": "pending", - "completed_commit": null, + "integration_state": "accepted", + "review_status": "accepted", + "completed_commit": "fa78b6a791f98770dfb03d36e09786b6580622b8", "completion_evidence": "real-data-research.md", "release_gates": [], "authorization": "Owner: commit and continue. Read existing authenticated hypothesis records/history with original revision selection; preserve AI creation, financial and trading boundaries. No real research execution or deferred work.", - "integration_base": "aa7201d4" + "integration_base": "aa7201d4", + "reviewer": "/root", + "planning_commit": "bbcec1c4", + "review_notes": "Root reviewed retained hypothesis read versus strict AI creation acknowledgements and original immutable revision selection. Two missing-capability red tests; final client/cycle 54 tests / 600 assertions; complete tooling 169 / 14,558; actual PostgreSQL AI workflow 6 / 299. Human revisions/archival, service authorship, wrong identity/duplicate histories, actual issued/revoked credentials, exact finding linkage and unchanged read-only counts verified. App/authored types, contracts, scoped lint/formatting, secrets and diff passed. Fixture-only authorship typing corrected. No independent review/full integration or repository check/native rebuild/browser rerun claimed. Disposable store stopped; no real study changes or deferred work." } ], "review_note": "Independent skeptical revision: four superseded tasks retain stable IDs; deferred work is not a dependency of scheduled tasks. Release gates are distinct from implementation prerequisites.", diff --git a/docs/development/backlog/tasks/RP29.md b/docs/development/backlog/tasks/RP29.md index a8a2138d..c6c71d5c 100644 --- a/docs/development/backlog/tasks/RP29.md +++ b/docs/development/backlog/tasks/RP29.md @@ -16,3 +16,5 @@ Acceptance/tests: - Run client/cycle and complete tooling suites; actual PostgreSQL AI workflow; application/authored types, contracts, strict scoped lint/formatting, secrets and diff checks. Existing backend/financial/UI behavior is unchanged, so no native rebuild or browser rerun is required. Definition of done: reproduce the missing read capability, implement the two narrow methods, review read-versus-create validation and immutable revision selection, pass gates, document use, update task state and commit. + +Accepted after root review: plan `bbcec1c4`, implementation `fa78b6a7`. Two baseline capability tests failed before implementation. Final client/cycle suites passed 54 tests / 600 assertions; complete tooling passed 169 / 14,558; actual PostgreSQL AI workflow passed 6 / 299. Application/authored types, contracts, strict scoped lint, formatting, secrets and diff checks passed. Actual issued/revoked credentials, archived and service-authored questions, original immutable revision recovery after human edits, exact finding linkage and unchanged read-only row counts were verified. The disposable database was stopped. [Execution evidence](../../real-data-research.md#rp29--original-hypothesis-and-revision-reads). diff --git a/docs/development/real-data-research.md b/docs/development/real-data-research.md index 7b8dc9ef..a1b2a052 100644 --- a/docs/development/real-data-research.md +++ b/docs/development/real-data-research.md @@ -506,3 +506,18 @@ Verification: - Application/authored-test types, contracts, strict scoped lint, formatting, secrets, web production build and diff checks passed. Authored adversarial fixtures were corrected to construct malformed wire copies without assigning to readonly typed fields. The build retains the existing nonblocking Vite chunk warning. Root reviewed exact-path permission and strict content/hash validation; no independent review, native rebuild, browser rerun or full repository `check` is claimed. Logs: `/tmp/stock-bot-rp28-red.log`, `rp28-focused-final.log`, `rp28-integration-final.log`, `rp28-tooling.log`, `rp28-postgres-final.log`, `rp28-typecheck.log`, `rp28-authored-types.log`, `rp28-contracts.log`, `rp28-lint.log`, `rp28-format.log`, `rp28-secrets.log` and `rp28-web-build.log`, all under `/tmp/stock-bot-`. The disposable PostgreSQL container was stopped after verification. No real study was changed or executed. All seven conditional tasks remain deferred. + +## RP29 — Original hypothesis and revision reads + +Plan `bbcec1c4`, implementation `fa78b6a7`. `ResearchClient.hypothesis(id, signal?)` and `hypothesisRevisions(id, signal?)` read the existing authenticated endpoints. They preserve complete ownership/archive metadata and immutable revision IDs, ordinals, title, proposition, validation criteria, timestamps and actual authorship. Reads accept human/AI/unknown origins and operator/service/agent authors; the existing creation acknowledgement still requires an AI-authored, unvalidated hypothesis. History checks parent identity and unique revision IDs/ordinals without reordering the response. + +README documents selecting the exact revision ID saved in the journal or finding and stopping if it is absent. A human edit to the latest proposition cannot substitute for the original question. Archived questions remain readable, and a finding's immutable hypothesis-revision linkage remains unchanged. No route, permission, database, financial engine, candidate execution, recovery or UI behavior changed. These reads issue no mutations, retries or replacement research jobs. + +Verification: + +- Two missing-capability tests failed before implementation. Final client/cycle suites passed **54 tests / 600 assertions**, covering complete original text/criteria, human edits and archival, service authorship, strict creation acknowledgements, wrong identities, malformed fields, empty/mixed-parent/duplicate history, missing selection, invalid IDs, HTTP failures, aborts and both read deadlines with an uncooperative transport. +- Complete tooling: **169 passed / 14,558 assertions**, zero failures. Focused counts overlap that suite. The initial 168 / 14,546 run preceded the added creation-acknowledgement regression and is not added to the final total. +- Actual authenticated PostgreSQL AI workflow: **6 passed / 299 assertions**. Issued credentials reopen AI-created questions after fixture-only human revision and archival, recover both exact immutable revisions, and read service questions. Missing IDs return 404 and revoked credentials return 401. Read requests remain GET-only and hypothesis/revision/artifact/experiment/run counts stay unchanged. Existing isolated-candidate/native runs still pass; their findings retain the original hypothesis revision after a later human edit. +- Application/authored-test types, contracts, strict scoped lint, formatting, secret audit and diff checks passed. Initial authored-test typing caught widened fixture authorship strings; explicit fixture typing and a string comparison corrected the assertions without changing runtime behavior. Root reviewed read-versus-create validation and original revision selection. No independent review, full integration/repository check, native rebuild or browser rerun is claimed for this client-only addition. + +Logs: `/tmp/stock-bot-rp29-red.log`, `rp29-client-final.log`, `rp29-tooling-final.log`, `rp29-postgres.log`, `rp29-typecheck.log`, `rp29-authored-types.log`, `rp29-contracts.log`, `rp29-lint.log`, `rp29-format.log` and `rp29-secrets.log`, all under `/tmp/stock-bot-`. The disposable PostgreSQL container was stopped after validation. No real study was changed or executed. All seven conditional tasks remain deferred.