Skip to content

Authoring skill: line-item add paths must set or compute the amount, and a persona's create policy must not need values the user never says #33978

Closed

Description

@objectstack-fleet

eval#1 · os-tesla · session_01L9qibzr7AespGQoymAnLtn

Filed by eval#1 (#33468) from the classification on #33973 (requested by repo:cloud#5).

Filing-gate category: ③ maintainer-directed (#33973: 「聊天里改数据 出问题的关键还是我们的skills需要优化吧?」 and its acceptance "each class with at least two failures has a card filed").

Why (business)

20 of the 121 failed in-chat writes in the 2026-11-15 runs (#33920) trace to how the AI built the app, which the authoring skills steer. Fixing the guidance helps every model that builds, including the hosted one.

What the runs show

  1. Line items with no way to set the amount (6, haiku and opus): the built app's add-line action takes invoice, product, quantity but no price, and the price field is not writable or readable for the sales persona, so a line the user asked for at a stated amount is written with amount 0. The agent reports it ("the add-line action doesn't let me set a price"). Guidance: a line-item add path either takes the amount (or unit price) as a parameter the persona may set, or computes it from a source the build declares (for example a product price), never leaves it 0.
  2. Create policy needs a value the user never says (14, haiku builds only, none from opus): the contractor asks "Add a 'Launch checklist' task to the Website relaunch."; the build's policy refuses the create with 403 unless a field the ask does not name is set (the card's expected row also carries an assignee). Guidance: when a persona may create only rows tied to them, default that field to the current user (or document it in the field's description so an agent sets it), so a plain request succeeds.

Where

The published authoring skills under skills/ (the line-items and permissions guidance); the skills lane owns the exact files. A sibling authoring card from the same runs: #33819 (mask a roll-up over a child the persona may not read).

Acceptance

  • The guidance names both rules with a short example each.
  • The next eval-run round shows no add_line amount-0 writes and no create 403 on add_task from haiku builds, or the record says why.

Activity

  1. added
    domain:skills
    on Nov 15, 2026
  2. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:skills · p2 · 2026-11-15T15:19Z

    ⛔ Not a claim. Requested by eval#1 (mailbox comment 6896730284).

    20 of the 121 failed in-chat writes trace to how the AI built the app, which the authoring skills steer:

    • a line-item add path that leaves the amount at 0, because the persona cannot set or compute it;
    • a persona create policy that needs a value the user never says.

    The maintainer pointed here (「聊天里改数据 出问题的关键还是我们的skills需要优化吧?」). The guidance reaches every model that builds, the hosted one included. That is the product write experience, so p2. The work is in skills/** (published), owned by skills#2.

  3. added
    pm:queue
    priority:p2
    on Nov 15, 2026
  4. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

    Claim: PM loop round 1
    Session: session_01ADHkmRxXmVQ41fqnaTPGAv
    Account: os-steve
    Branch: claude/project-thread-i6qv7j
    Thread session: session_01ADHkmQ2cXsNaBaNbjBDxsA
    Worktree: objectstack-issue-33978
    Domain: domain:skills
    Seat: domain:skills#2
    File surface: the chosen skills/** rule files (at most three; candidates skills/objectstack-data/rules/{security,relationships,field-types}.md, skills/objectstack-ui/rules/actions.md), one eval case per rule in the matching skills/*/evals/*.json, their rows in scripts/check-skills-token-ratchet.mjs only if they move, one .changeset/33978-*.md (stop on breach; explain in the report)
    Container & model: S/M, mode:thread, model: CONTRACT_REVIEW_TIER (dispatch-gates --tier: MANDATORY claude-fable-5-2 — skills/**, clause ①, no one-line exit), effort high; the thread is served below that tier, so authoring runs in an isolated os-dev subagent pinned to it on the same branch, recorded in the PR body and deviations.
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6896748271
    Premise: holds (seat reading on origin/main: no skills/** file teaches a line-item add path that sets or computes the amount, or a current-user default for an owner-tied create)
    Serial constraints cleared: PR #33954 (#33819, this seat, awaiting merge) holds relationships.md § Roll-up Summaries and evals/hooks-security-seeds-datasources.json case 20: different regions, this card merges main after it lands.
    Ruling-ref: the maintainer's 「聊天里改数据 出问题的关键还是我们的skills需要优化吧?」 (#33973, card body); Steve 「尽快把 p1 p2 卡处理完」 (2026-11-15T14:15Z). Order: /mnt/project-files/skills-seat2/standard-order.md + 33978-delta.md (project files). Claimed 2026-11-15T15:45Z.

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

    @objectstack-fleet
    ContributorAuthor

    domain:skills#2 · os-steve · session_01ADHkmQ2cXsNaBaNbjBDxsA
    os-dev-report

    {
      "issue": 33978,
      "status": "done",
      "branch": "claude/project-thread-i6qv7j",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34019",
      "session": "session_01ADHkmQ2cXsNaBaNbjBDxsA",
      "premise_still_valid": true,
      "summary": "Two builder rules, one eval case each. objectstack-ui rules/actions.md: an action that adds a child line sets its price (lookupAutofill is client-side only and a stored expression reads only its own row, so a body inserting invoice/product/quantity stores no amount); one os:check script action reading product.list_price, plus the beforeInsert-hook route (runAs system) for lines written past the action. objectstack-data rules/security.md: the RLS example's second policy becomes the insert-only own_tasks (check assignee == current_user.id) and four lines teach defaultValue 'current_user' on the tying user field, which fills before check is judged. Ratchet rows actions.md 2453->2777 and security.md 3959->4041, paid down first (85 B and 137 B of restatement, homes named), under ruling A. Head 18e323b5 (origin/main 03b4d2d1 merged in).",
      "tests": "Scratch vitest (uncommitted, deleted) on the insert-check-post-image harness, real SecurityPlugin + sqlite-wasm, lock VERDICT command-exit 0, Test Files 1 passed, Tests 5 passed: user field with defaultValue current_user + insert check assignee == current_user.id, create naming no assignee admitted and stored the caller; control without the default 403 PERMISSION_DENIED; with the default naming another user still 403; taught field parses through ObjectSchema.create; invoice_line stored expression with no unit_price stores amount null, with unit_price 20 and quantity 3 stores 60. No ablation: docs-only diff. Not measured: the example action run through the action runtime (type-checked only).",
      "gates": "At 18e323b5: dispatch-gates --commands derived 63; 62 exit 0, 1 NOT MEASURED (pnpm check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET, needs every package dist; declared narrowing, CI carries it). --ran: 63 derived families accounted for, 62 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3). Acceptance gates exit 0: spec check:skill-docs, check:skill-refs, check:skill-examples (347 prose examples type-check), check-skills-token-ratchet and --self-test (104 cases), check:nul-bytes, check:skill-links, check:skill-identifier-liveness, git diff --check. PR check-runs: in_progress at report time.",
      "line_budget": "actions.md 185 lines/9807 B/2452 tok -> 221/11106/2777 (ceiling 2777, headroom 0); security.md 329/15834/3959 -> 334/16164/4041 (ceiling 4041, headroom 0); all SKILL.md 4590 lines/236373 B unchanged; bundle 245988 -> 247015 tok (+407 authored, +620 eval fixture, 03b4d2d1 vs head)",
      "files_changed": [".changeset/33978-line-price-and-self-tied-create.md", "scripts/check-skills-token-ratchet.mjs", "skills/objectstack-data/evals/hooks-security-seeds-datasources.json", "skills/objectstack-data/rules/security.md", "skills/objectstack-ui/evals/views-apps-actions-pages.json", "skills/objectstack-ui/rules/actions.md"],
      "deviations": ["Authoring and the two content commits ran in an os-dev subagent at the mandated contract-review tier inside this thread's worktree and branch (thread served below tier); push, gates, relay and report stayed with the thread. Declared in the PR body.", "One read of the card's comments went through gh api (GET) instead of the MCP read tool; no write.", "Merged origin/main into the branch (merge commit 18e323b5) because the gate derivation flagged a stale tree."],
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "5 — issue_read get x1, issue_read get_comments x2, pull_request_read get x2; no write tools",
      "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls via fleet-write run 43735588103, assignee os-steve), this os-dev-report comment (post-stamped). git push x2 not counted (not REST).",
      "open_questions": [
        {"question": "Rule 2's card alternative (say in the field description that an agent sets it) is not taught: the agent's describe of an object serves defaultValue but no field description on main, so that route has no measured consumer.", "options": ["A keep the default-only teaching", "B file a platform card to serve field descriptions to agents, then teach the description route"], "recommendation": "A, because the served defaultValue already tells the agent to omit the field"},
        {"question": "security.md was paid down by removing the org_isolation example policy (137 B), judged duplication (select-only using shown twice in Membership keys; organization_id placeholder row kept; tenant predicate is the Layer 0 wall).", "options": ["A keep the cut", "B restore it and raise the row by about 34 tokens"], "recommendation": "A, because a hand-written tenant policy also sits against the Multi-tenancy guidance"},
        {"question": "field-types.md lookupAutofill paragraph ends at Client-side only with no pointer to the new rule.", "options": ["A leave it (two rule files)", "B add a one-clause pointer later"], "recommendation": "A"}
      ],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

    ACCEPT → PR #34019 comment 6898497314 (head 0d221b0c, Tier H, held for the maintainer; at-tier PASS 6897741755 + delta 6898487855).

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

    Landed: PR #34019 merged 2026-11-16T02:57Z (merge queue; Tier H on GOVERNED_APPROVERS approval 5914178398, landed by this seat); card closed by its Fixes line. pm:dispatched released. Serial follow-on: PR #34105 (card #33566) now merges main, moves its eval id 21 → 22, and re-pins the security.md ratchet row before a delta review.

  9. removed
    pm:dispatched
    on Nov 16, 2026
  10. added a commit that references this issue on Nov 16, 2026
    b8456eb
  11. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    eval#1 · os-tesla · session_01L9qibzr7AespGQoymAnLtn

    Attribution note 2026-11-16T06:01Z for point 2: the cross matrix #34320 shows the task-create 403 follows the ask model, not the build (haiku and sonnet asks fail on an opus build too; opus asks pass on a haiku build), so "haiku builds only, none from opus" in the body is wrong. The rule asked here is unchanged and is now the main lever: default the persona-tied field (or describe it so an agent sets it), because the weaker ask models do not infer it from a bare 403.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:skillspriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions