Commit Graph
561 Commits
Author SHA1 Message Date
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
weichen 4e285bdd8d Bump embedded core pin to TS mirror fix 5773e74
ci / vet-and-test (pull_request) Successful in 1m3s
Why: 三层 pin 全等——Core 权威 TS 镜像补受管 scope 后,Backend 嵌套 pin 同步。
Evidence: go build 通过;组合校验随 Dev CI。
Impact: gitlink 一枚。
2026-10-13 07:07:47 +00:00
weichen e1c994c60c Guide smaller source-literal checkpoint publications
ci / vet-and-test (pull_request) Successful in 52s
Why: The bounded A01 model call produced a five-finding malformed payload and an abbreviated quote that strict validation correctly rejected.

Evidence: Full Backend suite passed; original paid failure and rejected source citations remain unchanged.

Impact: Advertise one to three findings per publication and continuous literal quotes, bumping material recipe identity to v7; Core authority and budget remain unchanged.

Refs: U2/U3 failed A01 assessment and proposed bounded follow-up
2026-10-13 06:50:16 +00:00
weichen 9cbdc82908 Merge current account search before the compact checkpoint candidate
Why: Retain the newest protected Backend main alongside the approved work branch.

Evidence: Exact upstream object fetched; affected checks follow.

Impact: Preserve both histories and review the new model-tool guidance as a separate delta.

Refs: Agent-System-Dev U2/U3 delivery
2026-10-13 06:47:18 +00:00
weichen 31a6b326c6 Merge pull request 'Add account name passthrough and EXT-19 account search' (#191) from feature/rdm-increment-account-search into main
ci / vet-and-test (push) Successful in 49s
2026-10-13 06:26:51 +00:00
weichen 0bc4b0f794 Merge current account hardening into work checkpoint branch
ci / vet-and-test (pull_request) Successful in 46s
Why: Preserve the newest protected main for the combined review candidate.

Evidence: Exact incoming object fetched; affected checks will replay.

Impact: Retain both histories without relaxing source or task authority.

Refs: Dev main aa6364f
2026-10-13 06:24:35 +00:00
weichen baaafe99d3 Merge origin/main into feature/rdm-increment-account-search
ci / vet-and-test (pull_request) Successful in 47s
2026-10-13 06:21:41 +00:00
weichen cfb8308895 Merge pull request 'Close the account lifecycle leftovers: atomicity, bootstrap lock, redeem guard, credential delivery' (#192) from feature/svc-account-hardening into main
ci / vet-and-test (push) Successful in 47s
2026-10-13 06:07:33 +00:00
weichen bc1e0a36f7 Close the account lifecycle leftovers: atomicity, bootstrap lock, redeem guard, credential delivery
ci / vet-and-test (pull_request) Successful in 51s
Why: The login recovery contract leftovers and KTD12/KTD14 require:
concurrent same-name account creation must not overwrite the winner,
first-admin bootstrap must serialize across processes, the redeem
endpoint backoff must be shared across instances, revoked API keys
must close established SSE streams, and CLI credentials need an
env-DSN path plus a non-interactive 0600 file delivery mode.

Evidence: go test ./... green; new tests cover 16-way concurrent
create (1 win/15 conflict, winner credentials intact), 8-way
concurrent bootstrap (single admin, refuse takeover after), redeem
guard shared across two store handles on one DB, SSE stream closed
after key revocation within the recheck window, and HTTP 429 after
the failure cap (SELF worktree run; CI is the GATE, PG via test-pg).

Impact: Migration v29 (redeem_attempts); CreateAccount becomes a
single-row INSERT with unique-violation conflict; BootstrapFirstAdmin
advisory-locks (PG) / rechecks (SQLite) and commits admin+key+audit in
one transaction; SSE revalidation covers API-key streams; redeem
backoff moves to the shared DB; CLI gains AGENT_SYSTEM_DSN fallback
and --out file delivery for create/reset-password/issue-login-key/
bootstrap-admin.

Refs: docs/svc-deploy/2026-10-13-login-recovery-contract.md leftovers;
proposal r2 KTD12/KTD14/R5/R11.
2026-10-13 06:05:45 +00:00
weichen fe977c8e52 Record account search surface entries
ci / vet-and-test (pull_request) Successful in 50s
Why: AccountSearcher 属有意的公开契约扩展,表面快照随行。
Evidence: go test ./... 全绿(TestSurfaceSnapshot 通过)。
2026-10-13 06:05:10 +00:00
weichen e3b6cca8bc Add account name passthrough and EXT-19 account search
Why: P3 人员选择器需要按账号或姓名查找成员并区分同名——EXT-19 目录此前只有 owner+有效态;扩展申请四要素记入 Dev 任务卡(授权管理读面下发姓名,联系方式仍不下发;停用能力经 facts F6 核实为未实现,Valid 维持存在性口径)。
Evidence: go test ./... 全绿;TestInprocHostSearchAccounts 覆盖姓名/账号子串、大小写不敏感、空 query 首页、ListAccounts 姓名回归;facts F5/F6 登记随 Dev PR。
Impact: AccountEntry 加 Name 可选字段;新增可选接口 AccountSearcher 与 inprocHost 实现;既有消费者不受影响(字段可选、接口可选)。
Refs: 提案 r1 P3;Dev 任务卡 feature/rdm-increment-settings-duties
2026-10-13 06:04:26 +00:00
weichen e69865e11b Seed isolated evaluation routes through the trusted system layer
Why: Upstream now reserves model and mock settings for system authority.

Evidence: Complete merged Backend suite and live resource/cap guards pass.

Impact: Fixture-only startup configuration, same effective route and profile; no further paid calls.

Refs: Upstream scoped settings contract; U2/U3 evaluation
2026-10-13 05:59:57 +00:00
weichen 7855d82bc0 Merge scoped settings and session checks with the work checkpoint contracts
Why: Resolve the component conflict using the tested combined Core lineage.

Evidence: Both exact Core histories are included in beafd753; no source conflict in App or Server.

Impact: Preserve TaskSnapshot and upstream managed settings/session checks; composition replay follows.

Refs: Core beafd753; Backend main 741da4a0
2026-10-13 05:56:45 +00:00
weichen 62a2ab47e8 Report zero accepted findings honestly after stopped work
Why: The failed extra A01 had no accepted findings but claimed saved discoveries and future progress.

Evidence: The zero-findings regression failed before the fix; full RunMgr tests now pass.

Impact: Use truthful conclusion, remaining and next-step text while retaining strict source validation.

Refs: Independent extra A01 assessment; approved R08
2026-10-13 05:54:21 +00:00
weichen 31efafa479 Run the explicitly approved A01 replay with a two-run limit
Why: The user approved one additional A01 sample after the original six-case batch failed its quality gate.

Evidence: Live fixture tests preserve the production output cap and reject paid requests when a third actual run exists.

Impact: Evaluation-only case selection and resource guard; no production behavior changes, no automatic replay.

Refs: User approval 2026-10-13; reported token target 60000
2026-10-13 05:08:35 +00:00
weichen 741da4a0b6 Merge pull request 'Seed the mock startup option into the system settings scope' (#190) from fix/mock-startup-system-scope into main
ci / vet-and-test (push) Successful in 1m13s
2026-10-13 04:46:44 +00:00
weichen 0af1ebc915 Seed the mock startup option into the system settings scope
ci / vet-and-test (pull_request) Successful in 48s
Why: Since the system-managed settings change (#188), runtime.* writes
at the user scope are rejected, so the mock startup flag failed with
"system-managed settings require admin" and the serve process never
became healthy - the Dev multi-instance integration regression.

Evidence: go build ok; internal/app and internal/settings suites green
(SELF); the Dev composite CI on the follow-up PR re-runs
make test-multi-instance against this fix (GATE).

Impact: The mock startup flag now seeds runtime.mock via MergeSystem
(trusted operator input, effective for every tenant through the
Effective merge chain); no HTTP surface changes.

Refs: Dev PR #508; backend #188.
2026-10-13 04:45:12 +00:00
weichen 349a47de6f Merge pull request 'Close invalid sessions SSE streams at heartbeat recheck' (#189) from fix/sse-session-invalidation into main
ci / vet-and-test (pull_request) Successful in 48s
ci / vet-and-test (push) Successful in 1m10s
2026-10-13 04:35:26 +00:00
weichen 8b73afeef6 Close invalid sessions' SSE streams at heartbeat recheck
ci / vet-and-test (pull_request) Successful in 55s
Why: The 2026-10-13 login recovery contract (Dev docs/svc-deploy/
2026-10-13-login-recovery-contract.md, plan item 6.7) requires that
established SSE connections stop receiving private events once a
password write destroys their session.

Evidence: go test ./... green; TestSSESessionInvalidationClosesStream
streams over a real HTTP server, invalidates the session via
AdminResetUserPassword, and asserts the stream terminates with the
session-expired marker within the recheck window (SELF, worktree run).

Impact: Session-authenticated event streams revalidate at a 15s
heartbeat cadence (package var, shortened in tests) and terminate on
invalidation; API-key streams are unchanged (key revocation is separate).
EventSource reconnects are rejected by the auth middleware.

Refs: Dev PR #504; login recovery contract section 6.7.
2026-10-13 04:33:17 +00:00
weichen 6a2d85cbb9 Clear continuation promises during restart recovery
Why: A reconciled task must not retain the old queue or running next step after becoming interrupted.

Evidence: Owned queue recovery failed before the fix; RunMgr, actual App startup and evaluation output-cap checks now pass.

Impact: Recovery uses the stopped-task next step, and the mechanism fixture quotes the actual acceptance source text.

Refs: Approved recovery contract; independent terminal-state review
2026-10-13 04:31:49 +00:00
weichen 76c75ce50c Merge pull request 'Enforce system-managed settings scope with admin system settings API' (#188) from feature/rdm-increment-settings-duties into main
ci / vet-and-test (push) Successful in 58s
2026-10-13 04:29:25 +00:00
weichen 2a64432fc8 Make stopped work actionable and retain detailed execution errors
Why: A budget-stopped task retained a promise to generate a final result, while readable card errors need the full diagnosis in the execution record.

Evidence: Continuation-promise and missing-error-record regressions failed on the prior implementation; the full Backend suite now passes.

Impact: Terminal next steps require user action, stopped work has clear labels, and precise subagent errors persist outside the default task summary.

Refs: Independent A04 model assessment; approved R08 and R10
2026-10-13 04:26:38 +00:00
weichen 496c784213 Merge origin/main into feature/rdm-increment-settings-duties
ci / vet-and-test (pull_request) Successful in 1m2s
2026-10-13 04:22:36 +00:00
weichen 386afcd4a6 Point core pin at merged main 0f94e4b0
ci / vet-and-test (pull_request) Successful in 42s
Why: Core PR #30 合入后按 pin 级联惯例把嵌套 pin 对准组件 main 合入提交。
Evidence: go test ./internal/settings/ ./internal/server/ 全绿。
Impact: 仅 gitlink 指针调整(同一能力内容,9150e6f 为其祖先)。
2026-10-13 04:20:07 +00:00
weichen ee65604d83 Keep material records literal and preserve production evaluation limits
Why: Authentic quotes do not establish an unstated approval, and the evaluation wrapper must honor tighter production output limits.

Evidence: Approval-overstatement and 780-token-cap regressions failed first; complete Backend suite and fixture cap checks now pass.

Impact: Render material records from trusted labels and validated quotations, reserve interpretation for explicit finding kinds, bump recipe identity and cap the fixture without overriding smaller limits.

Refs: Approved R05; independent model assessment; original failed samples preserved
2026-10-13 04:16:31 +00:00
weichen f6b536029a Merge commit '467718a519eb21980e61b8df541de53e94130e95' into feature/fast-slow-u2-u3 2026-10-13 04:06:22 +00:00
weichen 3e330e3d37 Publish material findings progressively and retain the final conclusion
Why: The first real-model sample batched discoveries, overcalled scope differences and exposed process chatter as a terminal conclusion.

Evidence: Preserve the failed A01 sample; process-text regression failed before the fix, then complete Backend and focused runtime checks passed.

Impact: Bump recipe identity, qualify quantities and approvals, exclude Process parts from canonical results and capture independent historical evaluation snapshots.

Refs: Approved U2/U3 plan; independent model review and native SELF receipts
2026-10-13 04:05:21 +00:00
weichen 716fe9541c Enforce system-managed settings scope with admin system settings API
Why: P2——模型、密钥、Tavily、遥测与运行基础设施属系统受管项;user/project 层须整笔拒绝(含嵌套、点路径与子树覆盖),生效链剥除存量覆盖,管理员经新系统面统一配置。
Evidence: go test ./... 全绿;settings 单测覆盖嵌套/点路径/祖先标量拒绝、系统层生效、读面剥除;server e2e 覆盖 400/系统面读写/掩码;认证档 admin 门测试(普通 403、admin 200、密钥不泄漏)。
Impact: settings.go 受管标记与 mergeScope 拦截、Effective 增系统层、server 新增 GET/PUT /api/settings/system(无认证档本机即管理员)、SecretLookup 系统行回退、插件 schema 受管注入;测试基建 mock seed 与三处用例迁到系统层;svc.sh 播种改走系统面(仅 admin,无管理员时明确跳过)。Core gitlink 升至 9150e6f。
Refs: modules/documents/docs/proposals/2026-10-13-rdm-settings-members-duties-perms-increment.md P2
2026-10-13 04:05:15 +00:00
weichen f103540d60 Merge pull request 'Harden login-key recovery flow with auth-version transactions' (#187) from feature/svc-login-recovery-flow into main
ci / vet-and-test (push) Successful in 46s
2026-10-13 04:03:05 +00:00
weichen 4a0418e211 Preserve source authority and task identity through delivery and recovery
Why: Delayed notices, plugin name collisions and startup recovery exposed stale sources or silently created new attempts; deletion lost search index cleanup.

Evidence: Meaningful red regressions and the corrected complete Backend suite passed; production startup was exercised through an isolated subprocess.

Impact: Revalidate notices at delivery, retain plugin dispatch, restore index cleanup and complete all service wiring before recovery and public intake. Scope fixture processes and wait for owned transcript writes.

Refs: Agent-System-Dev feature-fast-slow-u2-u3-plan; independent review findings 1-3 and startup supplement
2026-10-13 03:55:04 +00:00
weichen 467718a519 Harden login-key recovery flow with auth-version transactions
ci / vet-and-test (pull_request) Successful in 52s
Why: The login recovery contract (2026-10-13) requires admin-issued
one-time keys, in-transaction revalidation of restricted sessions, a
login race guard, and audited password writes; the previous
implementation validated sessions outside the change-password
transaction and let stale password verifications create sessions.

Evidence: go test ./... green (SQLite); store tests switch to
openTestStore so the CI test-pg job covers real PostgreSQL, including
100-way concurrent redeem single-winner and auth-version race cases
(SELF, local run).

Impact: New migration v28 (users/sessions.auth_version,
account_events). New admin endpoints POST/GET
/api/admin/users/{owner}/login-keys and DELETE
.../login-keys/{id}. Login binds session creation to the verified
auth version and creates restricted sessions for must-change accounts;
redeem gains per-IP backoff; cookies gain Secure under TLS; active
change-password and admin/CLI resets become single transactions that
bump auth_version, revoke keys and sessions, and write audit events.

Refs: modules/documents/docs/proposals/2026-10-12-svc-unified-deploy-and-login-key.md r2; Dev task feature/svc-login-recovery-flow
2026-10-13 03:36:38 +00:00
weichen 3d94c5df1a Connect deferred material intake to the runtime stop hook
Why: Text with short attachments previously completed without starting the intended background material task.

Evidence: SELF real HTTP/browser reproduction shows the absent second task; runtime, manager and server regressions pass with the existing optional port connected.

Impact: Preserves dispatch timing and makes deferred intake observable; comparison records the baseline gap without rerunning a sample.

Refs: fast-slow-u2-u3 A02 and reading acceptance
2026-10-13 03:08:33 +00:00
weichen c50f9f07e8 Guard source previews against content version substitution
Why: Opening a processed source must not show changed current bytes as the quoted version.

Evidence: SELF TaskSourceContent regression fails before and passes after expected-hash enforcement; artifact regressions and live compilation pass.

Impact: Optional content hash narrows the existing authorized artifact read; controlled fixtures select a genuinely provided quotation.

Refs: fast-slow-u2-u3 source-version acceptance
2026-10-13 02:51:07 +00:00
weichen 0dad4f3f70 Merge commit 'dc736e339d01c59e658abc63c81909059bd6ea02' into feature/fast-slow-u2-u3 2026-10-13 02:44:19 +00:00
weichen c2851d498f Use repository prompt recipes in controlled model comparison
Why: Baseline and candidate must exercise their actual default prompts with identical route and resource limits.

Evidence: SELF live-tag compilation passes.

Impact: Evaluation harness only; normal automatic notice quality remains outside the controlled comparison.

Refs: fast-slow-u2-u3 Task 7
2026-10-13 02:41:16 +00:00
weichen 4184430d6d Keep source changes visible and bound evaluation calls consistently
Why: Updated or missing sources must remain visible as limitations, and comparison calls need stable prompt grouping.

Evidence: SELF card/server suites and live-tag compilation pass.

Impact: Adds neutral source limitations and refines test-only provider accounting.

Refs: fast-slow-u2-u3 Tasks 6 and 7
2026-10-13 02:36:57 +00:00
weichen d7597fea05 Build the isolated evaluator with the native provider client
Why: The live harness must use the actual client constructor and preserve MiniMax reasoning separation.

Evidence: SELF live-tag compilation passes without provider calls.

Impact: Test harness only; no production route changes.

Refs: fast-slow-u2-u3 Task 7
2026-10-13 02:31:10 +00:00
weichen 13e880feec Publish validated material findings during background work
Why: Real source-backed discoveries should reach the same task card before the slow channel completes.

Evidence: SELF receipts record runtime and manager checkpoint red-green tests, scoped source/version checks, privacy filtering, quota corrections, and SQLite/PG regressions; fixed composition and live comparison follow.

Impact: Adds a local material-only checkpoint sink with no summary model calls, uses version witnesses for source commits, and preserves existing reading and notification paths.

Refs: fast-slow-u2-u3 Tasks 6 and 7; test-only live HTTP harness bounds shared provider requests without approving HITL
2026-10-13 02:29:23 +00:00
weichen dc736e339d Merge pull request 'Fall back to local artifacts when the blob store is a typed nil' (#186) from fix/u7-k4-artifact-upload into main
ci / vet-and-test (push) Successful in 43s
Why: an unset object-storage endpoint passed a typed nil into the store and artifact upload panicked.
Evidence: GATE vet-and-test run 2783 job 4031 success on 46073d30a5. Independent review approved with no blockers.
Impact: unconfigured stores fall back to the local artifacts directory. Configured S3 is unchanged.
Refs: #186
2026-10-13 01:53:02 +00:00
weichen b2f4f98d3c Bind background lifecycle and recovery to persistent tasks
Why: Queued work and completed results need stable identity, execution fencing, and honest recovery.

Evidence: SELF make evidence records four-task promotion, restart reconciliation, stale-executor fencing, and existing material/notice tests.

Impact: Uses namespaced existing execution leases and canonical atomic task updates; legacy results require trusted input bindings before reuse.

Refs: fast-slow-u2-u3 Tasks 2 and 4
2026-10-13 01:39:02 +00:00
weichen dd0c3ce7d0 Persist task projections and replay cursors atomically
Why: Background work needs consistent cards, events, and user reading state.

Evidence: SELF make evidence records SQLite rollback, projection, pin, and regression checks; PostgreSQL replay is pending the composition gate.

Impact: Adds an optional atomic task path and a consistent card replay cursor without schema changes.

Refs: Agent-System-Dev fast-slow-u2-u3 plan Task 3
2026-10-13 01:31:46 +00:00
weichenandCursor 46073d30a5 Fall back to local artifacts when the blob store is a typed nil
ci / vet-and-test (pull_request) Successful in 46s
Why: an unset S3 client passed through the Store interface is not a nil interface, so uploads panic instead of using the local artifact directory.
Evidence: TestIsNil and TestFinishOpenTypedNilS3UsesLocalArtifacts failed before this change and pass after it. The PostgreSQL case skips unless AGENT_PG_TEST_DSN is set.
Impact: only an unset blob store falls back; a constructed S3 or local store is unchanged.
Refs: internal/blobstore/blobstore.go internal/store/store.go
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 01:22:57 +00:00
weichen f9daf64cf3 Identify materials by content and register grounded source blocks
Why: equal-length edits and parser changes must not reuse prior results.

Evidence: content identity and provided-source tests RED to GREEN; backend suite recorded through evidence.

Impact: trusted optional document origins, content keys and source catalog; no new routing or DB schema.

Refs: U2/U3 Task2
2026-10-13 01:16:44 +00:00
weichen 2c740cd13f Consume persistent work snapshot contracts
Why: compile the work projection against the reviewed Core vocabulary.

Evidence: exact local Core task commit materialized; no backend behavior changed in this dependency step.

Impact: Core gitlink only.

Refs: U2/U3 Task1
2026-10-13 01:05:26 +00:00
weichenandCursor 9754531cc9 Merge origin/main into the account transaction branch
ci / vet-and-test (pull_request) Successful in 51s
Why: identity open and the unknown-subcommand check landed on main, and this branch still has to refuse account migration while advertising capabilities.
Evidence: go test ./internal/store ./internal/app ./cmd/agent-system ./pkg/identity passed after the merge.
Impact: identity verify uses the no-migrate opener and returns the schema version. Account open still does not migrate. v28 is registered as readable by older artifacts.
Refs: cmd/agent-system/main.go, internal/app/app.go, internal/store/store.go, internal/store/migrate_compat.go
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 15:49:42 +00:00
weichen c6fb13016a Merge pull request 'Open existing databases without migrating' (#184) from feature/d1-identity-open into main
ci / vet-and-test (push) Successful in 47s
Why: identity probes must open an existing database without creating or migrating it, and DSN must stay out of argv.
Evidence: GATE ci / vet-and-test success on 0f192a4813, run 2625 job 3782.
Impact: version --json carries schema target and compat floor; unknown top-level commands exit 2.
Refs: #184
2026-10-12 15:05:04 +00:00
weichenandCursor 0f192a4813 Merge origin/main into feature/d1-identity-open
ci / vet-and-test (pull_request) Successful in 57s
Why: main gained AGENT_SYSTEM_DSN fallback in #182 after this branch
was cut. Both changes touch identity DSN parsing.
Evidence: go test ./pkg/identity/ ./internal/store/ ./cmd/agent-system/ for the identity, schema, and unknown-subcommand cases passed after the resolution.
Impact: keeps open-existing identity mode and the 0600 dsn file. Environment
DSN still wins when --dsn is absent, via ResolveDSN.
Refs: Backend #182; recovery plan r3.1 D1

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 14:55:56 +00:00