Skip to content

service-automation: the connector pull door (connectorSource.input) still sends input keys the connector action does not declare, while connector_action refuses them #33894

Closed

Description

@objectstack-fleet

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

Split out of #33663 (PR #33886, os-dev report 6895169251 on #33663, which has the four-axis analysis). It carries its own Clause-② answer, so it is not folded into #33886. p3.

维护者速读

  • 改什么:连接器拉取入口(映射里的 connectorSource.input)也像 connector_action 节点一样,拒收连接器动作未声明的输入键,而不是静默发出去。
  • 为什么:自 fix(service-automation)!: a connector_action node refuses an input key its action does not declare #33614 起,同一份 inputSchema 在两个入口上判法不同;AI 写错或过时的键在拉取入口不会报错。
  • 风险:收窄;实测第一方 0 处受影响(examples/、packages/apps/ 无 connectorSource,Studio 不写它)。

What

  • packages/services/service-automation/src/connector-pull.ts: opt connectorSource.input into the undeclared-key judge (judgeConnectorInput(..., { refuseUndeclaredKeys: true })), with the pull door's own hint.
  • Flip the pin [#33553] an undeclared key is not refused here in connector-pull.test.ts to a refusal pin (code + status: VALIDATION_ERROR 400, handler never called), and ablate it.
  • Declaration (expected): Clause-②: no (narrowing), Metadata-protocol: narrowed, minor on service-automation, an ADR-0087 disposition. Widen the semantic entry packages/spec/src/migrations/entries/semantic/18.connector-action-undeclared-input-key-refused.ts (its surface and acceptance criteria name connector_action only), or add a new entry. The 18.5.0 CHANGELOG already carries the connector_action half, so this gets its own breaking note.

Dedupe words: connector pull undeclared input key, connectorSource.input refuseUndeclaredKeys.


Generated by Claude Code

Activity

  1. added
    pm:queue
    domain:server
    on Nov 15, 2026
  2. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

    Claim: server area-lease mode (#33751 §2), area S6 lease A5, dispatched by seat domain:server#5 area thread · executed by an os-dev sub-agent (mode:subagent) · posted at 2026-11-15T13:49Z
    Session: session_01QsR2jUZKdq3PK2Sab53cT3
    Account: zhuangjianguo
    Branch: claude/area-A5b-33894
    Worktree: objectstack-issue-33894
    Domain: domain:server
    Seat: domain:server#5
    File surface: packages/services/service-automation/src/connector-pull.ts and its tests, the semantic entry packages/spec/src/migrations/entries/semantic/18.connector-action-undeclared-input-key-refused.ts (or a new sibling entry), a changeset (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default (no path-derived mandate; dispatch-gates --tier at 1e65a389), effort: high
    Clause-②: no
    Metadata-protocol: narrowed
    Responsibility: n/a — not a defect card
    Thread-read: none
    Premise: holds
    Serial constraints cleared: PR #33886 (S6, #33663 fold) touches http-nodes.ts and connector-openapi, not connector-pull.ts; no other in-flight PR on this surface
    Narrowing (an undeclared input key is refused at the pull door, as at connector_action); owes a contract-review-tier review before the queue. Skills-docs: line owed in the PR body.


    Generated by Claude Code

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  4. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

    Claim handover: area S6 → area S3 · 2026-11-15T13:53Z

    Area S6 (session_01QsR2jUZKdq3PK2Sab53cT3) claimed this card (6895291090) but has no free build slot. Same account and seat: area S3 (session_01QsR2jTEivi2wogPpeo3xd5) takes it and posts its own Claim: naming its branch. S6's branch claude/area-A5b-33894 was never created or pushed (no sha). Labels and assignee stay as they are. The claim's declaration lines stand: Clause-②: no (narrowing), Metadata-protocol: narrowed.


    Generated by Claude Code

  5. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jRsWwTRkuRCyQwvpAG
    Seat at 2026-11-15T14:13Z: this goes to the maintainer; no dev until it is answered.

    An independent review found no maintainer ruling or ADR behind refusing undeclared keys, at either door, so extending it to the pull door is a narrowing of a released protocol, which is the maintainer's. The pull-door pin at connector-pull.test.ts:385 records "this PR did not change this door" (review nit on PR #33614), not a design ruling. Recommendation to the maintainer: refuse at the pull door too.

    If ruled that way, the build also: adds a new semantic migration entry (does not widen entry 18, which shipped in 18.5.0); writes the refusal sentence and migration note to name door-added keys (watermark params in OpenAPI query) and the OpenAPI fix; states the rule as "every door that dispatches a connector action judges alike". Scheduled pulls have no fault edge, so a stray key fails every run until the mapping is fixed; the note says so.

    Prior rulings read: #33553 + 3 comments; PR #33614 reviews 6888662219, 6889215004, 6889245825, ACCEPT 6889256141; #33663 report 6895169251; #28040 / PR #28140; docs/adr inputSchema / undeclared / additionalProperties / connectorSource → ADR-0023, 0024, 0153 (none answers it).

  6. added
    needs-user-decision
    and removed
    pm:dispatched
    on Nov 15, 2026
  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jRsWwTRkuRCyQwvpAG
    Maintainer ruling recorded at 2026-11-15T14:42Z: refuse undeclared keys at the connector pull door too. The maintainer tapped 「多余参数直接报错」 on the decision card (2026-11-15T14:41:42Z, this project thread), after an independent seat review.

    The rule, stated once: every door that dispatches a connector action judges its input alike, so refuseUndeclaredKeys is on at the pull door (connector-pull.ts) as it is for connector_action. Future doors inherit it; they do not come back for a ruling.

    The build:

    • Clause-②: no (narrowing). ! in the title, BREAKING changeset note, ADR-0087 marker, dogfood battery.
    • A NEW semantic migration entry for the pull door. ⛔ Do not widen entry 18 (18.connector-action-undeclared-input-key-refused), which shipped in 18.5.0.
    • The refusal sentence and the migration note name keys the door adds itself (watermark params in OpenAPI query, e.g. since) and the fix: declare them in the OpenAPI document. Scheduled pulls have no fault edge, so a stray key fails every run (sys_sync_run failed) until the mapping is fixed; the note says so.
    • Flip the pin at connector-pull.test.ts:385-398 to a refusal pin; add one for a door-added watermark key.
    • Update mapping.zod.ts:480-483 (generated mapping.mdx), content/docs/automation/jobs.mdx:285. Touching packages/spec/src owes a contract-tier review.
    • ADR-0153 D2 (Proposed) will send pagination params from the door; it now presumes they are declared. Note it on the PR for the sync-in owner.
    os-decision-facets
    ① 项目长远合理性:同一 inputSchema 在两个入口同判,消除一处特例;以后新入口不再回箱。
    ② 实际业务拉动:今天查到的使用者为零;拉动是防错,AI 或人写错参数立即暴露。
    ③ 防 AI 犯错:响亮拒绝优于静默忽略或原样外发。
    ④ 创业阶段不扩散:不加新键、新开关;规则收拢为一句。
    

    Prior rulings read: #33553 + 3 comments; PR #33614 reviews 6888662219, 6889215004, 6889245825, ACCEPT 6889256141; #33663 report 6895169251; #28040 / PR #28140; docs/adr inputSchema / undeclared / additionalProperties / connectorSource → ADR-0023, 0024, 0153 (none answered it before this ruling).

  8. added
    pm:queue
    and removed
    needs-user-decision
    on Nov 15, 2026
  9. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

    Claim: server area-lease mode (#33751 §2), area S3 lease A5 (S6 handover 6895336144; maintainer ruling 6896271476) · executed by an os-dev sub-agent (mode:subagent) · posted at 2026-11-15T15:37Z
    Session: session_01QsR2jTEivi2wogPpeo3xd5
    Account: zhuangjianguo
    Branch: claude/area-A5-33894
    Worktree: objectstack-issue-33894
    Domain: domain:server
    Seat: domain:server#5
    File surface:

    • packages/services/service-automation/src/connector-pull.ts and connector-pull.test.ts (the pin flip at 385-398; the new watermark pin goes in a new file named by the card)
    • a NEW semantic migration entry under packages/spec/src/migrations/entries/semantic/ (⛔ entry 18 not widened) and its registry wiring
    • packages/spec/src/automation/mapping.zod.ts 480-483 plus the generated mapping.mdx
    • content/docs/automation/jobs.mdx 285
    • a BREAKING changeset

    Stop on breach and explain in the report.
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier decides), effort: high
    Clause-②: no
    Metadata-protocol: narrowed
    Responsibility: n/a — not a defect card (maintainer ruling 6896271476: every door that dispatches a connector action judges its input alike)
    Thread-read: 6896271476
    Premise: holds (connector-pull.test.ts:385 pins today's pass-through)
    Pre-claim lane: server because the fix is in service-automation connector-pull.ts. The spec face (mapping.zod.ts prose, a new semantic entry) stays in the lane by the maintainer's rule that an analysed card stays in its lane. It owes a CONTRACT_REVIEW_TIER review through the review thread (spec face + narrowing).
    Pre-claim deps: none open. S6's armed PRs #33886 (http-nodes.ts / openapi) and #33890 (engine.ts) do not touch these files. Before the push, the dev runs git merge-tree against every open PR sharing a file, plus origin/main.
    Prior rulings read: maintainer ruling 6896271476 (refuse at the pull door; new entry, not entry 18; name door-added watermark keys and the OpenAPI fix; a stray key fails every scheduled run). Seat record 6895784822 (the #33553 thread, PR #33614 reviews 6888662219 / 6889215004 / 6889245825 / ACCEPT 6889256141, #33663 report 6895169251, #28040 / PR #28140, ADR-0023 / 0024 / 0153, none of which answered it before this ruling). ADR-0153 D2 (Proposed) pagination params: noted on the PR for its sync-in owner. The route is exactly the ruling.

    Generated by Claude Code

  10. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  11. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5
    os-dev-report

    {
      "issue": 33894,
      "status": "done",
      "branch": "claude/area-A5-33894",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34089",
      "head": "208c32c83b",
      "session": "session_01QsR2jTEivi2wogPpeo3xd5",
      "premise_still_valid": true,
      "summary": "The connector pull door now judges the input it sends with judgeConnectorInput(..., { refuseUndeclaredKeys: true }), as connector_action does (maintainer ruling 6896271476), refusing VALIDATION_ERROR 400 input_schema_mismatch before the action is called; the refusal adds the pull door's own hint and, when the undeclared key is the watermark parameter the door added (judged alone, so an author's key never blames it), names that parameter and the fix: declare it as an in: query parameter in the OpenAPI document. The pin at connector-pull.test.ts (formerly 385-398) is flipped in place to a refusal pin; a new file connector-pull-undeclared-input-key.test.ts pins the door-added watermark key with three controls. Spec: mapping.zod.ts connectorSource.input describe plus regenerated mapping.mdx, a NEW semantic entry 18.connector-pull-undeclared-input-key-refused (entry 18 connector-action-undeclared-input-key-refused untouched), jobs.mdx connectorSource bullet, BREAKING changeset (minor on service-automation and spec) with the ADR-0087 marker and FROM-TO migration. Hypothesis (a) MEASURED TRUE with a refinement: the watermark is merged into input.query before the judge (connector-pull.ts step 6), but only when the target already holds a value, so the first pull of a mapping whose operation does not declare the parameter succeeds and every pull from the second on fails. Hypothesis (b) MEASURED TRUE: git grep connectorSource over examples/ and packages/apps/ = 0 files at 0ac112fcd5.",
      "tests": "At 8d24166991: pnpm --filter @objectstack/service-automation test -> Test Files 283 passed (283), Tests 4003 passed (4003); typecheck first run red TS2493 x3 in the new test file (vi.fn handler typed with no parameter), fixed in 8f32675db0, then typecheck + check:test-typecheck exit 0 and the new file 6/6. At 8f32675db0: pnpm --filter @objectstack/spec test -> Test Files 842 passed (842), Tests 26961 passed, 1 todo; spec typecheck exit 0 (lock VERDICT command-exit 0). The four connector-pull files (unit, new file, integration through the real rest connector, service door): Test Files 4 passed, Tests 64 passed. spec check:generated: 1 of 14 stale (check:docs), --fix, committed in 8d24166991. Ablations via scripts/ablation-replace.mjs under the lock, tests import ./connector-pull.js from src (no dist leg): A drop { refuseUndeclaredKeys: true } -> anchor 1->0, 4 failed / 55 passed ('the pull must refuse, not resolve: expected undefined to be an instance of ConnectorPullError'); B addedUndeclared = false -> 2 failed ('expected ... to contain watermark parameter since'); C probe always undeclared (extra zz_probe key) -> 1 failed ('expected ... not to contain watermark parameter'). Each restored: blob after restore == HEAD blob 0e84c8b8954e, git diff HEAD empty. Touched-package suites ran before the final main merge 208c32c83b (it brought spec contracts IAutomationService.dryRun); CI Test Core and TypeScript Type Check on 208c32c83b are success.",
      "gates": "Local: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at 208c32c83b -> 117 families; each run with exit captured before any pipe: 115 exit 0; pnpm --filter @objectstack/spec run check:skill-examples exit 3 (PREREQUISITE NOT MET, client-react dist), re-run after its dist was present -> exit 0 ('346 prose examples type-check across 3 surface(s)'); pnpm check:dual-build-cjs-loads exit 3 (PREREQUISITE NOT MET, needs a whole-workspace build) = NOT MEASURED, left to CI. --ran with exit codes: '117 derived famil(ies) accounted for, 116 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)', exit 0. dispatch-gates --tier: no path-derived mandate; Clause-2 suspect surface packages/spec/src/** (narrowing -> one CONTRACT_REVIEW_TIER review before the queue). PR-body gates with GITHUB_EVENT_PATH on the sent body: check-changeset-no-major exit 0 (arm narrowing, Metadata-protocol narrowed), check-adr-0087-registration exit 0 (registered connector-pull-undeclared-input-key-refused, new here), check-closing-keyword-parity exit 0, check-partof-closing-keyword exit 0; readClause2Line -> {value:no, arm:narrowing}. eslint --no-inline-config on the 5 touched ts files exit 0. CI on PR head 208c32c83b: 68 check-runs, every one success or skipped, including Lint & Repo Gates, TypeScript Type Check, Test Core (8/8), Build Core, Governed Surface Queue Guard, Type Check UI, Test UI (16/16), Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards; Lint UI skipped. mergeable true, mergeable_state clean. Hot-file rule: 59 open PRs' file lists read, none shares a file; git merge-tree --write-tree --name-only HEAD vs origin/main -> e72f71ea9d exit 0, vs #33970 f3979189f3 -> e72f71ea9d exit 0, vs #34001 b091e451b9 -> 6369925d36 exit 0 (the two add sibling files in entries/semantic/), no conflicted paths; local merge-tree is not GitHub's mergeability, which reads clean.",
      "dogfood_battery": "208c32c83b · os-verify-lock: VERDICT command-exit 0 (held 2766s) · Test Files 467 passed | 3 skipped (470) · Tests 3962 passed | 42 skipped (4004) · no failures; closure built first with pnpm --filter '@objectstack/dogfood^...' build (VERDICT command-exit 0)",
      "mcp_calls": "0",
      "api_writes": "2 relay writes: 1 pr_create via scripts/pm/fleet-write/dispatch.mjs (POST /repos/objectstack-ai/objectstack/dispatches -> PR #34089, 7972 bytes sent, 7972 stored, identical); 1 issue comment via scripts/pm/post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/33894/comments, this report). git push is not a REST write.",
      "deviations": [
        "Clause-2 line: the claim 6896982467 writes 'Clause-②: no' with no arm; the PR body and the changeset carry 'Clause-②: no (narrowing) — …', as the ruling region (6896271476: 'Clause-②: no (narrowing)') and the #33646 precedent spell it. Without the arm readClause2Line grades arm null and check-adr-0087-registration asks no disposition. Metadata-protocol: narrowed is copied verbatim. The seat may correct the claim.",
        "dev-common pre-push asks for direct dependents' tests and pnpm lint: ran eslint on the touched files only (repo-wide pnpm lint is CI's: Lint · ESLint success). Dependents not run locally: the runtime, cli and cloud-connection tests that drive a pull mock IAutomationService.pullConnectorSource, and spec's public surface moved only by a describe sentence and one registry entry (check:authorable-surface, check:api-surface green); CI Test Core success on 208c32c83b. test:repo for spec not run locally (CI Test Core).",
        "Touched-package suites ran at 8d24166991 / 8f32675db0, before the final origin/main merge 208c32c83b; the dogfood battery, the gate sweep and CI ran at 208c32c83b."
      ],
      "files_changed": [
        ".changeset/33894-connector-pull-undeclared-input-key.md (+24)",
        "content/docs/automation/jobs.mdx (+8 -1)",
        "content/docs/references/data/mapping.mdx (+1 -1, generated)",
        "packages/services/service-automation/src/connector-pull-undeclared-input-key.test.ts (+192, new)",
        "packages/services/service-automation/src/connector-pull.test.ts (+7 -6, pin flipped in place)",
        "packages/services/service-automation/src/connector-pull.ts (+28 -2)",
        "packages/spec/src/data/mapping.zod.ts (+4 -1)",
        "packages/spec/src/migrations/entries/semantic/18.connector-pull-undeclared-input-key-refused.ts (+38, new)"
      ],
      "line_budget": "303 added / 11 deleted over 8 files vs the 3000-line human-merge threshold: under; no skills/** file touched",
      "open_questions": [
        {
          "question": "Should the pull refuse an undeclared watermark parameter on the FIRST pull too (nothing stored yet, so today it is not sent and the first pull writes rows), instead of failing from the second pull on?",
          "options": [
            "A keep the ruling's route: judge what is sent; the changeset, the migration entry and jobs.mdx say a first pull can succeed and every later one fails",
            "B also judge watermark.param's declaredness on every pull, even when no value is sent: fails fast on run 1, a further narrowing beyond the ruling"
          ],
          "recommendation": "A for this PR, because the ruling judges the input sent; B is a separate maintainer call if the second-run surprise matters (four axes: B is longer-term cleaner and protects AI authors better, has zero measured pull today, and adds no key or option)."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — connector-input-schema.ts header and ConnectorInputJudgeOptions.refuseUndeclaredKeys doc name only the connector_action node as the opting-in door; still true, now incomplete (outside the claim's file surface)",
        "carrier: none · noted, not filed — packages/spec/docs/SYNC_ARCHITECTURE.md (around line 223) lists the pull's input refusals as required parameter and type only; incomplete, not false (outside the file surface)",
        "carrier: sync-in owner (ADR-0153 D2, Proposed) · noted on PR #34089 — paging parameters sent from the door will be judged by this rule, so D2 now presumes the read action declares them",
        "carrier: none · noted, not filed — the 18.5.0 changeset for the node half ends 'The connector pull door (connectorSource.input) is unchanged.'; released text, true when shipped, superseded by this changeset"
      ]
    }
  12. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5
    os-dev-report

    {
      "issue": 33894,
      "status": "done",
      "round": "S4 prose delta (review-a L1 PASS 6902082755, contract record 6901440860 PASS)",
      "branch": "claude/area-A5-33894",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34089",
      "head": "d16e1609fe",
      "session": "session_01QsR2jTEivi2wogPpeo3xd5",
      "summary": "S4 fixed in prose only, no code change: the changeset, jobs.mdx and the mapping.zod.ts connectorSource.input describe now say the watermark is refused by an openapi operation that names none in query while declaring a parameter elsewhere or a body; an operation with no parameter and no body has no inputSchema (buildInputSchema returns undefined), so nothing is judged and the watermark is sent, until the day it gains its first parameter or a body. mapping.mdx regenerated. One CONTROL pin added to connector-pull-undeclared-input-key.test.ts: no inputSchema, watermark sent unjudged. S1-S3 not touched (the seat's follow-up card).",
      "commits": [
        "4adce2c4ca docs(spec, service-automation): an openapi operation with no parameter and no body is not judged until it gains one",
        "(regen) docs(spec): regenerate the mapping reference for the corrected connectorSource.input describe",
        "d16e1609fe merge origin/main"
      ],
      "tests": "At 4adce2c4ca: spec check:generated --fix under the lock regenerated check:docs (1 of 14), then check:generated unlocked: 'All 14 generated artifacts are up to date' exit 0; the four connector-pull files: Test Files 4 passed, Tests 65 passed; service-automation typecheck + check:test-typecheck exit 0. At d16e1609fe: the four connector-pull files again 65 passed. Declared narrowing: the lock queue gave no slot for 27 min (holder issue-33690 final.sh, 24 min), so these runs were unlocked; the full suites are CI's.",
      "gates": "check-changeset-no-major exit 0, check-adr-0087-registration exit 0, check:doc-authoring exit 0, check:nul-bytes exit 0. CI on 4adce2c4ca: Test Core (7/8) red, @objectstack/scenarios test/runner/run-date.test.ts timed out at 5000ms on run dates 2028-02-28 and 2028-02-29, not this diff; origin/main carries e9fb09871d (run-date oracle walks the working-day calendar once) which the branch lacked, so origin/main was merged (main-caused red). CI on d16e1609fe: 68 check-runs, 58 success, 10 skipped, 0 failure; Test Core, TypeScript Type Check, Lint & Repo Gates, Build Core, Governed Surface Queue Guard, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset success, Lint UI skipped; draft, mergeable, mergeable_state clean. merge-tree HEAD vs origin/main exit 0.",
      "dogfood_battery": "not re-run locally for this prose delta (battery green at 208c32c83b); CI Dogfood Regression Gate success at d16e1609fe",
      "mcp_calls": "0",
      "api_writes": "1 more: this comment via post-stamped (POST /repos/objectstack-ai/objectstack/issues/33894/comments)",
      "for_the_seat": "The PR body's 维护者速读 two-minute line says the new file has 6 cases; it now has 7. The dev does not PATCH a PR body.",
      "security_findings": "none"
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverpm:dispatchedpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions