Commit Graph
557 Commits
Author SHA1 Message Date
weichen fb7104d7ce Acknowledge automatic material intake from task state
Why: The first material reply could stream an unsupported numeric relationship before the sourced background card had any verified finding.

Evidence: Task 2 red/green SQLite run tests cover parent provider suppression, queue/reuse, completed source binding, focus retention, squad entry, failed/unknown state, and attempt ordering; full Backend vet/Go/race SELF receipt /tmp/fast-slow-u3-r05-task2-backend-final-v2.json exited 0.

Impact: Prestarted material sends receive one server-owned status message with zero parent model calls; small-text and explicit completed follow-up paths retain their existing runner. No public contract or model budget increases.

Refs: U3 r0.5 approved design and plan; Backend PR #193
2026-10-14 08:20:11 +00:00
weichen 0637547cc5 Count omitted totals after successful subagent turns
ci / vet-and-test (pull_request) Successful in 47s
Why: A failed terminal without total_tokens can follow a successful tool turn, leaving the cumulative reported total stale even though prompt and completion include both turns.

Evidence: Mixed-turn persisted child test failed before the correction and passed after; SELF receipts usage-fix-mixed-turn-red-diagnostic.json, usage-fix-mixed-turn-green.json, and usage-fix-mixed-turn-full.json.

Impact: Reconcile against the larger of cumulative total or prompt-plus-completion while preserving cache and tool counts. No real-model sample was rerun.

Refs: U3 r0.4 A01; independent review /tmp/fast-slow-u3-r04-20261014/usage-fix-independent-review.md
2026-10-14 05:54:45 +00:00
weichen 61625c609f Account failed subagent terminal usage
ci / vet-and-test (pull_request) Successful in 52s
Why: A01 returned paid Usage on a rejected tool terminal, but the failed child run persisted zero because the runtime did not emit message_end.

Evidence: RED then GREEN for failed-terminal and persisted-child regression tests; SELF receipt /tmp/fast-slow-u3-r04-20261014/usage-fix-backend-verification.json records vet, full tests, and zero-paid live-tag checks.

Impact: Reconcile the returned cumulative Usage before persisting a failed child run; preserve actual tool-call counts. The original A01 quality result remains FAIL.

Refs: U3 r0.4 A01; /tmp/fast-slow-u3-r04-20261014/A01-independent-assessment.md
2026-10-14 05:46:54 +00:00
weichen 37e2cb7adb Add one-shot U3 r0.4 A01 evaluation label
ci / vet-and-test (pull_request) Successful in 46s
Why: The separately approved r0.4 trial must use its own bounded authorization label and output file, without reusing exhausted r0.3 artifacts.

Evidence: Both new label tests failed before the change and passed afterward; full Backend vet/Go suite and selected zero-paid live-tag budget/evaluation tests passed. No real provider call was made.

Impact: Evaluation-only selector and output name; production model routing, budgets and runtime behavior unchanged. Trial remains gated on fixed Dev CI and preflight.

Refs: U3 r0.4 one-time A01 resource approval in this conversation; Dev PR #512
2026-10-14 05:23:55 +00:00
weichen 549798c0a0 Merge current Backend main into U3 candidate
ci / vet-and-test (pull_request) Successful in 46s
Why: Preserve the accepted U7 account transaction and identity safeguards while retaining U3 material checkpoint startup ordering and runtime fixes.

Evidence: The shared app.go edits are in separate startup/account-maintenance sections; full Go and parent composition checks will be rerun after this merge.

Impact: Includes mainline account changes without changing U3 public contracts or model-call budget.

Refs: U3 r0.4 resource-preparation sync; Dev main 05b997b
2026-10-14 05:04:29 +00:00
weichen 8e80e2618e Merge pull request 'Serialize account recovery and session admission' (#185) from feature/u7-account-tx-audit into main
ci / vet-and-test (push) Successful in 49s
2026-10-14 04:14:47 +00:00
weichen e8cd0a45d7 Pin the complete stream terminal guard
ci / vet-and-test (pull_request) Successful in 45s
Why: Backend and Agent-Squad must consume the Agent-Native revision that rejects empty tool_calls and function_call terminals.

Evidence: Full Backend vet and Go test suite passed with both exact gitlinks.

Impact: Dependency gitlinks only; no Backend source change.

Refs: Agent-Native PR #46; Agent-Squad PR #53; U3 r0.4 review closure
2026-10-14 04:12:40 +00:00
weichen a4e33f192f Serialize account credential and session changes
ci / vet-and-test (pull_request) Successful in 49s
Why: Concurrent password changes, recovery key reissue, and session admission could accept retired credentials or omit rejected audits.

Evidence: Local Go vet and full tests passed; real PostgreSQL store suite, deterministic interleavings, and two-process contention passed with SELF receipts.

Impact: Account writes and session admission serialize per owner; stale sessions fail closed; checked rejections carry an audit row.

Refs: Agent-System-Dev #486; Agent-System-Backend #185; merge queue Issue #518
2026-10-14 04:08:14 +00:00
weichen 583c074aa4 Close U3 review gaps before provider continuation
ci / vet-and-test (pull_request) Successful in 50s
Why: Missing Usage must stop a paid sequence before a tool terminal is executable; exact attachment names and host-owned choices must also remain reliable.

Evidence: Each reported behavior had a failing regression before its fix. Full Backend vet/Go tests, live-tag budget tests, ten race replays, and six task-owned HTTP/Playwright scenarios passed with the aligned Agent-Native and Agent-Squad pins.

Impact: Evaluation terminal accounting becomes durable before delivery; material fallback matches bounded filenames; ready choices use host options without redundant model fields. No new model calls or budget authorization.

Refs: U3 r0.4 independent review Critical 1 and Important 3-4
2026-10-14 03:57:33 +00:00
weichen 76e7cc7c18 Deliver API keys through exclusive private files
Why: API-key issuance shares the account maintenance no-create and credential-output contract; the old CLI printed its key and lacked --out-file.

Evidence: The new subprocess test failed before the flag existed, then passed for private output and pre-mutation collision refusal; current go vet and all Go tests pass.

Impact: apikey create accepts protected --dsn-file and --out-file, preserves stdout default, and never overwrites an existing destination.

Refs: Backend PR #185; Dev PR #486; U7 KTD14
2026-10-14 03:47:11 +00:00
weichen 571e2bd28a Verify every maintenance entry refuses an absent database
Why: The safe open requirement covers user, apikey and identity verify, including default CLI paths.

Evidence: All three paths use private missing directories; previous full Go and PostgreSQL receipts cover the implementation, with a focused recheck before push.

Impact: Test coverage only; no runtime behavior or migration changes.

Refs: Backend PR #185; Dev PR #486
2026-10-14 03:42:57 +00:00
weichen 6dbe025ec1 Integrate atomic account maintenance with current authentication
Why: Deliver U7 account transactions and audit without losing main auth_version, restricted-session, project or migration behavior.

Evidence: SELF go vet and all Go tests passed; isolated PostgreSQL store tests, 20 repeated two-process admission rounds, and real SIGTERM/SIGKILL persistence passed. Original failures remain in receipts; exact-head CI and independent Review follow.

Impact: Adds schema v31, noncreating account CLI opens, preflight credential output, same-transaction audit, and bootstrap admission guards. No live database touched.

Refs: Backend PR #185; Dev PR #486; original U7 r2 account specification; 2026-10-14 Root takeover
2026-10-14 03:42:03 +00:00
weichen 726e4a6d2e Exercise material notice outcomes in the browser fixture
ci / vet-and-test (pull_request) Successful in 1m3s
Why: The task-owned mechanism must reproduce stage progress, partial and empty failures, and source-bound choices without a paid provider call.

Evidence: Backend vet/full Go tests and live-tag terminal tests passed; six task-owned HTTP/Playwright cases passed with this fixture.

Impact: Evaluation fixture only; model comparison still disables notice turns unless the explicit mechanism browser flag is set.

Refs: U3 r0.4 Task 6
2026-10-14 03:34:27 +00:00
weichen 8ea9a6e788 Align Agent-Squad dependency with stream guard
ci / vet-and-test (pull_request) Successful in 50s
Why: The Dev pin gate requires every Agent-Native consumer to use the same exact commit; Agent-Squad now pins the U3 r0.4 stream guard.

Evidence: GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... passed with this pin.

Impact: Backend dependency gitlink only; no source or public contract change.

Refs: Agent-Squad PR #53; U3 r0.4 Task 6
2026-10-14 03:24:36 +00:00
weichen efed68ca2c Stop evaluation after an incomplete provider terminal
ci / vet-and-test (pull_request) Successful in 53s
Why: the controlled A01 wrapper still allowed another paid request after a malformed tool terminal with returned Usage.

Evidence: local SSE RED→GREEN tests cover invalid JSON, missing DONE, late errors, missing Usage, rejected checkpoints, cross-run stop and record-write failure; live-tag fake tests and full Backend vet/tests pass.

Impact: diagnostic metadata and batch-wide fail-closed stop only; no new paid authorization or production route change.

Refs: U3 r0.4 design; internal/server/work_checkpoint_eval_test.go
2026-10-14 02:57:17 +00:00
weichen fb4b1e3c58 Gate material choices on verified results
Why: failed or ungrounded material notices still asked nontechnical users to choose deliverables and could act on invented model options.

Evidence: failure, partial, no-suggestion, forged-marker, source-drift, reload and host-option RED→GREEN tests; race, isolated PostgreSQL, full Backend vet and tests pass.

Impact: only a completed source-bound result with 3-4 bounded suggestions can offer a choice; failed or stale notices preserve truthful status and block unsolicited delegation.

Refs: U3 r0.4 design; internal/runmgr/material_notice.go; internal/runtime/material_choice_notice.go
2026-10-14 02:51:30 +00:00
weichen 5cdda85e18 Prioritize the first sourced material checkpoint
Why: the background model spent its first turns searching already provided text and failed before saving any staged finding.

Evidence: first-finding and two-phase RED→GREEN tests; SQLite and isolated PostgreSQL pass; full Backend vet and tests pass; v11 prompt grew 337 UTF-8 bytes in the fixed fixture.

Impact: material recipe v11 asks for one short sourced fact before optional search without changing the checkpoint schema or adding a separate model call.

Refs: U3 r0.4 design; internal/runmgr/material.go
2026-10-14 02:28:56 +00:00
weichen 495e72adac Scope material search fallback to current attachments
Why: combined filename and Chinese-keyword queries returned no hits even when the uploaded material was present, delaying useful background findings.

Evidence: combined-query, owner/project, duplicate, resource-policy, version-drift and excerpt RED→GREEN tests; SQLite and isolated PostgreSQL pass; Backend full vet and tests pass with the Agent-Native pin.

Impact: only a no-hit material subagent query may read a verified current-task attachment snapshot; general knowledge retrieval remains unchanged.

Refs: U3 r0.4 design; internal/runmgr/material_retrieve.go
2026-10-14 02:24:47 +00:00
weichen 4363a29653 Serialize tool deltas through runtime events
Why: wrapper-side tool deltas raced with serialized run events and could disappear under load.

Evidence: TestToolCallDeltaBeforeExecution race reproduced on the old path, then passed ten race runs with Agent-Native e86e74b; full Backend vet and tests pass.

Impact: one owner emits conversation events; Backend pins the Agent-Native event identity contract.

Refs: Agent-Native PR #46; internal/runtime/llm_direct.go
2026-10-14 02:24:26 +00:00
weichen 5f834544b0 Reserve a distinct r0.3 A01 evaluation entry
ci / vet-and-test (pull_request) Successful in 45s
Why: A future separately approved model trial must not reuse the consumed r0.2 label or overwrite its raw result.

Evidence: New label/output and 30000-token guard tests failed before implementation, then selected live-tag tests and Backend full Go suite passed.

Impact: Zero-paid evaluation entry only; its name does not grant resource approval or issue provider requests.

Refs: Dev task feature/fast-slow-u2-u3-plan; r0.3 plan Task 5
2026-10-13 17:59:26 +00:00
weichen 5f53f804e6 Constrain unsupported material analysis to cautious forms
Why: A model could put an affirmative approval before a late caution word and have the unsupported claim shown as analysis.

Evidence: Approval-behind-caution and task-prompt tests failed before repair; Backend full Go and no-paid live-tag mechanism suites passed after.

Impact: Keep a small set of cautious qualitative findings, replace all other free analysis with pending, clear model ancillary prose and bump material recipe to v10.

Refs: Dev task feature/fast-slow-u2-u3-plan; r0.3 fifth review Important finding
2026-10-13 17:47:31 +00:00
weichen badf80d491 Reject unchecked relation sources and unknown count units
Why: The fourth independent review found extra short quotes in direct relations and stale counts revised with an unfamiliar unit.

Evidence: Both inputs failed before repair; Backend full Go and selected no-paid live-tag mechanism tests passed after.

Impact: Direct relations accept one complete source, and count proof rejects unsupported numeric segments while preserving the bounded A01 grammar.

Refs: Dev task feature/fast-slow-u2-u3-plan; r0.3 fourth review Important findings
2026-10-13 17:43:13 +00:00
weichen 3f0141de47 Reject incomplete and revised numeric premises
Why: Independent review showed a truncated visible prefix, revised count and same-source shortcut could still produce unsupported claims.

Evidence: Each counterexample failed before repair; positive same-named scope, Backend go test ./... -count=1 and live-tag fake-stream tests passed after.

Impact: Require a visible sentence boundary or complete block, reject unrecognized count/revision segments, and require explicit common scope for unique membership.

Refs: Dev task feature/fast-slow-u2-u3-plan; r0.3 third review Important findings
2026-10-13 17:37:30 +00:00
weichen 6d50e487ca Canonicalize material quotes and own checkpoint status
Why: Independent re-review found single-word decision quotes, project-prefix scope mixing, revoked totals and approval status bypasses.

Evidence: Each new counterexample failed before repair; Backend go test ./... -count=1 and selected live-tag fake-stream tests passed after.

Impact: Display complete visible source sentences, parse only bounded positive count clauses, and set material progress text from the host phase.

Refs: Dev task feature/fast-slow-u2-u3-plan; r0.3 second review Important findings
2026-10-13 17:32:01 +00:00
weichen 9019f9082d Guard checkpoint claims against missing source context
Why: Independent review found negated short quotes, cross-project counts and unstructured batch placement could be shown as facts.

Evidence: Each counterexample failed before repair; Backend go test ./... -count=1 and selected live-tag mechanism/stop tests passed after repair.

Impact: Require unambiguous source sentence context and matching explicit scopes, keep only cautious ordinary analysis without structured evidence, neutralize unsafe status text.

Refs: Dev task feature/fast-slow-u2-u3-plan; r0.3 review P1 findings
2026-10-13 17:20:36 +00:00
weichen 756679dace Exercise pending set relations in mechanism fixtures
Why: Browser-level U3 validation must render a real host-normalized needs_user finding, not only source records.

Evidence: The new Playwright assertion failed against the previous fixture; selected live-tag mechanism and stop-rule tests pass.

Impact: Test-only fake stream adds an unsupported membership claim with source-indexed premises; no provider call.

Refs: Dev task feature/fast-slow-u2-u3-plan; r0.3 plan Task 4
2026-10-13 17:01:52 +00:00
weichen 62ad89578a Pin Core evidence export correction
Why: The generated TypeScript mirror must keep evidence helpers private to the module.

Evidence: Backend go test ./... -count=1 passed with Core b474394; frontend knip fix verification follows after regeneration.

Impact: Nested Core gitlink only; no runtime semantic change.

Refs: Backend PR #193; Dev task feature/fast-slow-u2-u3-plan
2026-10-13 16:48:39 +00:00
weichen 6841e7f45e Apply evidence normalization before checkpoint commits
Why: Valid but underdetermined model claims must become pending without losing the batch or leaking unsupported status text.

Evidence: Mixed-batch, source-input binding, approval-status, tool-receipt and prompt regressions failed before changes; go test ./... -count=1 and selected live-tag fake-provider tests passed.

Impact: Validate all task-bound sources, normalize once, return a safe receipt, and version material processing as v9; no extra provider call.

Refs: Dev task feature/fast-slow-u2-u3-plan; r0.3 evidence implementation plan Task 3
2026-10-13 16:27:33 +00:00
weichen 03ea625c54 Normalize evidence-backed material checkpoint claims
Why: The r0.2 model sample assigned interface-dependent requirements to a phase without source support.

Evidence: New source-count and set-bound tests failed before implementation; budget-item and internal-size regressions failed then passed; go test ./... -count=1 passed.

Impact: Add a pure, conservative normalizer and pin Core c722c16; no checkpoint submission or provider behavior changes yet.

Refs: Dev task feature/fast-slow-u2-u3-plan; r0.3 evidence implementation plan Task 2
2026-10-13 16:13:48 +00:00
weichen b0f6d27499 Merge main project access into U3 checkpoint work
Why: The current main adds private project member event handling that must coexist with U3 task projections.

Evidence: Resolved cardsvc and SSE conflicts; corrected atomic project-event proof placement after a compile RED; go test ./... -count=1 passed.

Impact: Preserve both private project visibility and task checkpoint behavior; no real-model rerun.

Refs: Backend PR #193; Dev task feature/fast-slow-u2-u3-plan
2026-10-13 15:53:43 +00:00
weichen 062b6f5af5 Bind evaluation budgets to actual run IDs
ci / vet-and-test (pull_request) Successful in 1m2s
Why: One paid A01 run split into multiple prompt-fingerprint groups, and persisted Usage omitted real checkpoint tool calls.

Evidence: Stable-run grouping, missing-ID refusal and tool-call usage regressions failed before and passed after; full Go, race and live-fixture checks passed.

Impact: Future controlled evaluations count per-run calls and deadlines by host run identity and persist tool-call usage. The failed r0.2 A01 record is unchanged.

Refs: U3 r0.2 A01 independent replay, Task 6
2026-10-13 14:44:53 +00:00
weichen 5d5fc9891c Merge pull request 'Enable private member work in shared projects' (#195) from feature/project-member-access into main
ci / vet-and-test (push) Successful in 45s
v0.4.0
2026-10-13 11:52:27 +00:00
weichen d26f3cf2e8 Protect private project event replay and live delivery
ci / vet-and-test (pull_request) Successful in 49s
Why:
Legacy project streams replayed upload filenames and parser metadata to newly
authorized members even though the underlying cards remained owner-only.

Evidence:
SELF real HTTP red regressions exposed legacy replay, spoofed sharing claims,
private-history pagination, and live delivery after membership removal. The
affected packages, uncached full Backend suite, isolated PostgreSQL Store suite,
and agent-system build pass after applying the event boundary.

Impact:
Registered lifecycle streams resolve trusted resource ownership and require an
internal publication proof for cross-owner delivery. Event and proof commit in
one transaction; v30 adds an additive SQLite/PostgreSQL sidecar without granting
access to historical events. Seen and visible cursors remain separate, revoked
members leave live streams, and unregistered base behavior remains compatible.
The storage migration tool preserves the new proof rows.

Refs:
project-member-access-implementation-plan.md Task 1 / R5; authorized legacy SSE
privacy follow-up; project-member-composed-legacy-project-history.json
2026-10-13 11:12:47 +00:00
weichen d89c72e018 Reserve a distinct one-shot A01 evaluation label
ci / vet-and-test (pull_request) Successful in 45s
Why: Reusing an exhausted authorization label would overwrite or misattribute the next controlled quality sample.

Evidence: New label/output and 30000-token guarded-run tests failed before implementation and passed after; full Backend Go suite passed.

Impact: The r0.2 A01 harness can be used only after separate resource approval, with an independent output name and existing two-run guard.

Refs: U3 quality implementation plan r0.2, Task 6 preparation
2026-10-13 11:10:33 +00:00
weichen 9126daed90 Preserve valid checkpoint claims and evaluator run identity
ci / vet-and-test (pull_request) Successful in 45s
Why: Independent review found false approval rejections, duplicate checkpoint counting and final-only reminder changes to evaluator grouping.

Evidence: Three focused regressions failed before fixes and passed after; go test ./... -count=1, race and live-tag fixture checks passed.

Impact: Valid questions and denials persist, only distinct checkpoint IDs count, and final-only requests keep their original run fingerprint.

Refs: U3 quality revision r0.2, independent final review
2026-10-13 10:51:05 +00:00
weichen 627b6e4f31 Apply numeric output and retry limits in checkpoint evaluation
Why: The isolated fixture passed integer settings to a float64-only reader, so the intended output cap and retry policy were ineffective.

Evidence: numeric-settings regression failed before and passed after; go test ./... -count=1 and live-tag fixture tests passed.

Impact: Mechanism and future explicitly approved model evaluations use their stated per-call output cap and disabled retries.

Refs: U3 quality revision r0.2, browser mechanism failure
2026-10-13 10:26:44 +00:00
weichen d2f96e79bb Admit private member uploads and preserve masked metadata edits
Why:
Nested unchanged credential masks left empty parents that looked like managed
subtree overwrites. Shared members also hit an owner-only upload guard, while
upload ingestion cards could disclose private filenames and parser metadata.

Evidence:
SELF independent nested-mask probe, HTTP nested/mixed writeback, member upload,
project card privacy and authorization-change regressions failed before each fix
and passed after it. Affected settings/server suite passed; exact final-object
build and independent replay remain delivery gates owned by the task coordinator.

Impact:
Prune only parents emptied by ignored masks; explicit empty/real managed writes
stay rejected. Registered uploads check live work and trusted project existence,
keep originals owned by the actor, and recheck before persistence. Suppress only
upload project cards when no private stream exists; explicit structure cards and
unregistered upload behavior remain available.

Refs:
Dev project-member-access plan r1 Task 1/R5; independent nested mask P2;
2026-10-13 composed member-upload and private project-stream acceptance findings
2026-10-13 10:23:37 +00:00
weichen d480030de7 Merge current main contracts into material checkpoint work
Why: Main advanced its account search and embedded Core contracts while the U3 candidate remained in review.

Evidence: go test ./... -count=1 on the merged working tree; Core, UI and Frontend merged tests passed separately.

Impact: Preserve the U3 work and account search while pinning the merged Core contract.

Refs: U3 quality revision r0.2, Dev task-sync conflict
2026-10-13 10:20:23 +00:00
weichen 373f8a1141 Reserve material subagent budget for final answers
Why: Material runs could spend the remaining budget on checkpoints and leave no final response.

Evidence: go test ./... -count=1; go test -race ./internal/runtime -run TestMaterialFinalReserve -count=1; offline replay of the prior A01 usage boundary.

Impact: Material subagents enter final-only mode or stop before another provider request; ordinary subagents retain their existing behavior.

Refs: U3 quality revision r0.2, Task 4
2026-10-13 10:13:48 +00:00
weichen 6345546b18 Reject unsupported approval claims in material checkpoints
Why: A source-valid analysis in the approved A01 sample promoted a requirement into an approved decision.

Evidence: The observed claim and six display fields failed before the guard, then passed with negative/question and mixed-clause regressions; full runmgr tests passed.

Impact: Keep exact material records while rejecting model-authored affirmative approval assertions before persistence; final model quality remains unverified.

Refs: Agent-System-Backend#193; Agent-System-Dev#512
2026-10-13 09:55:27 +00:00
weichen 6ecd75870d Present material sources once beside provided text
Why: The old source index repeated most of a three-document input and its test fixture depended on that duplicate layout.

Evidence: Source prefix, ID scope, parser revision, table, truncation and mechanism tests failed before the change and pass after; full runmgr tests pass.

Impact: Compact the material prompt without widening quote authority, and version the recipe so old results are not reused.

Refs: Agent-System-Backend#193; Agent-System-Dev#512
2026-10-13 09:46:59 +00:00
weichen c4435d1415 Protect shared project metadata credentials and managed settings
Why:
Legacy project metadata can contain credentials outside the settings scope table.
Sharing raw projection settings exposed them, and generic project PATCH bypassed
the system-managed path guard already enforced by project settings endpoints.

Evidence:
SELF member Host regression failed before the fix. The fixed 4f72aaf server
baseline overlay reproduced HTTP metadata leakage and managed PATCH returning 200.
SELF shared Host-to-HTTP, immutable mask, dotted/schema/fallback, public mutation
and atomic managed-write regressions passed; uncached full suite, isolated PG
Store suite and static build passed. Independent delta replay remains a gate.

Impact:
Registered lifecycle metadata returns detached credential-masked views while
preserving service/configuration keys and persisted data. Generic project PATCH
shares the existing managed validator before rename or settings mutation; allowed
metadata key shapes and raw owner-only management lookups remain available.

Refs:
Dev project-member-access plan r1 Task 1 and R5; approved hard secret boundary;
2026-10-13 shared project metadata review follow-up
2026-10-13 09:46:20 +00:00
weichen 4f72aaf3d8 Recheck resumed project work and isolate publication replacement
Why:
Membership could be revoked while a tool waited for confirmation or a queued
HITL reply waited for consumption. Publication replacement also crossed an
empty project scope or another plugin's source namespace for the same Ref.

Evidence:
SELF replay of all four independent review reproductions failed before the
fix and passed unchanged afterward. Committed regressions cover direct and
queued HITL, yes/session confirmation, direct artifact writes, protected vectors,
exact empty project scopes, literal wildcard IDs and unregistered compatibility.
SELF uncached go test ./..., isolated PostgreSQL Store tests and static build passed.

Impact:
Recheck trusted live owner/project authorization when HITL resumes and at write
boundaries. Registered publishers replace only exact owner/project/ref/plugin
rows and vectors; ordinary unregistered publication semantics are preserved.

Refs:
Dev project-member-access implementation plan r1 Task 1; independent Backend
review findings against b9bea5bee0
2026-10-13 09:04:06 +00:00
weichen b9bea5bee0 Filter private knowledge before applying shared result limits
Why:
Higher-ranked private rows could exhaust SQL candidate limits and hide an
otherwise authorized published slice from a member's current-project search.

Evidence:
SELF TestAuthorizedKnowledgeFiltersBeforeTopK failed with no shared hits before
the change and passed after it. SELF go test ./... and the isolated PostgreSQL
Store suite passed; independent replay and current-HEAD CI remain owner gates.

Impact:
Scan the resource-authorized shared fulltext path until enough allowed results
are found. Preserve ordinary legacy retrieval candidate limits and semantics.

Refs:
Dev project-member-access plan r1 Task 1; R5 published knowledge availability
2026-10-13 08:47:19 +00:00
weichen 7cf8f02399 Add project lifecycle delegation and private member work
Why:
Shared project reads previously doubled as write permission, project mutations
bypassed the domain lifecycle, and coarse retrieval shared private resources.

Evidence:
SELF red-before-implementation logs cover projection, lifecycle, private work,
resource filtering, canonical retrieval scope, publication source and namespace.
SELF go test ./..., isolated PostgreSQL go test ./internal/store -count=1,
and CGO_ENABLED=0 go build ./cmd/agent-system passed; task owner owns replay/CI.

Impact:
Add optional actor-scoped projection/lifecycle capabilities; registered providers
control public lifecycle and live work. Preserve owned conversation history and
ordinary unregistered behavior. Authorize knowledge by stored ID/source, map
current host scopes through trusted service metadata, and filter artifact lists.

Refs:
Dev project-member-access implementation plan r1 Task 1; approved design r0.1;
2026-10-13 trusted publication Source hardening ruling
2026-10-13 08:43:02 +00:00
weichen f74f6a010e Enforce the evaluation stop rule across runs
ci / vet-and-test (pull_request) Successful in 2m26s
Why: A rejected checkpoint did not stop a later paid request, and a history-only fix could miss JSON errors or other active runs.

Evidence: Source and JSON rejection fixtures failed before the instance-level guard, then passed with fail-closed and unrelated-tool checks; independent replay matched both real failed databases.

Impact: Read-only event correlation blocks future provider requests after a checkpoint rejection; original sample failure and stop-rule deviation remain recorded.

Refs: Agent-System-Backend#193; Agent-System-Dev#512
2026-10-13 08:13:23 +00:00
weichen 71fc384154 Stop live evaluation after rejected checkpoints
ci / vet-and-test (pull_request) Successful in 49s
Why: An approved one-shot sample continued to a paid model call after a nonliteral quote was rejected, contrary to its stop rule.

Evidence: A zero-paid provider fixture failed before the guard and passed afterward; the original 14231-token deviation remains recorded.

Impact: Future controlled evaluations refuse subsequent provider requests after a checkpoint tool error; this does not reclassify the failed sample.

Refs: Agent-System-Backend#193; Agent-System-Dev#512
2026-10-13 08:02:06 +00:00
weichen 51d7c6ab87 Count persisted checkpoints in live evaluation
ci / vet-and-test (pull_request) Successful in 51s
Why: A 250ms card poll missed a checkpoint saved about one millisecond before failure.

Evidence: The persistence regression failed before the fix, passed afterward, and independent read-only replay isolated the current conversation and running state.

Impact: Evaluation reads committed card events without changing model output or re-running the paid sample; U3 quality remains failed.

Refs: Agent-System-Backend#193; Agent-System-Dev#512
2026-10-13 07:42:09 +00:00
weichen 7f8674fe68 Bound the approved follow-up A01 evaluation
ci / vet-and-test (pull_request) Successful in 50s
Why: The prior one-shot A01 result failed and its resource approval is exhausted.

Evidence: Follow-up authorization tests failed before the change and pass after; full Backend suite passes.

Impact: Only live evaluation harness gains a separate one-shot result and 30000-token run budget; production validation remains strict.

Refs: Agent-System-Backend#193; Agent-System-Dev#512
2026-10-13 07:19:51 +00:00
weichen 15566f9a33 Merge pull request 'Bump embedded core pin to TS mirror fix 5773e74' (#194) from chore/bump-core-pin into main
ci / vet-and-test (push) Successful in 51s
2026-10-13 07:12:20 +00:00