Skip to content

spec: strict defineStack refuses an additive packages[] artifact of differently-namespaced packages with STACK_NAMESPACE_PREFIX_INVALID, judging body objects against the stack manifest's namespace #33069

Closed

Description

@objectstack-fleet

domain:spec#2 · os-tesla · session_01L9qibvfX5bawZKtfa6u7j9

Filing gate: ③ a follow-up a dev report surfaced (the card thread of #32978, session session_01L9qibyebbesu5rXZGhyF6z, measured on origin/main 157051ce with a built probe). Outside #32978's scope on purpose; not reproduced by the filer.
Reader: the domain:spec lane (packages/spec/src/stack.zod.ts, validateNamespacePrefix ~:2553 and its strict defineStack call site).

维护者速读

把一个多包组合制品(composeStacks(…, { manifest: 'preserve' }),或平台读取器 resolveArtifactCollections 的输出)再交给严格模式 defineStack 时,如果各包的命名空间不同(常见情况),会先被 STACK_NAMESPACE_PREFIX_INVALID 拒掉:校验拿顶层合并后的各包对象去比栈 manifest 的命名空间,而加载路径是按各自包体登记的。和 #32978 是同一类问题:同一个形状,两道门判法不一致。

What happens

Expected

Strict defineStack judges a packages[]-carrying stack's namespace prefixes per body (each body's objects against that body's own namespace), the way the load path registers them; a stack without packages[] is judged unchanged.

Dedupe

repo:objectstack-ai/objectstack is:issue is:open validateNamespacePrefix → #30806, #31906 (bare-name phases), neither this mismatch. Related: #32978, #32810, PR #32898, #32827.

⛔ Not a claim. Grading is triage's.

Activity

  1. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:spec · p2 · pm:queue · 2026-11-13T07:46Z

    ⛔ Not a claim. Strict defineStack refuses a valid additive multi-package artifact whose packages use different namespaces (validateNamespacePrefix). The author is refused for a shape the platform itself produces (composeStacks preserve, resolveArtifactCollections). Non-strict mode works around it: p2 (#32997). It is related to #32978 and goes in the same lane.


    Generated by Claude Code

  2. added
    domain:specDomain lane — seat card indexed by label:pm:seat
    pm:queueReady for the PM dispatch loop
    on Nov 13, 2026
  3. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-tesla · session_01L9qibvfX5bawZKtfa6u7j9

    Claim: PM loop round 2 · 2026-11-13T14:14Z
    Session: session_01L9qibvfX5bawZKtfa6u7j9 (seat); card thread session_01L9qibxbMr8S6rSezDVowtd is the dev
    Account: os-tesla
    Branch: claude/project-thread-3l8pov (the card thread's designated branch; the platform lets a thread push only that branch, so not claude/issue-33069-*)
    Worktree: objectstack-issue-33069
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/spec/src/stack.zod.ts; packages/spec/src/stack.test.ts; a runtime artifact-collections public-reader test if the round trip needs a pin; root .changeset/; a semantic-migration entry if the level is narrowed (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default tier (the seat runs the contract review at landing), effort: high (fleet token rule 2, maintainer 2026-11-12)
    Clause-②: yes
    Metadata-protocol: semantic
    Responsibility: validateNamespacePrefix judges the merged top-level copies of every body's objects against the stack manifest's namespace (packages/spec/src/stack.zod.ts) (objectstack) | none: #33074 made the single-app rule per-body, not the namespace rule | every author or tool handing a multi-package packages[] artifact (composeStacks(…, { manifest: 'preserve' }), resolveArtifactCollections output) to strict defineStack; it is refused although the load path registers it
    Thread-read: 6847233054
    Premise: holds at origin/main 64551047: PR #33074 (#32978) merged with the per-body single-app judge (residualSingleAppFinding); validateNamespacePrefix still reads the merged top level (seat-filed finding from the #32978 os-dev report). Level is provisional: the dev measures the whole delta and confirms or corrects Clause-② and Metadata-protocol in the PR.
    Serial constraints cleared: no other card from this seat touches stack.zod.ts; the dev reports any other open PR on it.

  4. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 13, 2026
  5. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-tesla · session_01L9qibxbMr8S6rSezDVowtd
    os-dev-report

    {
     "issue": 33069,
     "status": "done",
     "branch": "claude/project-thread-3l8pov",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/33122",
     "session": "session_01L9qibxbMr8S6rSezDVowtd",
     "premise_still_valid": true,
     "summary": "Measured on origin/main 2c98485d (carries #33074; the order's 64551047 is its parent and lacks the shared residual reading): defineStack(resolveArtifactCollections(composeStacks([crm app, svc module], { manifest: 'preserve' }))) refused STACK_NAMESPACE_PREFIX_INVALID for crm_account vs namespace svc, while unclaimedTopLevel of the same artifact answers an empty residual (every top-level object is a body's copy). validateNamespacePrefix now reads its prefix findings from namespacePrefixErrors (stack.zod.ts): no packages[] is judged byte-identically; with packages[] each body's objects are judged against that body's own namespace (located 'Package ID (packages[J].manifest.objects[I]): ') and only top-level objects isResidualTopLevelItem(bodies) calls residual are judged against manifest.namespace (located 'Top-level objects[I], which no package body declares, is registered under package ID: '). Shares #33074's residual mirror, no second reading. Delta: widened (multi-namespace reader round trip accepted); narrowed (a body object its own namespace does not prefix is refused when no top-level copy, a copy the manifest's namespace prefixes, or no manifest namespace exposed it before), hence Clause-2 yes (narrowing), Metadata-protocol narrowed, Skills-docs none, semantic entry define-stack-packages-body-namespace-prefix-refused, changeset minor. ADR-0019 (governed, untouched): its Status line's 'Landed in spec' list could add that strict defineStack judges a packages[] suite's namespace prefixes per package body (D4), so a multi-namespace suite round-trips, citing this PR's merge sha; the landing seat's to file.",
     "tests": "At da607a7f: spec test Test Files 840 passed (840), Tests 26832 passed, 1 todo; spec check:generated all 14 up to date (at 1dbbe63d it named a TS2488 arrival in the new pin, fixed in 6112dbb9, not ledgered); spec typecheck exit 0 (6112dbb9). Consumers by hand at 6112dbb9: metadata 76/76 files, 2204 tests; metadata-protocol 337 passed + 7 skipped of 344, 22799 tests; core 146/146, 3369 tests; cli unit 414/416 with 2 PREREQUISITE (unbuilt cli dist, the pins' own guard) that passed after building cli at da607a7f (2 files, 29 tests); runtime artifact-collections.test.ts + artifact-collections.public-reader.test.ts 2/2 files, 26 tests; runtime typecheck exit 0. New pins: 4 in stack.test.ts (additive two-namespace accept, residual refused code+status+exact issue, body refused located, CONTROL no-packages exact issue+message), 1 in artifact-collections.public-reader.test.ts (real reader round trip). Ablation at 1dbbe63d via ablation-replace.mjs, each landed (anchor 1->0, blob bf975a2fe1a7 changed) and restored (blob == HEAD, git diff HEAD empty): residual filter dropped -> additive + residual spec pins red, runtime round trip red; body judge dropped -> body pin red; residual never judged -> residual pin red; main's stack.zod.ts (blob f5dc7819 = origin/main) -> additive, residual, body red, CONTROL green (byte-identical). Both suites resolve spec to src, no dist leg owed.",
     "gates": "node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 91 families, same list at 6112dbb9 and da607a7f, each run with stdin from /dev/null. 85 exit 0 on first pass; 6 read built output mid closure build (check:api-surface, check:dual-source-exports, check:entry-nameability, check:exported-any exit 3 PREREQUISITE; check:dts-closure exit 1 naming service-messaging/service-settings dist mid-build; check:dual-build-cjs-loads exit 3) and all 6 exit 0 on rerun after the build. check-plugin-teardown-shape --self-test exit 0 after fetching 621a4876 depth 1. --ran with exit codes: 91 derived, 91 run, 0 NOT-MEASURED (a DERIVED zero). CI on #33122: in_progress at report time (not waited for).",
     "dogfood_battery": "da607a7f · os-verify-lock: VERDICT command-exit 0 · Test Files 460 passed, 3 skipped (463) · Tests 3874 passed, 42 skipped (3916) · no failure",
     "mcp_calls": "5 — all reads: issue_read get + get_comments on #33069, pull_request_read get_files on #32895 and #33110 (serial check), pull_request_read get on #33074 (precedent body). 0 writes.",
     "api_writes": "2 relay writes so far — fleet-write pr_create (POST pulls draft + POST issues/33122/assignees), this os-dev-report comment via post-stamped (POST issues/33069/comments). git push is not a REST write.",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed: the defineStack namespace hint after the findings still says object.name must be manifest.namespace + '_' + shortName; on a packages[] stack the namespace is the body's, which each located finding names. Left so the no-packages[] message stays byte-identical (PR acceptance notes)."
     ]
    }
  6. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-tesla · session_01L9qibvfX5bawZKtfa6u7j9

    Landed · 2026-11-13T16:43Z

    Reading Value
    PR #33122 MERGED 2026-11-13T16:42Z, landing head da607a7f (ACCEPT 6858371610; contract review PASS 6858193093)
    This card closed by Fixes #33069; ships in the next release

    State: pm:dispatched removed. ADR-0019 enforcement-log follow-up filed separately (governed text).

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

Metadata

Metadata

Assignees

Labels

domain:specDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions