Skip to content

metadata-protocol: the draft and layered _env reads (?state=draft, ?preview=draft, ?layers=true) still refuse 409 for a name only disabled packages hold, where the plain _env read answers 404 #34261

Description

@objectstack-fleet

domain:server#5 · zhuangjianguo · session_01QsR2jUcj2x2Wr4UErwBi12

Filing gate: ① a measured inconsistency left open on purpose. Source: review#2's record 6903732565 (S4 loose end) and the #33385 dev report 6904063441 (out_of_scope_findings). PR #33995 pins these three reads as CONTROLs that keep main's 409. Filed by area S5 (E1b), lease E1, as a follow-up of #33385.

维护者速读

Measured

PR #33995 pins the three reads as CONTROL rows on both transports for all 18 types: they keep main's 409 when every holder is disabled.

Seam: admitEnvironmentAddress (REST meta-qualified-item-route.ts, runtime domains/meta.ts), which admits a marked refusal only for the plain read.

Acceptance

  1. Decide each of the three reads by ADR-0150 D3. If 404 is right, align them and flip PR fix(metadata-protocol,rest,runtime)!: a name only disabled packages hold answers 404 at _env, and its package-less customization is withheld (ADR-0150 D3, D4) #33995's CONTROL pins.
  2. Declare the FROM→TO (409→404 is refusal→refusal, so Clause-②: no).

Prior rulings read: ADR-0150 D3, and the #33385 ruling PR #33995 implements. Open PR #34169 (layered reads) touches the same face. That PR must merge first.

Dedupe

I searched "_env draft 409 disabled" and "layered _env"; the only hits were #33385 and #34169's card #32849.

Activity

  1. added
    bug
    pm:queue
    domain:server
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:package · domain:server · Bug · p2 · pm:queue · size S; rationale: for a name that only disabled packages hold, the plain _env read answers 404, but the draft and layered reads still answer 409 and name the disabled package. Under the maintainer's rule that a disabled package must vanish everywhere (topic #36229), naming it is a visible inconsistency on the same address, so p3 → p2, beside the topic's other door cards. Graded, not chased. Audit restatement, tier 3. Recorded 2026-11-27T09:18Z.

  3. added
    priority:p2
    and removed on Nov 27, 2026
  4. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE

    Claim: PM loop round 1
    Session: session_01ADHkmRar3Kkg6SpwVgaaVE
    Account: os-steve
    Branch: claude/issue-34261-env-draft-layered-404
    Worktree: objectstack-issue-34261
    Domain: domain:server
    Seat: repo:objectstack#3
    Area: o3-P
    File surface: packages/rest/src/meta-qualified-item-route.ts (+ meta-qualified-item-route.test.ts), packages/runtime/src/domains/meta.ts (+ meta-qualified-item-read.test.ts), .changeset/34261-*.md (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier at 48da7161: "no path-derived mandate", floor/default per card; the draft-leak guard is a design judgment ⇒ default), effort: high (reason: S, but moving the admitted draft and layered reads onto the plain read's 404 must not leak an enabled package's draft or stored row, a guard the dev has to measure on both transports)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: platform code, objectstack (admitEnvironmentAddress in packages/rest and packages/runtime) | none — PR #33995 moved the plain _env read only | a builder who opens the draft, preview or layered view of a name only disabled packages hold; reachable today
    Thread-read: 7214526765
    Premise: holds (read-only measure on origin/main 48da716: REST meta-qualified-item-route.ts readsAsJudged :161-166 returns false for ?layers=true and for an admitted draft/preview, so admitEnvironmentAddress :88-107 keeps the 409; runtime domains/meta.ts :2289-2290 passes judged only when !isDraftRead && !previewDrafts && !wantsMetaItemLayers. Narrowed: the draft/preview 409 reaches only a caller mayReadPendingDrafts admits; a non-admitted caller already reads 404. Probe NOT MEASURED: no installed deps in the reader container)
    Pre-claim lane: domain:server — the fix lands in packages/rest/src/ and packages/runtime/src/domains/ (server family)
    Pre-claim deps: #34169 (the card's "must merge first") merged 2026-11-16; check-handover.mjs --inflight clear on the surface; seat 1's #38542 claims packages/rest/src/ but its PR #38585 touches none of these files
    Prior rulings read: ADR-0150 dated note (#37499, 2026-11-26, docs/adr/0150-…md ~:236), verbatim: "Three reads at _env still answer 409 at this head (?state=draft, ?preview=draft, ?layers=true), and card #34261 carries their move to 404."; maintainer principle quoted there: 「我觉得停用就该全部消失」; check-prior-rulings.mjs --card 34261 — 0 ruling comments on the card thread
    Fold-or-serial: not folded — #37915 (in flight, history slot in packages/metadata-protocol) and #34217 (objectql base) are other mechanisms and files; the zone's other _env / bare-door cards (#34452 group, #34348) are with the seat for card threads
    Serial constraints cleared: #38542 (claim 7256078743, dir packages/rest/src/; PR #38585 touches none of these files) — file-level, no overlap; overlap-check.mjs runs before every push

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE
    os-dev-report

    {
      "issue": 34261,
      "status": "done",
      "branch": "claude/issue-34261-env-draft-layered-404",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38633",
      "session": "session_01ADHkmRar3Kkg6SpwVgaaVE",
      "premise_still_valid": true,
      "summary": "For a name only disabled packages hold, `_env?state=draft` now answers 404 NO_DRAFT, and `_env?preview=draft` and `_env?layers=true` answer 404 RESOURCE_NOT_FOUND, naming no package. This holds on RestServer (packages/rest/src/meta-qualified-item-route.ts) and on the runtime dispatcher (packages/runtime/src/domains/meta.ts). Measurement changed the suggested route. With a draft-reading engine double, the bare ?state=draft and ?preview=draft reads serve an enabled package's stored draft that the plain read withholds, so judging the draft arms by the plain read alone would serve that draft at `_env`; that ablation reds 20/20 types on both transports. So admitEnvironmentAddress now swallows the marked refusal only when the plain read AND the answered draft read withhold the name (a NO_DRAFT throw counts as withheld). Over an enabled package's stored draft the 409 stands. The layered view is judged by the plain read, because its chain step 1b withholds every layer whenever the plain read withholds a disabled holder's item. #33995's CONTROL is replaced by a flip pin and a guard CONTROL, per type over 20 types and on both transports. File surface breach, mechanical: scripts/engine-double-contract.pinned.json gains 2 add-only rows written by `check-engine-double-contract.mjs --write`, needed because the new findOne doubles route through assertEngineFindOnePredicate.",
      "tests": "final head e24d418ae: `pnpm --filter @objectstack/rest test`: Test Files 441 passed (441), Tests 9073 passed | 351 skipped. `pnpm --filter @objectstack/runtime test`: Test Files 656 passed (656), Tests 12521 passed | 25 skipped. Touched files: rest meta-qualified-item-route.test.ts 437/437; runtime meta-qualified-item-read.test.ts plus meta-draft-read-builder-gate.test.ts 456/456. At 5a82d3c3 the runtime suite was 1 failed (the [#20338] draft-switch census saw `read.state === 'draft'` and `switches.previewDrafts` in the judge); fixed so the judge re-derives no switch, then green. Ablations, each restored with git checkout HEAD: draft-arm judge removed at final head: REST 20 failed of 437, runtime 20 failed of 443, all the stored-draft guard pin, with the gamma draft served in the assertion body. Base source 7213177e: REST 40 failed of 437, runtime 40 failed of 443 (the flip pin plus the guard pin's layered leg).",
      "gates": "local: dispatch-gates --commands at e24d418ae, 83 families: 82 exit 0, captured before any pipe. check:engine-double-contract was exit 1 at the first head (findOne doubles not routed through the predicate, then an unrecorded pinned row) and is exit 0 after the fix. NOT MEASURED: `node scripts/check-plugin-teardown-shape.mjs --self-test` exit 3, because its pinned commit 621a4876 is unreachable even after `git fetch --deepen=1500`; CI runs it. `dispatch-gates --ran`: 83 derived, 83 run, 0 UNRUN. typecheck rest+runtime exit 0. overlap-check: VERDICT clean (origin/main; #38497 shares the pinned ledger file and merges cleanly). The first overlap run before the second push answered cannot-answer exit 3 (shallow), and the rerun after deepening was clean. CI check-runs: NOT MEASURED at report time, reason: PR just opened, and CI convergence is the PM's.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3 — REST writes through the fleet-write relay: POST /repos/objectstack-ai/objectstack/pulls and POST /repos/objectstack-ai/objectstack/issues/38633/assignees (one pr_create action, request fw-20261129T164823Z-ab04f4); POST /repos/objectstack-ai/objectstack/issues/34261/comments (this report, post-stamped). Not counted: git push x3 (the branch probe, then 5a82d3c3 and e24d418ae), which are git rather than REST.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: docs/adr owner (Tier H, outside this card's surface) · ADR-0150's 2026-11-26 note says 'Three reads at `_env` still answer `409` at this head (`?state=draft`, `?preview=draft`, `?layers=true`), and card #34261 carries their move to `404`.' This PR makes that stale. Proposed replacement: 'At `_env`, `?state=draft` answers `404 NO_DRAFT` and `?preview=draft` and `?layers=true` answer `404`, each judged by the read the caller is answered; an enabled package's stored draft that the plain read does not see keeps the `409` for the draft reads (#34261).' · noted, not filed",
        "carrier: none · the 409 that remains over an enabled package's stored draft names the disabled registry holder as its candidate, not the enabled package that holds the draft. This is the same S4 loose end the plain `_env` unhydrated-row CONTROL already pins. Unchanged here, noted in the PR's Acceptance notes"
      ]
    }
  7. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE

    Landed: PR #38633 merged as f3028c5eb0f4f66cc4bce77fc42666b954fdd0f7; Fixes #34261 closed this card. pm:dispatched removed in this stroke. The stale ADR-0150 2026-11-26 note sentence rides the weekly ADR revisions card #38438 as a carrier: row.

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

Metadata

Metadata

Assignees

Labels

area:packagebugdomain:serverpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions