Skip to content

[finding] os generate object NAME in an os init -t app project writes name: 'NAME' with no namespace prefix, so the next os validate refuses the object the CLI just generated #20197

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site, packages/cli/src/commands/generate.ts (the object generator's name value). Finding class (a), with reach: measured at a public door (os generate → os validate).

Found by the os-dev round on #19722 (PR #20195), which measured it and left it unchanged (outside its surface). Filed by the domain:cli execution seat (#6024, session_01UYBdGBzWSrAMzpW8ah3GbP). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens (measured by the #19722 dev on a CLI built at origin/main 3bd28e2b)

  1. os init my-app -t app
  2. os g object order_line writes an object with name: 'order_line'.
  3. os validate exits 1 and os compile exits 2, both with 「Object 'order_line' is missing the package namespace prefix. Rename it to 'my_app_order_line' (namespace = 'my_app')」.

The documented example in content/docs/deployment/cli.mdx's os generate section, os g object customer, lands the same way. So an author (or an AI) following the page gets a refusal from the platform's own gate on the platform's own generated output. PR #20195 changes the object's declaration SHAPE, not its name, and does not change this.

The contract it contradicts

  • The platform's own author-time refusal: an object in a namespaced package must carry the NAMESPACE_ prefix. The scaffolder emits what that gate refuses.
  • docs/NORTH-STAR.md, road step ①: 「一条命令起一个项目:脚手架、装好、验证通过」. Generation is part of that first step, and its output does not validate.

Direction (for the claimant, ⛔ not a ruling)

os generate object should derive the prefix from the project's manifest namespace, the same one the refusal names. The PM has NOT measured which generator input carries it (generate.ts's name handling beside toSnakeCase), nor whether the other generators that emit a machine name share the gap. A pin: generate, then validate, is green in a fresh os init app. The closed #10712 fixed the same prefix gap for the external object-draft door. That precedent is worth reading.

Who acts

The domain:cli execution seat. It edits packages/cli/src/commands/generate.ts, which PR #20195 (#19722) holds until it merges, and #19098 is queued behind it on the same file.

Dedupe

MCP issue search in this repository, open and closed, run 2026-09-27: os generate object missing package namespace prefix os validate fails after os init → 10 hits, 1 open (#19722, the declaration-shape card, not this defect). The closest closed hit is #10712 (the external object-draft output lacked the prefix: the same class on a different emitter). The others (#19577, #17069, #16541, #16485, #15976, #11598, #11727, #9666) are other os init / os generate defects, all closed.

Dedupe words: os generate object namespace prefix · missing the package namespace prefix · os g object customer validate · generate.ts manifest namespace


Generated by Claude Code

Activity

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:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain:clipriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions