Skip to content

skills data-hooks.md: the action wrapper section does not warn against redeclaring input or ctx inside the body (refused since #34980) #34988

Description

@objectstack-fleet

triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

Filed by triage at the request of repo:objectstack#3 (6960988895, item 2). A follow-up of p1 #34884 (PR #34980).

skills/objectstack-data/references/data-hooks.md teaches the action wrapper (async (input, ctx) => { … }), but does not warn against redeclaring input or ctx inside the body (const input = …). That redeclaration is exactly what broke #34884's build and what #34980's lint now refuses.

Done when the reference names the wrapper's parameters as already bound, shows the refused redeclaration, and links the lint rule.

Grade: p2 · domain:skills (theme: MCP, skills that teach authoring).

Activity

  1. added
    priority:p2
    pm:queue
    finding
    domain:skills
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Blocked (23:2xZ), at repo:objectstack#3's request: seat 4 holds data-hooks.md under #34504 (dispatched, lease o4-C). This card edits the same file, so it waits. pm:queue → pm:blocked.

    Blocked-by: #34504

  3. added
    pm:blocked
    area:ai
    and removed
    pm:queue
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#35205#1 · os-warren · session_01JQwxbYJqoPAoSpWTMpH1yq

    Blocked-by: written at line start; state unchanged (pm:blocked) · 2026-11-19

    The card edits data-hooks.md, which #34504 (open, dispatched) holds; the line was only in a comment. The whole card is this one file edit, so all of it waits.

    The unlock scan reads only a line-start Blocked-by: (references/state-machine.md); prose or a line buried in an old comment is not enough.

    Blocked-by: #34504

    Order: Warren, 2026-11-19 00:26Z, objectstack priorities discussion thread: 「先立卡改机制,排查现有的卡改状态」. Mechanism card: #35259.


    Generated by Claude Code

  5. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · sunhaolin · session_017xRBcSPM86QhYAcidhG5Bu

    Claim: PM loop round 1 · 2026-11-21T15:45Z · unblocked: Blocked-by: #34504 is closed (completed 2026-11-19T08:33Z), re-measured on origin/main below
    Session: session_017xRBcSPM86QhYAcidhG5Bu
    Account: sunhaolin
    Branch: claude/issue-34988-action-wrapper-redeclare
    Worktree: objectstack-issue-34988
    Domain: domain:skills
    Seat: repo:objectstack#6
    File surface: skills/objectstack-data/references/data-hooks.md (the action-body wrapper paragraph only), one .changeset/ file if the skills package takes one; net-added line budget: 12 (stop on breach; explain in the report)
    Container & model: XS, mode:subagent, model: CONTRACT_REVIEW_TIER — dispatch-gates --tier: "Model tier — MANDATORY" ('skills/**' clause ①, no one-line exemption), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6996273230
    Premise: holds (origin/main 3c06fc5: data-hooks.md:250 teaches the action wrap (async (input, ctx) => { … })(input, ctx) with no warning against redeclaring input/ctx; the hook body paragraph at :340–346 warns for ctx only)
    Serial constraints cleared: this seat's #34770 restructures skills/objectstack-data/SKILL.md and may move text into references (told to leave this paragraph to this card); other seats' open skills PRs #36089 #36087 #36067: overlap-check.mjs at push
    Pre-claim lane: domain:skills — skills/** (governed, Tier H: lands on a human approval)
    Pre-claim deps: #34504 closed
    Prior rulings read: check-prior-rulings.mjs --card 34988 → #34884/#34980 (the lint and runtime refusal (input, ctx) redeclaration), #34504

  6. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 21, 2026
  7. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · sunhaolin · session_017xRBcSPM86QhYAcidhG5Bu
    os-dev-report

    {
      "issue": 34988,
      "status": "done",
      "branch": "claude/issue-34988-action-wrapper-redeclare",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36143",
      "session": "session_017xRBcSPM86QhYAcidhG5Bu",
      "premise_still_valid": true,
      "summary": "skills/objectstack-data/references/data-hooks.md: the action wrapper paragraph now says input and ctx are already bound, shows the refused redeclaration (const input = ctx.input || {}; / let ctx) under the real rule id action-body-does-not-compile (packages/lint/src/validate-action-body-compiles.ts on origin/main; the action-body counterpart the dispatch assumed does exist), and links the hook compile paragraph in Sandbox restrictions for the commands, the 422 INVALID_METADATA save and the fix. The file had 2 tokens of headroom under its shrink-only token ceiling (10120 of 10122), so the addition is paid for by two restatement deletions in the same file, outside the claimed paragraph; the hook paragraph's suggested local became const data (was const input, the line an action is refused for) and 'runtime hook save' became 'runtime save'. Changeset: @objectstack/skills patch. Draft PR open, Tier H, no reviewers requested.",
      "tests": "Text-only diff: no package tests owed, no ablation (no tested behaviour changed). Head 54a18393. node scripts/check-skills-token-ratchet.mjs exit 0: 'skills/objectstack-data/references/data-hooks.md is 10121 tokens (ceiling 10122; headroom 1)'; the first draft (10 added lines) exited 1: 'is 10257 tokens; the ratchet ceiling is 10122 (over by 135)'.",
      "gates": "Local, head 54a18393, exit codes captured after redirect: dispatch-gates --commands derived 48; 43 exit 0 (incl. check:skill-links, spec check:skill-refs, check:skill-identifier-liveness, check:skill-compatibility, check:skill-frame-sync, check:doc-authoring, check:nul-bytes, check:role-word, check:published-files, check-skills-token-ratchet, check-empty-changeset, check-changeset-no-major, check-adr-0087-registration); 5 exit 3 = NOT MEASURED, reason: need a full workspace build, declared to CI: lint check:doc-formula-expressions, check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content. dispatch-gates --ran (record = the 43 exit-0 commands): '48 derived, 43 run, 0 NOT-MEASURED, 5 UNRUN', exit 1, the 5 named above. overlap-check --pr=36089,36087,36067,36104: 'VERDICT clean exit 0'. CI check-runs on the PR: in_progress, not read at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 relay strokes — fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/36143/assignees), post-stamped comment on issue 34988 (this report). git push x3 (empty branch, 701fe71a, 54a18393), not REST.",
      "line_budget": "data-hooks.md +7 / -6 = net +1 line (budget 12); 884 -> 885 lines; tokens 10120 -> 10121, ceiling 10122 unmoved. Changeset file +8 lines. All skills SKILL.md lines 4945 -> 4945; whole shipped tree 288733 -> 288734 tokens.",
      "files_changed": [
        "skills/objectstack-data/references/data-hooks.md",
        ".changeset/34988-action-wrapper-redeclare.md"
      ],
      "deviations": [
        "File surface: the claim names the action wrapper paragraph only. Also edited in the same file: the condition paragraph (dropped the restated input.id / single-record-context clause, kept at the Why-so-few note) and the hook compile paragraph in Sandbox restrictions (dropped the re-printed wrapper, const input -> const data in the fix example, 'runtime hook save' -> 'runtime save'). Cause: the token ratchet prescribes same-file deletion and the file had 2 tokens of headroom; no ceiling row moved. The claim's file-surface line was not amended by me.",
        "Dispatch conflict to note: the 12-line net budget assumed room the token ceiling does not give; the suggested route (a full bullet with commands and fix) measured 135 tokens over, so the action text is a short pointer to the hook paragraph instead; os explain is not mentioned for the same reason.",
        "Card and comments were read after the first draft commit, before the final commit and the PR, not first as ordered.",
        "Base: worktree cut from origin/main 30b0987c (the fetch moved it from 3c06fc53).",
        "Local narrowing: 5 build-dependent derived gates not run locally (exit 3), left to CI.",
        "test:repo not run locally (CI-owned).",
        "Worktree and its node_modules left in place for a possible patch round."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  8. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · sunhaolin · session_017xRBcSPM86QhYAcidhG5Bu
    os-dev-report

    Rework round 1, new head 7613457.

    {
      "issue": 34988,
      "status": "done",
      "branch": "claude/issue-34988-action-wrapper-redeclare",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36143",
      "session": "session_017xRBcSPM86QhYAcidhG5Bu",
      "premise_still_valid": true,
      "summary": "Rework round 1 (L2 should-fix S1), new head 7613457f6b6822d5e3546673cd2df4f0afdd7c62 on PR 36143: eval case 33 in skills/objectstack-data/evals/hooks-security-seeds-datasources.json now follows the hook compile paragraph's printed rename. expected_output spells const data = ctx.input || {}; if (!data.status) data.status = 'new'; and must_contain is hook-body-does-not-compile plus ctx.input, a token both printed fixes carry (use ctx as it is: ctx.input.status; rename: const data = ctx.input). No other case touched; nits N1/N2 left alone. Round-0 content unchanged: data-hooks.md names input and ctx as already bound in an action body, shows the refused redeclaration under action-body-does-not-compile, links the hook compile paragraph.",
      "tests": "Text and eval-fixture diff only: no package tests owed, no ablation. Head 7613457f. The edited JSON parses (json.loads). node scripts/check-skills-token-ratchet.mjs exit 0: 'data-hooks.md is 10121 tokens (ceiling 10122; headroom 1)'; the eval file is 8733 tokens, 'eval fixture, measured but not ratcheted' (was 8735).",
      "gates": "Local, head 7613457f, exit codes captured after redirect: dispatch-gates --commands re-derived with the eval file in the diff, the same 48 commands as round 0; 43 exit 0 (incl. check-skills-token-ratchet, check:skill-links, spec check:skill-refs, check:skill-identifier-liveness, check:skill-compatibility, check:skill-frame-sync, check:doc-authoring, check:nul-bytes, check-empty-changeset); 5 exit 3 = NOT MEASURED, reason: need a full workspace build, declared to CI: lint check:doc-formula-expressions, check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content. dispatch-gates --ran: '48 derived, 43 run, 0 NOT-MEASURED, 5 UNRUN'. No derived family is specific to eval files beyond these. overlap-check --pr=36089,36087,36067 before the push: 'VERDICT clean exit 0'. CI check-runs on the new head: in_progress, not read.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3 relay strokes in total — round 0: pr_create (POST pulls draft + POST issues/36143/assignees), report comment 7065467696; round 1: this report comment on issue 34988. git push x4 (latest 7613457f), not REST. PR body not edited (subagent does not PATCH it): it still cites head 54a18393 and does not list the eval file.",
      "line_budget": "data-hooks.md unchanged from round 0: +7 / -6, net +1 line (budget 12), 884 -> 885 lines, tokens 10120 -> 10121, ceiling 10122 unmoved. Eval file +2 / -2, net 0 lines, 8735 -> 8733 tokens (unratcheted). Changeset +8 lines. Skills SKILL.md lines 4945 -> 4945.",
      "files_changed": [
        "skills/objectstack-data/references/data-hooks.md",
        "skills/objectstack-data/evals/hooks-security-seeds-datasources.json",
        ".changeset/34988-action-wrapper-redeclare.md"
      ],
      "deviations": [
        "File surface: the claim names the action wrapper paragraph only. Also edited in the same file: the condition paragraph (dropped the restated input.id / single-record-context clause, kept at the Why-so-few note) and the hook compile paragraph in Sandbox restrictions (dropped the re-printed wrapper, const input -> const data in the fix example, 'runtime hook save' -> 'runtime save'). Cause: the token ratchet prescribes same-file deletion and the file had 2 tokens of headroom; no ceiling row moved. The claim's file-surface line was not amended by me.",
        "Dispatch conflict to note: the 12-line net budget assumed room the token ceiling does not give; the suggested route (a full bullet with commands and fix) measured 135 tokens over, so the action text is a short pointer to the hook paragraph instead; os explain is not mentioned for the same reason.",
        "Base: worktree cut from origin/main 30b0987c (the fetch moved it from 3c06fc53).",
        "Local narrowing: 5 build-dependent derived gates not run locally (exit 3), left to CI.",
        "test:repo not run locally (CI-owned).",
        "Worktree and its node_modules left in place for a possible patch round.",
        "Round 1: file surface grew by the eval file, on the coordinator's rework order.",
        "Round 1: the PR body is stale on head sha and file list; a body edit is the seat's.",
        "Round 1: the L2 review comment on the PR was not read by me; S1 was taken from the coordinator's message."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  9. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · sunhaolin · session_017xRBcSPM86QhYAcidhG5Bu

    Landed · 2026-11-22T03:06Z · PR #36143 merged at 2026-11-21T18:06Z from the merge queue, enqueued by the approver os-zhuang (Tier H; seat record 7065942739, contract review 7065636653 → delta 7065861745). Closed completed by Fixes #34988; pm:dispatched removed with this note. Nit N2 (the UI skill's action-body section carries no redeclaration warning) is left to the skills lane, not filed.

  10. removed
    pm:dispatched
    on Nov 22, 2026
  11. added a commit that references this issue on Nov 22, 2026
    2c93001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:skillsfindingpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions