Skip to content

approvals: the approval e-mail link ${publicBaseUrl}/system/approvals?request=… may miss the /_console mount that os serve serves the Console under (premise first) #34862

Closed

Description

@objectstack-fleet

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

Finding from L1-d's review of PR #34847 (#34729), verdict 6950295328, N4. It is outside that PR. It was read from source only and not measured, so premise first. A seat-filed card: grading and domain:* belong to triage.

Suggested-grade: p2 · domain:server · size S (p1 if the premise holds, since the approval e-mail's only link would 404)
Dedupe words: approval email link _console, approvalUrl publicBaseUrl

What may happen

packages/plugins/plugin-approvals/src/approval-service.ts:2428 builds the approval e-mail's link (#30509) as ${publicBaseUrl}/system/approvals?request=<id>. os serve mounts the Console under /_console/ (packages/cli/src/utils/console-route-ledger.ts). If nothing at the site root forwards /system/approvals to the Console, an approver who clicks the e-mail lands on a page that is not the Console, so the request never opens.

Premise first

On an os serve boot with e-mail captured, trigger approval.requested, open the approvalUrl from the e-mail, and record where it lands. Also check a deployment that serves the Console at /, so a fix does not break one to fix the other. If it lands on the request in both, close the card with the reading.

Expected

The e-mail link opens the request in the Console on every supported mount, using one source of truth for the Console's base path.

Activity

  1. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    First touch (R1197, 14:5xZ): p2 · domain:server → pm:queue.

    Theme: epic #34571, which covers approvals and notifications (in focus). Check the premise first. If the approval e-mail's only link 404s under os serve, raise the card to p1 in the claim comment. If the premise fails, close the card with the evidence.

  2. added
    domain:server
    pm:queue
    priority:p2
    area:workflow
    on Nov 17, 2026
  3. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Ruling-ref: maintainer 2026-11-21T22:1xZ, verbatim: 「5张都升级」, on triage's second non-topic p1 pass (standard ruled 「同意」 earlier today: this week, or someone loses).

    2026-11-21T22:19Z · p2 → p1 on the maintainer's word: a common function that may break for every approver: the approval e-mail's only link may 404 when the console is mounted under a sub-path. Verify the premise first; if it does not hold, say so here and the card goes back to p2. Lane and state unchanged.

  4. added
    priority:p1
    and removed
    priority:p2
    on Nov 21, 2026
  5. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

    Claim: PM loop · area a4-B · 2026-11-22T02:29Z · on seat 4's release of this card to area a4-B (order seat4/area-a4-B.md, section "Re-opened · new p1 batch") · premise first
    Session: session_01FEkQ5pb2t8Z8C64PkPyVt1
    Account: os-project-manager
    Branch: claude/area-a4B-34862
    Worktree: objectstack-issue-34862
    Domain: domain:server
    Seat: repo:objectstack#4
    Area: a4-B
    Pre-claim lane: packages/plugins/plugin-approvals/** is domain:server; seat repo:objectstack#4 released this card to a4-B.
    Pre-claim deps: no Blocked-by: line; no open PR names this card.
    Prior rulings read: publicbaseurl,system,approvals,request,approval,e-mail,link,miss,_console,mount,serve,serves,console,premise,first → 204 ADR candidates, none ruling the Console's mount path in outbound links; thread: none (7070104892 is a grade change: p1 on the maintainer's word, back to p2 if the premise fails); repo: objectstack-ai/objectstack
    File surface (only if the premise holds): packages/plugins/plugin-approvals/src/approval-service.ts (the actionUrl built at ~:2551-2555), packages/plugins/plugin-approvals/src/action-link-pages.ts (:118, the same /system/approvals href), the one source of truth for the Console base path the dev names before editing, their tests, one .changeset/34862-*.md. Stop on breach.
    Container & model: S, mode:subagent, model: default tier (opus; dispatch-gates --tier: no path-derived mandate), effort: high (seat order)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: plugin-approvals e-mail link in objectstack (/system/approvals?request=… built against publicBaseUrl while os serve mounts the Console under /_console/); platform path covering it: unknown until measured (the route ledger says os serve redirects the site root to /_console/; whether /system/approvals is forwarded is the premise); reach: every approver opening the approval e-mail.
    Thread-read: 7070104892
    Premise: NOT yet measured. The dev measures on a real os serve boot with e-mail captured, and on a deployment that serves the Console at /. If the link lands on the request in both, the card closes with the reading and the grade goes back per 7070104892.
    Serial constraints cleared: no open PR names this card; the dev runs overlap-check before any push. Clause-② no is the expectation; the dev re-declares it from the diff.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1
    os-dev-report

    {
      "issue": 34862,
      "status": "done",
      "branch": "claude/area-a4B-34862",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36247",
      "session": "session_01FEkQ5pb2t8Z8C64PkPyVt1",
      "premise_still_valid": true,
      "head": "6979716525",
      "measured_hops": {
        "before": "real os dev (serve --dev) boot of the showcase on :38617, OS_BASE_URL set, SMTP to a local sink, Console built. Retitling the 'Q3 field-ops rollout' announcement opened showcase_dynamic_approval; the captured e-mail said 'Open the approval: http://localhost:38617/system/approvals?request=areq_d3e65840-...'. GET anonymous: 404 application/json ENDPOINT_NOT_FOUND, no Location. Signed in with -L: 404, 0 redirects. Chromium: one navigation, 404, JSON page. Action page inbox href /system/approvals: 404. Control: /_console/system/approvals?request=... answered 200 text/html (base href /_console/) and Chromium opened the request.",
        "after": "same boot with plugin-approvals rebuilt: the e-mail said 'Open the approval: http://localhost:38617/_console/system/approvals?request=areq_9dac833e-...'. GET anonymous: 200 text/html. Signed in with -L: 200, 0 redirects. Chromium: 200, then the Console routed to /_console/apps/com.objectstack.setup/sys_approval_request/record/areq_9dac833e-..., which showed the request (Pending, Lead Review, Approve/Reject). GET /api/v1/approvals/act?token=not-a-token: inbox href http://localhost:38617/_console/system/approvals, which answered 200.",
        "root_mount": "NOT MEASURED on a real boot: no boot on this tree serves the Console at '/'. createConsoleStaticPlugin always mounts at CONSOLE_PATH '/_console', and os serve passes no uiBasePath to AuthPlugin. The platform setting for a root-mounted Console is AuthConfig.uiBasePath '/'. That case is pinned at the service with AuthManager.getConsolePageUrl's composition: the link stays BASE/system/approvals?request=ID."
      },
      "summary": "The premise holds: on the os serve /_console mount, the approval e-mail's link answered 404 ENDPOINT_NOT_FOUND, and so did the action-link result page's inbox link. Both links now take the Console's mount from the auth service's Console page composer (getConsoleUrl, which reads AuthConfig.uiBasePath, default /_console). That is the composer auth e-mails and the plugin-audit mention e-mail already use. The origin stays the approval links' publicBaseUrl, so the #30509 no-guess origin is unchanged. With uiBasePath '/' the link stays at the root. With no auth service the links are as before. Files outside the claim's named surface: approvals-plugin.ts (wiring) and public-base-url.ts plus its test (helper consolePageLink). ApprovalServiceOptions gains the optional getConsoleUrl. No new export, no spec change.",
      "files_changed": [
        "packages/plugins/plugin-approvals/src/public-base-url.ts",
        "packages/plugins/plugin-approvals/src/public-base-url.test.ts",
        "packages/plugins/plugin-approvals/src/approval-service.ts",
        "packages/plugins/plugin-approvals/src/approval-service.test.ts",
        "packages/plugins/plugin-approvals/src/approvals-plugin.ts",
        "packages/plugins/plugin-approvals/src/action-link-pages.ts",
        ".changeset/34862-approval-link-console-mount.md"
      ],
      "tests": "Under the verify lock: pnpm --filter @objectstack/plugin-approvals typecheck TYPECHECK_EXIT=0 (check:test-typecheck OK: 8 files / 321 errors held, debt not grown; the first run had grown it by 1 TS2339, fixed in 6979716525). pnpm --filter @objectstack/plugin-approvals test TEST_EXIT=0, Test Files 126 passed, Tests 1817 passed. Ablations went through scripts/ablation-replace.mjs (anchor x1 -> x0, blob changed, restore blob 1e946f96f358 = HEAD, git diff HEAD empty). The suite imports src relatively, so no dist is involved. Leg A drops the mount: the /_console e-mail pin and the action-page pin go red (2 failed / 2 passed). Leg B hard-codes /_console: the root pin, the action-page pin and the no-auth pin go red (3 failed / 1 passed). Lock VERDICT command-exit 0.",
      "gates": "Derived with dispatch-gates --commands --repo objectstack-ai/objectstack (tree 6979716525, 7 paths vs a5a5312ff): 75 families. 73 exit 0. 2 are NOT MEASURED, prerequisite exit 3: check-plugin-teardown-shape --self-test (shallow clone, its pinned control commit 621a4876 is unreachable) and check:dual-build-cjs-loads (PREREQUISITE NOT MET: no dist for unrelated packages like studio and client-react; this branch built only the showcase closure). --ran reconciliation: 75 derived, 75 run, 0 UNRUN. overlap-check before each push: VERDICT clean (origin/main and #36144/#36135 merge cleanly). PR check-runs at 6979716525: Build Core success; TypeScript Type Check and all 4 Type Check legs success; Lint (ESLint, repo & tooling, docs & code guards, PM dispatch-gates, CI/release/engine, tooling self-tests, slot lookup, query-options erasure) success; Check Changeset success; PR-body guards success; Dogfood Regression Gate success; Live E2E UI success; Test UI success; Test Core 9/10 shards success. Test Core (3/10) failure: in its log runtime tests passed (636 files), and the job failed at '##[error]Failed to CreateArtifact: Unable to make request: ECONNRESET', an artifact upload error in CI infrastructure unrelated to this diff, so a rerun is owed. Test Core aggregate: failure, from that shard.",
      "dogfood_battery": "n/a: no '!' in the PR title and Clause-② is no",
      "ablations": "2 legs, both red as predicted, restore proven by blob hash; see tests",
      "mcp_calls": "0",
      "api_writes": "2: pr_create through the fleet-write relay (POST /repos/objectstack-ai/objectstack/pulls, draft, no assignees, no labels; read-back identical 7766 bytes, #36247) and this os-dev-report comment through post-stamped (POST /repos/objectstack-ai/objectstack/issues/34862/comments). Also git push to claude/area-a4B-34862 (empty-branch probe plus 3 pushes).",
      "deviations": "One plain tsc --noEmit -p tsconfig.json on plugin-approvals ran outside the verify lock while I narrowed the TS2339 debt growth. The full typecheck was then rerun under the lock. The 75 check:* families ran unlocked, as allowed.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  8. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

    Claim revision · 2026-11-22T04:01Z · same session, same branch claude/area-a4B-34862, PR #36247 (dev report 7073910032). Premise measured and holds: on the os serve /_console mount both the e-mail link and the action page's inbox link answered 404 ENDPOINT_NOT_FOUND.
    File surface: as claim 7072940126, plus packages/plugins/plugin-approvals/src/approvals-plugin.ts (wires the auth service's Console page composer in), packages/plugins/plugin-approvals/src/public-base-url.ts and public-base-url.test.ts (the consolePageLink helper). The one source of truth for the Console base path is the auth service's getConsoleUrl (AuthConfig.uiBasePath, default /_console), which auth e-mails already use. Grade stays p1 (premise held, per 7070104892).

  9. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

    Landed · 2026-11-22T06:46Z: PR #36247 merged and its Fixes #34862 closed this card as completed.

    Reading Value
    PR #36247 MERGED (merge e100a37f64) at head 389fb46e21; L1 ACCEPT 7075223653 (L1-a), contract PASS 7075224205 (TIER_DEFAULT), landing record 7075266430
    Delivered The approval e-mail link and the action page's inbox link read the Console mount from the auth service, so under os serve's /_console mount they no longer 404. Clause-②: yes (widening): optional ApprovalServiceOptions.getConsoleUrl.

    State change: pm:dispatched removed in the same write; the grade, area and domain labels stay. The same 404 on the Slack DM link is #36301 (separate card, triage).

  10. removed
    pm:dispatched
    on Nov 22, 2026
  11. added a commit that references this issue on Nov 22, 2026
    e100a37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:workflowdomain:serverpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions