Repository navigation
revamp pass 7: module CI lane and check:pr; one agent key for skill uploads, journal drafts and store reads - #1354
Conversation
…dabot alerts Dependabot reports eight open alerts on main. Patch releases fix all of them. - hono below 4.13.16 (alerts 35, 37, 39, 41 and 43): - RegExpRouter could skip wildcard middleware (GHSA-h7mg-cq63-vhpq). - mount() could forward a path past the outer middleware (GHSA-4m76-xfj5-7975). - validator('form') skipped multipart bodies that had extra parameters (GHSA-4h7h-rv7c-7m2v). - The css helper and csrf() had smaller gaps. - @hono/node-server below 2.1.6 (alerts 29, 31 and 33): - serveStatic decoded the path twice. - A backslash was read as a path separator. - An ECONNRESET during an async response went unhandled. How this code is exposed: - The API puts path-scoped wildcard middleware on many prefixes, including the member boundary on /api/v1/*. - Two of the router's three cases need route shapes this code does not use: - parameters with an explicit {[^/]+} pattern; - a route registered as /prefix*. - The third case reaches only the not-found handler. Such a 404 skipped the '*' middleware, and with it the platform's response headers. - mount(), validator('form'), the css helper and csrf() are not used. - @hono/node-server runs the local and e2e servers, not the Cloudflare Worker. The change touches only the two exact pins and their lockfile entries. A package-lock-only install leaves the lockfile unchanged. Tests: - npm ci, typecheck and module-check. - Runtime: agent-door 70, session-cookie-security 7, account-security 12, auth-rate-limit-window 4, e2e-auth-isolation 4, portal-route 92, onboarding 28, onboarding-diagnostics 3, device-authorizations-adversarial 42, machine-device-response-boundary 4, event-share-security 11, google-auth-routes 14, github-social-routes 10, seller-console-route 27 and original-shares 4. - The three worker dry-run bundles, then all 140 worker tests. - The portal build. - In the browser with the pinned config: mobile-install, github-setup and agent-door, 16 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A hosted runner once missed the five-second wait for 下載完整成果 PNG in absurd-daily UX-11 (Verify 43753920593, shard 1). Locally the link shows 13-126 ms after the resume, even with the CPU slowed 6x or held to two cores, so the cause is still unknown. The five-second wait is a responsiveness guarantee and stays as it is. Instead, tests/e2e/helpers/png-timing.ts records toBlob, createImageBitmap, image decode and URL.createObjectURL calls, plus marks around serving and the clock resume. When the wait fails, and only then, it attaches the timeline as png-timing and prints one PNG_TIMING line. UX-9 (four markets) and UX-11 use it. A passing run attaches nothing, so browser shard 1's report does not grow. Checked: UX-11 3/3; a scratch copy with a 6 s toBlob delay fails at the unchanged bound and prints the timeline; absurd-daily 187/187; typecheck; module:check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rafts and reads store data A member's own agent now needs one fw_agent_ key (自動化 → 我的 Agent) for work that still needed the older keys. Nothing is retired: fpk_/fpg_ upload keys, fjp_ journal keys, fw_read_ paired-device keys, their screens, routes and tests keep working unchanged. Skill books (share scope): - POST /api/v1/me/skill-submissions/upload (skills.upload) creates a private ready_for_review draft from the full upload payload, cover image and introductions included. POST /api/v1/me/skill-submissions/:id/upload (skills.fill) fills the member's own awaiting_upload draft, upgrade drafts included. - Both call uploadSkillSubmission, the same service path as the fpg_ route. They have an 800 KiB body limit (the /api/v1 default is 32 KiB) and share the fpg_/fpk_ per-owner limit of 60 per hour. Another member's draft gets 404; a draft in another state gets 409 submission_not_awaiting_upload. - The journal records source 'agent' and the connection id. The same Idempotency-Key returns the same draft; a different body gets 409. - skills.illustration stays granted:false, because it returns image bytes, not JSON. - Known limit: skill-submission images use the default legacy storage mode. If an operator switches that purpose to bridge or r2_only, a one-key upload with a cover fails closed with 503 media_upload_unavailable, because the asset kernel takes its authority from an fpg_ grant. fpg_ is unaffected. Community journal (publisher only): - POST /api/v1/me/community-journal/submissions (journal.submit, share) does for the member door what an fjp_ key does: the same snapshot schema, a 2 MiB limit, at most 10 pending (fjp_ and member drafts count together) and the stored receipt on replay. journal.status and journal.read are read operations. The status shows key rows without token or hash. - Publish, discard, withdraw and the key commands stay person-only (granted:false, with the reason). - Migration 216 makes community_journal_submissions.key_id nullable, so a member-door draft needs no fake key. Every reader of that table was audited for NULL keys. The frontier moves to 216 in deploy/, the release-compatibility list and the guild-launchpad README. Store and supplier reads (read): - retail.catalog, retail.stores, retail.listings, supplier.products and supplier.requests allowlist the member routes that return the same rows as the fw_read_ kinds. The paired-device "connection" kind has no member route and stays open; no route was added. The contract, SDK operation lists and MCP list are regenerated (61 operations). /agent.md, the skill-upload client docs, the journal editor and the skill-submission screen say the one-key way first, and the older keys "still work". Checked: typecheck; contract check; module:check; runtime-text check; ci.contracts-pytest 970/970; deploy tests 1094/1094; each of agent-door, agent-contract, agent-contract-responses, agent-discovery, agent-mcp, agent-tokens-ui, agent-member-only, sdk-agent-client, skill-submissions, skill-submission-flow, skill-submission-upgrades, skill-upload-client, published-skills, community-journal, client-connections and account-deactivation run alone, all green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pull request that changes one lane-eligible module and its tests now gets the module lane: runtime-full, runtime-aggregate, static-worker and a narrowed browser run (the module's own specs, the specs of every module that depends on it, six smoke specs and the fixture specs). main still runs every check after the merge. - packages/contribution-tools/module-lane.mjs decides the lane. It fails closed: unproven blob modes, changed descriptors, core or busy modules, unowned paths, a changed runtime test that a browser file imports, an unproven import graph, or more than 80 browser files all keep the full run. - Narrowed browser runs split files across the four shards by index. - npm run check:pr runs the quick local checks, the changed runtime tests (with TEST_DATABASE_URL) and estimates the CI lane. - CONTRIBUTING.md and AGENTS.md start with five steps; the pull request template asks for the check:pr summary. - ci.selector-unit budget 180 s -> 600 s and ci.governance-unit 300 s -> 600 s: main measured 179.99 s and 277 s against the old bounds, and hosted runner speed varies about 2x. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dency The 3D and lobby preview tests pinned package.json (minus scripts) and the whole package-lock.json, so the hono 4.13.16 bump failed UX-8 and PT-6 (Verify 43778395785, runtime-full partition 3) although no preview input changed. The preview bytes come from three, Vite, sharp with its @img/* libvips builds and Playwright's Chromium. The pins now cover only those packages: their declared versions in package.json and their lock entries (version, resolved, integrity). The pinned values equal main's, so the previews still bind to the toolchain they were made with; bumping any of these packages still fails until the previews are regenerated. Every other source input keeps its exact-bytes pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
detna-vibe-coding
left a comment
There was a problem hiding this comment.
Found a deterministic verification blocker while reviewing this head. tests/runtime/absurd-daily.test.ts:400,588 (UX-8 / PT-6 preview provenance checks) still expect package.json-without-scripts SHA-256 41b915d7a889cf7c9805bf3d2b8c5fc67d9a9f0a7eef1d3a1b8b7f2b8ba48524. Recomputing the same JSON.stringify(rest) algorithm on e50761f yields ba2810820e94e673cf01b78e75e1fb4b8649a18c4355209911dfa5e026fc55bc after the Hono dependency update. Both assertions therefore fail deterministically; a rerun alone cannot fix them. Please reconcile these expected provenance hashes with the dependency change, preserving the asset/source checks, and rerun the affected tests and required Verify.
CI evidence: run 43778395785, runtime partition 3 artifact 14188520258 (download SHA-256 verified: 284279a6619a72824825417cf6cc5545b2c7f984200a12a42ac65c02aad93edd), candidate d9b629f: absurd-daily has 232 tests, 230 passed, 2 failed. The artifact intentionally hashes case names, so this diagnosis is independently established from the two failing source assertions, not an assertion-message claim from the sanitized artifact.
Source review is still in progress; this is not an approval or a claim that Verify passed. No deployment or rerun was triggered.
|
Thanks. This is fixed in
Locally, |
detna-vibe-coding
left a comment
There was a problem hiding this comment.
Rechecked the provenance fix at 04ae2c3. I independently recomputed the selected toolchain pins from both base db3ea70 and this head: package.json = 8f0e01d843e01cd4346f7826ffc64767b3457c6d86bc880135a284923489fe84; package-lock.json = e332501d1cd9fe9ce09ce26c9a73be257abce79c255582b39719ba774dcd6c1a. Both match the new expectations; non-package source and output-byte assertions remain in place. Hosted job 133028591080 now records absurd-daily 232/232, zero skipped/failed, so the specific stale-pin failure from review 5913777204 is cleared.
Continued source review of the migration frontier, member-route body limits, PNG instrumentation, narrowed browser shard execution/result admission, and added authorization/idempotency/isolation coverage found no additional confirmed blocker in those paths. The documented literal-import/declared-dependency limitations remain limitations, not a claim of full dependency-graph coverage.
All eight runtime partitions and runtime-aggregate now pass on Verify 43784297234. Four ui-default shards are still running, so full Verify is NOT yet confirmed and I am not submitting formal approval in this check. No deployment or rerun requested.
|
Verify 43784297234 passed at 02:08Z on |
detna-vibe-coding
left a comment
There was a problem hiding this comment.
Approved at exact head 04ae2c3 after completing the follow-up review and hosted verification.
The provenance failure from review 5913777204 is fixed: independently recomputed base/head preview-toolchain pins match, other source and output-image byte checks remain, and hosted absurd-daily passes 232/232. Cumulative source review covers module-lane admission/immutable integration binding/dependent closure, file-sharded browser execution and result admission, member journal submission and publisher serialization, unified skill uploads and authorization/idempotency boundaries, agent allowlist/schema changes, migration 216/frontier, and test-only PNG instrumentation. No unresolved blocking finding remains in this review; the documented literal-import/declared-module-dependency limits and non-legacy cover-image restriction remain explicit.
Verify 43784297234 is completed/success, including all eight runtime partitions and aggregate (12,165 tests), four UI shards, and full browser aggregate (2,797 tests, 266 files, all six passes successful). Browser evidence binds base db3ea70, head 04ae2c3, candidate b2d33aa. CodeQL 43784297206 also passed. Rechecked that the PR still has this exact head immediately before approval.
This review does not authorize or perform deployment; existing release recovery remains with the designated orchestrator.
Pass 7 of the platform revamp. It makes the platform easier to build on, for people and for their agents:
npm run check:prruns the quick checks locally first;fw_agent_) can now upload skill books, hand in journal drafts and read the member's store data. The older single-purpose keys keep working;Five commits on
main(db3ea706c). Review them in this order:a50f5cea5dependencies;cef12af8aPNG timing (test only);bb40e5149the one agent key;e50761feathe CI lane,check:prand the five steps;04ae2c316the absurd-daily preview pins cover only the preview toolchain (see section 4).Nothing is retired.
1. Contributors: five steps,
check:prand the module laneCONTRIBUTING.mdandAGENTS.mdnow open with 五步開始:npm run check:pr;.github/pull_request_template.mdhas three sections: 改了什麼、為什麼, 怎麼驗證 and 畫面.npm run check:pr(scripts/check-pr.mjs):contracts:build,typecheck,module:check,check:runtime-textandgit diff --check;TEST_DATABASE_URLis set. Otherwise it points todocs/development/local-runtime.md;-- --e2e, also runs the browser specs that the lane would run;The module lane (
packages/contribution-tools/module-lane.mjs;scripts/ci/affected-jobs.md, section 模組快速通道). It applies when every changed file is one of these:tests/runtime/*.test.tsfile;tests/e2e/*.spec.tsfile;Such a pull request gets
affected/module_affected. That runsruntime-full,runtime-aggregate,static-workerand a narrowedui-e2e. It skipsgovernance-consumers,deploy-preflightandguild-presentation.specs-affected: those specs plus the smoke and fixture specs.mainstill runs every check after the merge. Push events never narrow.modules/community-journal/activity.tswithtests/runtime/community-journal.test.tsgivesmodule_affectedwith 12 specs;apps/platform-api/src/routes/commerce.ts(catalog-commerce) givesmodule_affectedwith 16 specs. They include the specs of its dependentclient-connectionsand of that module's dependentsguild-toolsandshares;modules/portal-shell/commerce-navigation.cssgivesfull, becauseportal-shellis a core module.2. The one agent key
skills.uploadPOST /api/v1/me/skill-submissions/uploadshareskills.fillPOST /api/v1/me/skill-submissions/:id/uploadsharejournal.submitPOST /api/v1/me/community-journal/submissions(new)sharejournal.statusGET /api/v1/me/community-journalreadjournal.readGET /api/v1/me/community-journal/submissions/:idreadretail.catalogGET /api/v1/retail/catalogreadretail.storesGET /api/v1/retail/storesreadretail.listingsGET /api/v1/retail/listingsreadsupplier.productsGET /api/v1/supplier/productsreadsupplier.requestsGET /api/v1/supplier/requestsreadPerson-only. These are listed as
granted:false, each with a reason: journal publish, discard and withdraw, journal key create and revoke, andskills.illustration.The new member route
POST /api/v1/me/community-journal/submissions:Idempotency-Keyand follows the same session and CSRF rules as its neighbours;403 journal_editor_required;409 journal_draft_limit) as thefjp_route. Member-door drafts count toward the 10;The
fjp_route now calls the same service function. Its behaviour and its tests are unchanged.Skill uploads. The
fpg_route and the member routes share oneuploadSkillSubmissionentry point. A member-door upload recordsupload_private_draftwith manual provenance, the payload's SHA-256 and whether it has a cover image.Body limits. Skill uploads may be 800 KiB and journal drafts 2 MiB. Every other
/api/v1JSON body stays at 32 KiB.Migration
216_community_journal_member_submissions.sql. It makescommunity_journal_submissions.key_idnullable, so a member-door draft needs nofjp_key row.key_idwas checked for NULL. A member-door draft shows in the publisher's list, and the publisher can publish it.deploy/cloudflare/environments.json, indeploy/cloudflare/lib/release-compatibility.mjsand in the guild-launchpad README.Words. These now give the one-key way first and say that the older keys still work:
/agent.md;packages/skill-upload-client/SKILL.mdandprotocol.md;docs/development/community-journal.mdanddocs/development/client-read-connections.md.Generated files.
node scripts/build-agent-contract.mjsregenerates these. Its source-integrity check passes:contracts/agent/v1/openapi.json;modules/client-connections/agent-contract.ts;The two 6,457-line diffs are these generated files.
Nothing retired. These all keep working:
fjp_journal keys,fw_read_paired-device keys,fpg_skill keys, their screens and routes, and the pairing flow.3. Dependencies
hono4.13.16 and@hono/node-server2.1.6 close eight Dependabot alerts.4. Test only: PNG timing
tests/e2e/helpers/png-timing.tsrecords, in the page, the timings oftoBlob,createImageBitmap,decodeandcreateObjectURL, and every visibility change.下載完整成果 PNGfails, it attaches onepng-timingJSON, prints onePNG_TIMINGline and rethrows the original error. A passing test attaches nothing.tests/e2e/absurd-daily.spec.ts. No timeout, assertion or step changed.UX-11 once failed this wait on a hosted runner. Locally the link appears 13–126 ms after the clock resumes.
Preview pins (
04ae2c316). The first Verify of this PR (43778395785) failed UX-8 and PT-6 intests/runtime/absurd-daily.test.ts. The cause was the hono bump: those tests pinnedpackage.json(minus scripts) and the wholepackage-lock.jsonas inputs of the 3D and lobby previews, although no preview input changed.@img/*libvips builds, and Playwright. The pin covers their declared versions inpackage.jsonand their lock entries (version, resolved, integrity).main, so the previews still bind to the toolchain they were made with.5. CI time budgets
ci.selector-unitci.governance-unitHosted runner speed varies about 2x. Both suites run in
source-integrity, which has a 40-minute timeout.6. Known limits
legacymode. When the skill-image storage mode is notlegacy, an upload with a cover image through the member or agent routes answers503 media_upload_unavailable. The reason is that the asset service needs anfpg_grant row. Uploads without a cover image work, andfpg_keys are unchanged.connectionkind. Thefw_read_kindconnectionhas no member route, so it has no agent operation. It stays open.import(x)orrequire(x)does not force the full run, because those calls are browser-side or fixture plumbing, andmainruns every spec after the merge.dependencies. If a module uses another without declaring it, that module's specs do not run on the pull request.mainstill catches it.7. Checks
Hosted, first Verify (43778395785, on
e50761fea):source-integrity, which includesci.selector-unitandci.governance-unitunder the new budgets;static-worker,deploy-preflight,guild-presentationandgovernance-consumers;04ae2c316fixes them:tests/runtime/absurd-daily.test.tspasses 232/232 locally.Local, on
e50761fea:npm run typecheck,module:check,check:runtime-textandgit diff --check;node scripts/build-agent-contract.mjs --check;contracts:build, which leaves no diff;npm run check:pr.node --test deploy/cloudflare/test/*.test.mjs1094/1094; the guild-launchpad status pytest passes.module-lane9/9,check-pr7/7 andpinned-e2e88/88.ci.selector-unit: 93/93. It took 331 s on a quiet machine and 360 s under load.ci.governance-unit: 45 files, 695 tests. Onlygithub-behavior-host(2 of 4) fails, and it fails locally onmaintoo. Under load, onetest-reporter-progresscase hit its 5 s child limit; on a quiet machine the file passes 21/21.MEDIA-INV-*,GALLERY-SQL-04,POL-SQL-05andtenant-policy-operator;model-cli-probe's native exec barrier, which also passes on the hosted runner;agent-door,agent-contract,agent-contract-responses,agent-discovery,agent-mcp,agent-tokens-ui,agent-member-only,sdk-agent-client,community-journal,client-connections,account-deactivation,skill-submissions,skill-submission-flowandskill-upload-client.absurd-daily187/187, and UX-11 three times in a row. A forced failure in a scratch copy printedPNG_TIMINGand attachedpng-timing.javascript-code-scanningsuite): the same 9 results asmain's baseline. No new alert.Review
.github/pull_request_template.md,packages/contribution-tools/andscripts/ci/.apps/platform-api/src/agent-allowlist.tsandagent-schemas.tsinstead.🤖 Generated with Claude Code