From 2c5b60ea78e014a712a47bdbb9efd156f52f3a1d Mon Sep 17 00:00:00 2001 From: brother7 <7brother7@gmail.com> Date: Tue, 1 Sep 2026 22:29:56 +0800 Subject: [PATCH] docs(plugins): integrate frozen worker stale-library fix --- .project-docs/30-worklog/current-state.md | 15 ++ ...1-web-search-stale-integration-9c5f3d82.md | 84 ++++++++++ ...901-web-search-stale-resources-8b4e2c71.md | 152 ------------------ 3 files changed, 99 insertions(+), 152 deletions(-) create mode 100644 .project-docs/30-worklog/tasks/20260901-web-search-stale-integration-9c5f3d82.md delete mode 100644 .project-docs/30-worklog/tasks/20260901-web-search-stale-resources-8b4e2c71.md diff --git a/.project-docs/30-worklog/current-state.md b/.project-docs/30-worklog/current-state.md index f0bd975..d155924 100644 --- a/.project-docs/30-worklog/current-state.md +++ b/.project-docs/30-worklog/current-state.md @@ -4,6 +4,21 @@ This file is the integrated default-branch snapshot. Feature tasks record progre ## Integrated Through +- Web Search frozen-worker stale-Library correction source + `3620cdc277fa0a99757c57a549008f9ecd380558` from task + `20260901-web-search-stale-resources-8b4e2c71` is integrated onto local `main` + through product commit `40e1912` by task + `20260901-web-search-stale-integration-9c5f3d82`. Live client evidence showed an + eligible parent worker with the official Web Search Skill, tool, Release and policy + failing `409 plugin_runtime_stale` because invocation re-ran full materialization and + treated one transient Account Library refresh as permanent worker invalidation. New + workers still require a current Library; a previously frozen worker may now use the + last verified Library projection only long enough to obtain the server-owned exact + Release Admission. Account/session change, project disable, acquisition removal, + runtime suspension, Release/version change, policy/billing gates and child isolation + remain fail closed. Focused 19, adjacent 55, full 1,786 plus pressure, typecheck and + scoped lint passed. The currently running installed binary predates this source fix; + no restart, package, deploy, publication or paid Provider call was performed. - Web Search Agent-assignment catalog fix source `612794463de1b14fd748202a00115c6f93c7346b` from task `20260901-web-search-tool-routing-fix-6f9d3b82` is integrated onto local `main` diff --git a/.project-docs/30-worklog/tasks/20260901-web-search-stale-integration-9c5f3d82.md b/.project-docs/30-worklog/tasks/20260901-web-search-stale-integration-9c5f3d82.md new file mode 100644 index 0000000..e802558 --- /dev/null +++ b/.project-docs/30-worklog/tasks/20260901-web-search-stale-integration-9c5f3d82.md @@ -0,0 +1,84 @@ +# Task: Integrate Web Search frozen worker stale-Library fix + +## Identity + +- Task ID: 20260901-web-search-stale-integration-9c5f3d82 +- Mode: Integration +- Branch: codex/20260901-web-search-stale-integration-9c5f3d82 +- Worktree: D:\Datas\OthersProjects\makelore-web-search-stale-integration-9c5f3d82 +- Base commit: 697c68974de8bf43c7094e67372a03123c449343 +- Owner: codex-root +- Status: Ready for Integration + +## Scope + +- Integrate sole source commit `3620cdc277fa0a99757c57a549008f9ecd380558` + from completed feature task `20260901-web-search-stale-resources-8b4e2c71` + onto exact local `main` base `697c68974de8bf43c7094e67372a03123c449343`. +- Preserve the source task record on its source branch, remove only its duplicate copy + from this integration checkpoint, update this integration record and canonical + current state, and fast-forward local `main` after verification. + +## Intent And Constraints + +- Concurrent Task Gate: passed in the isolated integration worktree created from exact + `main`; this task holds the integration lock. The root worktree's two unrelated + untracked package records remain untouched. +- Planning Gate: passed after loading the required project memory earlier in the + diagnostic task, then re-reading the current integrated state, Integration Gate, + completed source record, and active-owner registry for this exact promotion. +- Semantic comparison found no conflict. The source fix preserves the accepted frozen + worker and server Admission boundaries: new workers still require current Library; + only invocation revalidation may use the last verified stale Library projection. +- Integrate only the sole source commit. Do not restart the running installed client, + package, push, deploy, publish, call paid Web Search, or alter server/pricing/Provider + authority. + +## Project Context Loaded + +- Integration task/worktree/branch/base identity matches the task registry exactly. +- Source commit has sole parent equal to this integration base and is + `READY_FOR_INTEGRATION`; its focused, adjacent, typecheck, lint, full-unit, pressure, + diff, and documentation gates passed. +- The old Web Search coordinator/reviewer registrations are historical at earlier + frontiers and do not own this product range. The root's package records are unowned + and intentionally excluded by isolated integration. +- Canonical current state already records frozen Web Search worker materialization, + assignment, Admission, and installed-binary limitations. This landing adds only the + diagnosed stale-Library invocation correction and its evidence. +- Gate result: passed; cherry-pick and canonical integration writes may proceed. + +## Outcome + +- Cherry-picked sole source commit `3620cdc277fa0a99757c57a549008f9ecd380558` + onto the exact integration base as product commit + `40e1912`. The four product/test paths are byte-identical to the completed source. +- Removed only the duplicated source task record from this integration checkpoint; its + source branch/worktree/record remain intact. Recorded the landed behavior and limits + at the top of canonical `current-state.md`. +- The fix keeps new hosted workers fail closed on stale Library data while letting an + already verified frozen worker continue to the server-owned exact Release Admission. + The project, account, acquisition, suspension, Release/version, policy, billing, + confirmation and parent-only checks were not bypassed. +- Local `main` can be fast-forwarded after this documentation checkpoint. Its two + unrelated untracked package records remain untouched. The running installed MakeLore + binary was not restarted or replaced and therefore does not yet contain this source. + +## Verification + +- Source task evidence adopted: focused 19, adjacent 55, full 215 files / 1,786 passed / + 2 skipped plus pressure 1/1, typecheck, scoped lint, diff, and task documentation + gates passed. +- Integration product/test tree equality against source commit: passed. +- Integration rerun: focused resolver/registry 2 files / 19 tests passed; `pnpm run + typecheck` passed. +- No paid Web Search, package, restart, push, deploy, publication, server or Provider + action was performed. + +## Follow-ups + +- None recorded. + +## Promotion Candidates + +- None recorded. diff --git a/.project-docs/30-worklog/tasks/20260901-web-search-stale-resources-8b4e2c71.md b/.project-docs/30-worklog/tasks/20260901-web-search-stale-resources-8b4e2c71.md deleted file mode 100644 index cb85e64..0000000 --- a/.project-docs/30-worklog/tasks/20260901-web-search-stale-resources-8b4e2c71.md +++ /dev/null @@ -1,152 +0,0 @@ -# Task: Diagnose Web Search stale worker resources - -## Identity - -- Task ID: 20260901-web-search-stale-resources-8b4e2c71 -- Mode: Feature -- Branch: codex/20260901-web-search-stale-resources-8b4e2c71 -- Worktree: D:\Datas\OthersProjects\makelore-web-search-stale-resources-8b4e2c71 -- Base commit: 697c68974de8bf43c7094e67372a03123c449343 -- Owner: codex-root -- Status: Ready for Integration - -## Scope - -- Diagnose the reported `409 Web Search worker resources are stale` from the actual - installed-client Conversation, establish a deterministic regression at the owning - client seam, and implement only the smallest lifecycle/materialization correction - supported by evidence. -- Own only the client Plugin/Pi resource-generation paths and focused tests proven to - cause the failure. Do not change Works Square, pricing, Provider, Marketplace - publication, packaged trust, or unrelated Agent behavior. - -## Intent And Constraints - -- Preserve the product invariant that one parent Pi worker uses a frozen Plugin - snapshot for its lifetime. Account/project/Release/policy or worker-generation - changes must continue to invalidate future actions; the fix must not globally relax - fail-closed stale-resource checks. -- Use the live user-data files only as read-only diagnostic evidence and redact Account - tokens/credentials. Do not restart or kill the running MakeLore client without user - authorization. -- Follow the `diagnosing-bugs` loop: first establish a tight red-capable feedback loop, - then state ranked falsifiable hypotheses, add a regression before changing product - code, and verify the same loop after the fix. -- Preserve the two unrelated untracked package task records in the user root worktree; - all task writes stay in this isolated worktree. No push, package, publish, deploy, or - paid Provider call is authorized. - -## Project Context Loaded - -Task context: -- Task ID: `20260901-web-search-stale-resources-8b4e2c71` -- Mode: Feature -- Branch: `codex/20260901-web-search-stale-resources-8b4e2c71` -- Worktree: `D:\Datas\OthersProjects\makelore-web-search-stale-resources-8b4e2c71` -- Base commit: `697c68974de8bf43c7094e67372a03123c449343` -- Other active local tasks: the old Web Search coordinator - `20260831-web-search-client-5b9d2e63` remains registered at its pre-integration - frontier; several historical Marketplace reviewers remain registered in Planning. - The user root contains two unowned package task records. -- Overlap or semantic-conflict assessment: no current product writer owns the exact - main frontier or this diagnosis. The old coordinator and reviewers are historical or - read-only at earlier bases. The two root records remain unknown/unowned and untouched; - isolation prevents overlap. - -Read: -- `.project-docs/05-agent-entry/memory-index.md` -- `.project-docs/05-agent-entry/read-before-coding.md` -- `.project-docs/05-agent-entry/planning-gate.md` -- `.project-docs/00-brief/project-positioning.md` -- `.project-docs/30-worklog/current-state.md` -- `.project-docs/10-decisions/decision-index.md` -- `.project-docs/20-architecture/system-overview.md` -- `.project-docs/20-architecture/module-map.md` -- `.project-docs/20-architecture/data-flow.md` -- `.project-docs/40-domain/business-rules.md` -- `.project-docs/00-brief/success-criteria.md` -- `.project-docs/40-domain/glossary.md` -- `.project-docs/50-evidence/evidence-index.md` -- `.project-docs/60-reflection/reflection-index.md` -- `.project-docs/80-commitments/commitments.md` -- `.project-docs/90-maintenance/stale-items.md` -- peer record `20260831-web-search-client-5b9d2e63.md` - -Relevant understanding: -- Project goal: MakeLore exposes curated, Main-owned Plugin capabilities to eligible Pi - parent workers without leaking Account, Provider, trust, or billing authority. -- Current integrated focus: the Web Search package/runtime and assignment catalog fix - are on local `main`; the screenshot proves the new Conversation now loads and invokes - `makelore_web_search` but fails at invocation-time resource validation. -- Active task scope: diagnose and correct only the self-invalidating stale-resource path. -- Active constraints: frozen workers must remain frozen; child workers remain empty; - official bundled acquisition, project enablement, Agent assignment, current Admission, - confirmation, and billing remain separate gates. -- Decisions affecting this task: effective Plugin materialization is a single frozen - snapshot; supported lifecycle changes invalidate future actions rather than hot-swap - resources; Electron Main is the only hosted transport authority. -- Evidence, reflections, or commitments affecting this task: existing workers are - intentionally frozen, and the current installed binary may predate source changes; - live PostgreSQL/OpenAI/production activation holds are unrelated to this client-side - `409` and must not be presented as verified. -- Files or modules likely involved: actual Pi prompt/extension-context/session evidence, - then `electron/coding-plugins/registry.ts`, effective resolver/policy admission, Pi - materialization/lifecycle seams, and their focused tests if the evidence points there. -- Unknowns, stale docs, or conflicts: a paid live Provider call remains intentionally - unexecuted. The client-side failure is independently reproducible at the frozen - snapshot boundary and does not require spending Token Points to diagnose. - -Gate result: -- Passed. Concurrent ownership and Planning context are resolved; diagnostic work may - proceed in this isolated worktree. - -## Outcome - -- Live evidence from the reported Conversation proves that the parent worker contains - the `makelore-web-search` Skill, the `makelore_web_search` tool, the official bundled - Release `00000000-0000-4000-8000-000000000204`, account generation 1, and current - runtime policy. The confirmed invocation alone returned - `409 plugin_runtime_stale`; no resource-rebuild event occurred before it. -- Ranked hypotheses were checked against the persisted Pi manifest/session, project - selection, Agent assignment, session timestamps, extension-host context, and Main - logs. Wrong child role, wrong Conversation/generation, an account epoch change, and a - project/Release mutation were not supported. The remaining reachable path was the - registry's invocation-time call to the full worker materializer. -- Root cause: `CodingCapabilityRegistryImpl.invoke()` re-ran - `EffectivePluginResolver.resolve()`. That path intentionally rejects a hosted Plugin - whenever a subsequent Account Library request returns a trusted but stale snapshot, - so one transient Library refresh invalidated a worker that had just been materialized. - This happened before the hosted adapter could obtain the server-owned immutable - Admission that actually gates account, runtime status, and exact Release dispatch. -- Added a separate `resolveForInvocation()` contract. New workers still fail closed on - stale hosted Library data. An already frozen worker may retain the last verified - Library projection long enough to reach the typed hosted Admission; missing Library, - account change, project disable, removed acquisition, suspension, incompatible or - changed Release, unsupported policy, billing unavailability, and child-worker gates - remain unchanged. -- TDD evidence: the new resolver and registry regressions first failed because - `resolveForInvocation` did not exist and the registry still called `resolve`; after - the focused correction both pass. - -## Verification - -- `pnpm exec vitest run tests/unit/coding-plugin-effective-resolver.test.ts tests/unit/coding-capability-registry.test.ts`: 2 files / 19 tests passed. -- `pnpm exec vitest run tests/unit/coding-plugin-effective-resolver.test.ts tests/unit/coding-capability-registry.test.ts tests/unit/hosted-admission.test.ts tests/unit/web-search-plugin-adapter.test.ts tests/unit/coding-plugin-composition.test.ts tests/unit/coding-product-services.test.ts`: 6 files / 55 tests passed. -- `pnpm run typecheck`: passed. -- Scoped ESLint for the two product and two regression-test files: passed. -- `pnpm test`: 215 regular files / 1,786 passed / 2 skipped, followed by the - single-worker pressure suite 1/1 passed. The first diagnostic run encountered two - transient `spawn EBUSY` failures while the offline Electron dependency was settling; - that exact real-process file then passed 3/3, and the clean full rerun passed. -- `git diff --check`, `check_project_docs.py`, and task-aware - `check_doc_drift.py`: passed. -- A paid Web Search execution was not run; this task does not claim Provider, Token - Point settlement, deployment, packaging, or production activation evidence. - -## Follow-ups - -- None recorded. - -## Promotion Candidates - -- None recorded.