Skip to content

cli: on 19, os validate passes a manifest still declaring engines.protocol: '^18' with a warning, while os dev with the same config refuses to start #38928

Description

@objectstack-fleet

qa#1 · os-justin · session_01QSeKYpxQpmErd1ixfkgbYh

Provenance: filed by the verification seat from runner session_01QSeKYnbcNyGspzsj2EpdvP (upgrade acceptance, test 1 of #38907); the runner made no GitHub write.
Ruling-ref: priority:p1 — maintainer 「都应该是 p1 吧?」 (2026-12-01, verification seat session; GA focus 「重点解决 v18到 v19 的升级」)

Filing gate: ① product defect, reproduced through the public entries (os validate, os dev) · Source: maintainer, 「你发现的问题立卡了嘛?都应该是 p1 吧?」 (2026-12-01).

Grading: area:build · domain:cli · Bug · p1 (maintainer's word, Ruling-ref above) · reach: every 18.x project whose range is not moved (for example after the C2 rollback), measured in S1 · evidence: measured.

QA-source: #38920 · upgrade:18.6.0-to-19.0.0-next.3 · C4

Business reason

os validate is the check the upgrade loop tells users to run before booting. On 19 it reports green for the one thing that stops 19 from starting at all. A user whose --write was rolled back (the C2 card, which also undoes the range rewrite) sees validate green and then a boot refusal.

Reproduction (measured 2026-12-01, framework ea6e312a)

  1. S1 (blank app) upgraded to 19.0.0-next.3, all mechanical edits applied, os validate / os build green with engines.protocol: '^19'.
  2. Set engines.protocol back to '^18' in objectstack.config.ts.
  3. npx os validate: passes; the range is a warning only.
  4. npx os dev -p 3100: refuses to start (protocol incompatible); no data route answers.

Expected

os validate on a 19 toolchain fails (non-zero exit) on a manifest range that admits 18 and not 19, with the same code and prescription the boot gives (OS_PROTOCOL_INCOMPATIBLE, registered protocol-18-range-refused, and the os migrate meta --from 18 step). Validate and boot agree on the one refusal that happens before any metadata loads.

Reader

The domain:cli lane dev who owns os validate's manifest checks. Acceptance pin: a '^18' manifest on 19 exits non-zero from os validate with the boot's code.

Dedupe

Searches (open and closed):

No open card covers it.

Related: #37229, #38907 (section B).

Activity

  1. added
    bug
    priority:p1
    domain:server
    on Dec 1, 2026
  2. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ

    Triage: first-touch · lane grade kept: area:build · Bug · p1 (maintainer 「都应该是 p1 吧?」) · pm:queue. Part of the 19 GA upgrade lines on #38907.

  3. added
    pm:queue
    on Dec 1, 2026
  4. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

    Maintainer ruling · 2026-12-02T07:03Z · asked by seat repo:objectstack@os-justin in its session, on the build zone's W0 flag (mailbox PR #38811, comment 7336958781). Options put: A — os validate fails on a 19 toolchain when the manifest's range admits 18 and not 19, with the boot's code and prescription; B — validate keeps passing and only words the warning louder.

    The maintainer, verbatim: 「38928 选 A」

    Ruled: A. On a protocol-19 toolchain, os validate exits non-zero on an engines.protocol range that admits 18 and not 19. It names the same code the boot gives (OS_PROTOCOL_INCOMPATIBLE), the registered entry protocol-18-range-refused, and the os migrate meta --from 18 step. So validate and boot agree on the one refusal that comes before any metadata loads. This is the card's Expected as written, and its acceptance pin stands: a '^18' manifest on 19 exits non-zero from os validate with the boot's code.

    Consequence, stated for the record: a project that today passes os validate with a stale '^18' range now fails validate. Such a project already fails to boot, so no working project changes behaviour; only the point of failure moves earlier.

    The card is claimable by the build zone on this ruling.

  5. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYoSKoNUygbCoMBTbGc

    Claim: PM loop round 1 (zone build)
    Session: session_01QSeKYoSKoNUygbCoMBTbGc
    Account: os-justin
    Area: build
    Branch: claude/issue-38928-validate-protocol-range
    Worktree: objectstack-issue-38928
    Domain: domain:server
    Seat: repo:objectstack@os-justin
    Ruling-ref: 7337736429 — maintainer 「38928 选 A」
    File surface: packages/cli/src/commands/validate.ts (the protocol-range site, today the protocolGap advisory near checkProtocolVersionGap(config.manifest)), packages/cli/src/utils/protocol-version-gap.ts (header prose "advisory-only — it never fails a build/validate/doctor" must stop being true for validate), new per-card test file packages/cli/src/commands/validate-protocol-range-refusal.test.ts
    Container & model: M, mode:subagent, model: default judgement tier — dispatch-gates --tier on this surface at 78148226: "no path-derived mandate", effort: high (ruling implementation: reuse the boot's judge, the code and the prescription without a second rule)
    Clause-②: no
    Metadata-protocol: none — the boot already refuses this range (ruling 7337736429: "Such a project already fails to boot, so no working project changes behaviour; only the point of failure moves earlier"). Read as a (narrowing) arm of os validate's accept set for review routing: one contract-review-tier L2 owed before the queue, and the zone hands the PR to the seat for landing.
    Responsibility: packages/cli os validate in objectstack | the boot's handshake (packages/metadata-core/src/protocol-handshake.ts, OS_PROTOCOL_INCOMPATIBLE) already refuses, validate does not | every 18.x project whose range did not move on upgrade (e.g. after the #38922 rollback) — measured S1 on 2026-12-01
    Thread-read: 7337736429
    Premise: holds — measured 2026-12-01 at ea6e312a; validate.ts at 7814822 still prints the range as a non-blocking ⚠ ("Non-blocking upgrade advisory — never gated by --strict"); the dev reproduces the '^18' case on origin/main before writing code
    Pre-claim lane: domain:server (file ownership only) — packages/cli/** inside zone build's lease
    Pre-claim deps: no Blocked-by:; ruling recorded (7337736429). overlap-check.mjs VERDICT clean (no branch yet). check-handover.mjs --inflight: OVERLAP with #39053 (claim 7337213513, p2, os-support-ai, card thread) on validate.ts — its amendment touches only the nav-group findings headline block; validate.ts is not in SINGLE_CLAIM_PATHS, so this is ordinary concurrency (the later lander merges). Notify: serial — whichever lands second merges main and re-runs the cli gates.
    Prior rulings read: check-prior-rulings.mjs --card 38928 — ruling 4 · maintainer 1 · ⛔ 15 in validate.ts; carried into the dispatch: :1419 --strict promotes warnings, never info (6787890900); :493 "⛔ One judge, not a second rule". No conflict with ruling A; ADR-0087 D1 ("Enforce the protocol handshake, with machine-readable refusal … the exact replay command (objectstack migrate meta --from <N>)") read, consistent.
    Fold-or-serial: no fold with the meta.ts series (different file and mechanism); runs in parallel with #38879 (no shared file).
    Serial constraints cleared: #39053 named above (validate.ts, different block); #38930 stays pm:blocked on this card

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 2, 2026
  7. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYoSKoNUygbCoMBTbGc
    os-dev-report

    {
      "issue": 38928,
      "status": "done",
      "branch": "claude/issue-38928-validate-protocol-range",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39090",
      "session": "session_01QSeKYoSKoNUygbCoMBTbGc",
      "premise_still_valid": true,
      "summary": "Premise reproduced on origin/main 78148226: a defineStack project with engines.protocol '^18' passed os validate at exit 0 on both faces (text: drift advisory only; --json: valid true, range only under protocolVersionGap), and os build also exits 0. New findProtocolRangeRefusal (packages/cli/src/utils/protocol-version-gap.ts) runs the boot's own assertProtocolCompat (silenced warn hook) over the slice AppPlugin reads (bundle.manifest || bundle), answers through protocolIncompatibleAnswer, and names the registered semantic entries whose surface is the handshake's range key on the steps the prescribed migrate meta --from N replays (read from MIGRATIONS_BY_MAJOR, imported lazily on a refusal only). validate.ts step 1b' runs it ahead of every content check (after the producer-refusal and conversion fold, before the schema parse) and exits 1 regardless of --strict. Text prints the code, the boot's message with its Run: step, and protocol-18-range-refused. --json carries one errors[] row: path, code OS_PROTOCOL_INCOMPATIBLE, httpStatus 422, message, details (the boot answer's closed shape) and migrationEntries. The judge runs against the CLI's PROTOCOL_VERSION, which is what os dev / os serve boot under (they import @objectstack/runtime from the CLI's own deps). The drift advisory, os build and os doctor are unchanged. File surface plus one row: packages/cli/test/validate-build-gate-parity.test.ts VALIDATE_ONLY_GATES gets findProtocolRangeRefusal, because that test's closed call-site roster requires every validate.ts call to be classified. The producer did not move to another package.",
      "tests": "New packages/cli/src/commands/validate-protocol-range-refusal.test.ts (integration tier, 16 tests, 4.7 s file wall locally): three concurrent CLI spawns ('^18' --json and text exit 1 with code/message/details equal to assertProtocolCompat + protocolIncompatibleAnswer and protocol-18-range-refused named; '^19' --json exits 0 valid true) plus a boot-parity battery over 10 ranges (refused exactly when the boot refuses, no hard-coded verdicts) and a vacuity pin. At 0274f51c1f: new file 16/16 passed; protocol-version-gap.test.ts + validate-build-gate-parity.test.ts 2 files / 55 tests passed; at 8b5aebfd71 the three together 71/71. pnpm --filter @objectstack/cli typecheck exit 0 at 0274f51c1f. Ablation via scripts/ablation-replace.mjs (anchor if (protocolRefusal) { replaced by a never-true guard, landed 1 to 0, blob 246bd982 to bf8ca296): THE PIN and the text-face pin red (2 of 16), control and parity battery green as expected; restored blob == HEAD, git diff HEAD empty. No rebuild was needed: the child runs validate.ts from src via bin/run-dev.js, and the battery imports the util from src.",
      "gates": "Local: dispatch-gates --commands = 72 commands, run at 0398b620fa, each with its exit captured before any pipe; --ran reconciliation (with exit codes): 72 derived, 68 run, 4 NOT-MEASURED, 0 UNRUN. 67 exit 0. check:test-source-alias exit 1 at 0398b620fa (the new test reached the lazy registry import inside a clocked case); fixed at 0274f51c1f with the module-top import the gate prescribes, and it is exit 0 there. NOT MEASURED: check:dual-build-cjs-loads, check:i18n, check:i18n-coverage, check:i18n-walk-parity (exit 3 PREREQUISITE NOT MET, needing the built CLI and example closures) are left to CI Lint and Repo Gates. Re-run at final head 0274f51c1f, all exit 0: check:test-source-alias, check:cross-package-test-inputs, check:type-check-debt, check:type-check-coverage, check:tier-file-adoption, check:nul-bytes, check:cli-test-child-env, check-issue-citations, check:doc-authoring. overlap-check VERDICT clean before each push. CI check-runs: not yet read; the report was delivered at local completion, so CI convergence is the seat's to read.",
      "mcp_calls": "0",
      "api_writes": "3 — git push (branch claude/issue-38928-validate-protocol-range, 3 pushes counted as one write leg: probe, 8b5aebfd71, 0274f51c1f); relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/39090/assignees, run 46837616953); post-stamped os-dev-report comment on #38928",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: os build on a defineStack project with engines.protocol '^18' on this protocol-19 branch exits 0 with only the drift advisory, while the boot refuses the artifact · evidence: measured on the branch head; recorded as the VALIDATE_ONLY_GATES row's build-side gap; the ruling named os validate only · dedupe words: os build protocol range refused, OS_PROTOCOL_INCOMPATIBLE build, engines.protocol build advisory",
        "carrier: none · noted, not filed — VALIDATE_ONLY_GATES header sentence 'It holds two today' in packages/cli/test/validate-build-gate-parity.test.ts was already stale (three rows before this PR, four now); a volatile count, left as found and noted in the PR's Acceptance notes",
        "carrier: none · noted, not filed — per-package manifest ranges in a packages[] artifact are not judged by this check (AppPlugin judges the root slice only); not measured whether the boot refuses a packages[] body range on the code-defined-stack path"
      ]
    }
  8. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYoSKoNUygbCoMBTbGc

    Claim amendment (claim 7337788608) · 2026-12-02T08:05Z
    File surface (added): packages/cli/test/validate-build-gate-parity.test.ts — one VALIDATE_ONLY_GATES row for the new findProtocolRangeRefusal call; the test's closed call-site roster requires every call in validate.ts to be classified. check-handover.mjs --inflight --paths=packages/cli/test/validate-build-gate-parity.test.ts --card=38928: no overlap (one unread surface, #38415, a pm-dispatch skill card).
    PR: #39090 (draft, head 0274f51c1f), dev report 7338954379.

  9. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYoSKoNUygbCoMBTbGc

    Delivered · 2026-12-02T09:05Z · PR #39090 merged as 006a607d55 (L1 ACCEPT 7339676350, landing 7339710599). Card closed by Fixes #38928; pm:dispatched removed with this note. Follow-up for os build: #39098.

  10. removed
    pm:dispatched
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:buildbugdomain:serverpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions