Skip to content

review follow-ups of PR #38586: the upgrade skill says a non-TTY --stored --apply without --yes exits with confirmation_required, which only --json prints #38593

Backlog

Description

@objectstack-fleet

repo:objectstack#1 · zhuangjianguo · session_01QsR2jTsdScTh3o2fSjbxSz

Filing gate: ① (review follow-ups, one card per PR) · Source: fleet (contract review record 7256439570 on PR #38586, N3: "Not this PR's; a follow-up card is the seat's filing call"; re-measured by seat 1 on origin/main d55ee70a)
Grade: area:ai · domain:skills · Bug · reach: skill text: every agent that loads objectstack-upgrade and runs os migrate meta --stored --apply from a session (no TTY) is told which error to expect · evidence: reproduced (origin/main d55ee70a, built CLI, one run per arm)
Suggested-grade: p3 (the instruction it guards, "pass --yes", is right; the sentence names a code the agent will not see unless it also passed --json)
Size: XS
Reader: the lane that next edits skills/objectstack-upgrade/ (domain:skills), after PR #38586 merges, because that PR moves the sentence. If #38586 is still open when this is claimed, the edit goes where the sentence then lives (see "Where the sentence is").
Dedupe: is:issue is:open "PR #38586" → 1 (#34770, the source card, not this); is:issue is:open confirmation_required → 0; is:issue is:open "loose ends" label:area:ai → 0.

维护者速读

  • 问题:升级技能写着「在非交互终端里不带 --yes 执行 os migrate meta --stored --apply,会以 confirmation_required 退出」。实测只有加了 --json 才会输出这个错误码;不加 --json 时只打印一条警告,然后以 1 退出,输出里根本没有这个词。
  • 做什么:把这句改成真实行为:非交互时不带 --yes 一律拒绝并退出 1;只有 --json 的输出里才有 confirmation_required。
  • 出错会怎样:只改技能文字一句,不改命令行为。真正要紧的「必须带 --yes」本来就写对了。
  • 要你做的:无需决定,车道照常认领。

What happens

packages/cli/src/commands/migrate/meta.ts:1506-1519 on origin/main d55ee70a:

if (apply && !flags.yes) {
  if (flags.json || !process.stdin.isTTY) {
    if (flags.json) {
      await emitJson({ error: 'confirmation_required', hint: 'pass --yes' }, 0, { compact: true });
      this.exit(1); return;
    }
    printWarning('Apply mode rewrites sys_metadata rows in place — … Re-run with --yes to confirm, or run without --apply to preview.');
    this.exit(1); return;
  }

So in a non-TTY without --yes, the code confirmation_required is printed only under --json. Without --json the answer is a warning and exit 1.

Measured (origin/main d55ee70a, @objectstack/cli built, stdin from /dev/null, a fresh SQLite file)

Command Output Exit
os migrate meta --stored --apply --database-url file:probe.db ⚠ Apply mode rewrites sys_metadata rows in place — each rewritten row gets a new checksum and a history entry. Re-run with --yes to confirm, or run without --apply to preview. 1
os migrate meta --stored --apply --json --database-url file:probe.db {"error":"confirmation_required","hint":"pass --yes"} 1
os migrate meta --stored --apply --yes --json --database-url file:probe.db (control) the run's JSON report 0

The first run's whole output does not contain confirmation_required.

Where the sentence is

  • origin/main d55ee70a, skills/objectstack-upgrade/SKILL.md:191-193: "⛔ --yes is not optional for you. Without it --apply asks for confirmation, and in any non-TTY — every agent session — it refuses instead, exiting 1 with confirmation_required."
  • PR docs(skills): the objectstack-upgrade entry file becomes a router #38586 head 1fc4d10d72, skills/objectstack-upgrade/SKILL.md:103-104 (trap 3): "… then os migrate meta --stored --apply --yes — without --yes any non-TTY is refused, confirmation_required — until …".
  • Already true, leave as is: the Failure-modes paragraph says the code belongs to --json failures ("Every --json failure above carries a stable error code … confirmation_required …", SKILL.md:471-474 on main; references/examples-upgrade.md:427-430 at the PR head).

Items

  • N3 (record 7256439570): the sentence says a non-TTY --apply without --yes is refused with exit 1, and that --json reports it as confirmation_required. Suggested wording for the router line: "without --yes any non-TTY is refused (exit 1; under --json, confirmation_required)". Keep the --yes instruction as it is.

Done when

  • No sentence in skills/objectstack-upgrade/ says a run without --json exits with confirmation_required: git grep -n confirmation_required skills/objectstack-upgrade shows each hit tied to --json.
  • The skill's line ratchet and the bundle's eval parity pass as usual. Eval case 4's --yes literal is untouched.

Related: PR #38586, #34770.

Activity

  1. added
    pm:queue
    domain:skills
    area:ai
    on Nov 29, 2026
  2. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · zhuangjianguo · session_01QsR2jRH2X4frz9bBiZHNk4

    Triage: lands in skills/objectstack-upgrade/ (the sentence on a non-TTY --stored --apply without --yes) · area:ai · domain:skills · Bug · p3 · pm:queue · size XS. Rationale: a wrong sentence in a shipped skill is a Bug (reproduced on d55ee70a: without --json the CLI prints a warning and exits 1, no confirmation_required); the instruction that matters ("pass --yes") is right, so p3. A review follow-ups card stays its own card rather than a sweep row; it can be claimed before PR #38586 merges, editing the sentence where it then lives.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aidomain:skillspm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions