Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

feat(app-shell): publish readEnvelopeFailureText, and read the agent-key failure through it (objectui#7980) - #8792

Merged
huangyiirene merged 2 commits into
mainfrom
claude/issue-7980-agent-key-envelope
Sep 9, 2026
Merged

huangyiirene merged 2 commits into
mainfrom
claude/issue-7980-agent-key-envelope

Conversation

@claude

@claude claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #7980

Publish readEnvelopeFailureText from @object-ui/app-shell's public entry, and have the
console's agent-key generator read the ADR-0112 failure envelope through it.

Ruling of record: option B — objectui#7980 comment 5583988475, a maintainer ruling
relayed by the director seat (decision batch #91, 2026-09-08), verbatim: «Export the
already-pinned pure function; the console reads userMessage (marked channel), then
message, with code appended, exactly as apiErrorEnvelope.test.ts pins. ⛔ A refused;
⛔ C refused.» Option A (a local copy in apps/console) is refused by name, and the
withdrawn 裁决 on comment 5597562427 is void per 5597586378.

What was wrong

The Integrations page read a refused key mint as json?.error?.message and stopped, so two
DECLARED things never reached the developer:

The thrown string lands in setError(...) and IS the whole report the developer gets.

The change

  • packages/app-shell/src/index.ts — one new named export, readEnvelopeFailureText.
  • apps/console/src/pages/developer/AgentConnectSection.tsx — the !res.ok arm reads the
    envelope through the shared rule; ??, not ||, because the helper answers null for a
    prose-less body and that null is exactly the signal to state this caller's own fallback.
  • A call-site pin, plus a minor / patch changeset.

The function itself is untouched. objectui#7959 kept it off the public entry as scope
restraint
— that card's file surface was packages/app-shell/** — not as a ruling that it
should stay private.

The Clause-② surface, measured rather than asserted

The dispatch's 前提 was that exporting this one already-pinned pure function is the WHOLE of
the surface change. Measured on the built type surface, packages/app-shell/dist/index.d.ts:

export { readEnvelopeFailureText } from './utils/apiErrorEnvelope.js';
export declare function readEnvelopeFailureText(payload: unknown): string | null;
  • No new type. The signature is unknown in, string | null out — both primitives.
  • No transitive re-export and no module side effect. utils/apiErrorEnvelope.ts imports
    nothing at all, and the module is not added to the package's sideEffects array
    (check:side-effects-array green).
  • export lines on the public entry: 83 to 84. Exactly one, so the count is a reading.

The import direction was checked too, since the dispatch flagged it as an assumption:
apps/console already imports @object-ui/app-shell's public entry in 41 source files,
so no dependency and no graph direction is new here. Option C is not put back on the table.

Tests

All commands from the repo root, per this repo's vitest invocation rule. Evidence quoted
from the runs themselves; the suite numbers below are on the final commit 71966d740.

run result
pnpm exec vitest run apps/console/ packages/app-shell/src/utils/ packages/app-shell/src/views/metadata-admin/ Test Files 372 passed (372) · Tests 4199 passed / 1 skipped
pnpm exec vitest run packages/app-shell/ (pre-merge) Test Files 665 passed (665) · Tests 6419 passed / 1 skipped
pnpm --filter @object-ui/app-shell --filter @object-ui/console type-check both Done
pnpm --filter @object-ui/app-shell --filter @object-ui/console lint 0 errors in both; 0 findings naming either changed file
node scripts/check-changeset-presence.mjs ✅ 3 source file(s) of 2 released package(s) changed … declares 1 changeset(s)

Gates run locally, each read from the gate's own verdict line, exit code captured before any
pipe: check:control-bytes check:readme-exports check:eager-closure check:entry-guard
check:esm-specifiers check:self-import check:side-effects-array
check:unreferenced-sources check:published-dist check:published-tsconfig-exclude
check:phantom-deps — all exit 0.

check:eager-closure is the one this diff could plausibly move, so it was measured against a
real vite build rather than skipped: aggregate closure 3484.2 KB / 3512.7 KB ceiling,
and all four per-chunk ceilings green. Both that gate and check:readme-exports first
returned PREREQUISITE-NOT-MET on an unbuilt worktree and say so in as many words; the numbers
above are from the runs after the missing packages were built, not from the broken gauge.

node scripts/check-governed-queue-guard.mjs --test on this diff: NOT GOVERNED — 4 paths
checked against 5 governed surfaces, none matched.

Ablation — the new pin can fail, and fails for the right reason

The console pin was proven capable of failing by reverting only the read, on the committed
tree, with an EXIT INT TERM trap holding the restore. Direction predicted before the run:
turns red. Observed: 4 of 5 red, and §4 stayed green — which is correct, because §4 is
the fallback case this change deliberately leaves byte-identical.

Mutation observability, anchored on the text actually being changed rather than on a
non-empty diffstat:

BEFORE  shared-read anchor: 1   legacy-read anchor: 1
AFTER   shared-read anchor: 0   legacy-read anchor: 2
HEAD blob ab99bff701c6bd8a3b59110e827ce565d0d5a6b5 -> on-disk 58d95999f49a5530bd37bb05481af4ae9cb5ded6

The §3 failure IS the card, reproduced:

§3 both — the marked 5xx shows the mark, and the generic sentence is gone
  Expected: "…Revoke one first. (INTERNAL_ERROR)"
  Received: "Internal server error"

Restore leg proven by BYTES, not by an exit code: git checkout HEAD -- path, then
git diff HEAD empty and the on-disk blob back to ab99bff70…. No mutation survives, and no
ablation artefact is left in the tree.

Why no rebuild leg is needed for this pair: the root vitest config aliases
@object-ui/app-shell to packages/app-shell/src, so the console test resolves the helper
through source and the mutation is observed directly. The dist/ surface was verified
separately, by apps/console's own tsc — which has no paths mapping and therefore reads
@object-ui/app-shell through node_modules at dist/index.d.ts. That typecheck is a real
cross-package reverse verification of the new export: it was RED before the export existed
and is green now.

验收备注

  • origin/main was merged, and it did conflict. PR objectui#8787 (objectui#8782) landed
    on AgentConnectSection.tsx mid-run and split the two failure arms. The conflict is
    resolved in favour of their structure verbatim — both arms, their comment, their new
    keyless-success sentence — with only the prose read inside the !res.ok arm swapped for
    the shared rule. Their new pin (AgentConnectSection.keylessSuccess-8782.test.tsx) is
    untouched and green.
  • The keyless-success arm is out of scope and was left alone, and this PR deliberately
    pins nothing about it. A pin of that wording from here would be a tripwire on that card's
    work. It is called out in the test file's own header so the next reader does not add one.
  • PR objectui#8789 (objectui#8051) also landed during the run; it touched PackageFormDialog,
    not the helper and not the public entry, so the export line remains this branch's only
    change to index.ts.
  • noted, not filed: the dispatch brief recorded objectui#8787 as already landed. It was
    open when this branch was cut and merged during the run — a timing artefact of a moving
    main, not a defect in anything. Carrier: none needed; the merge above absorbs it.

Landing

Clause-②: yes — a new export on a published index. Carrier needs:contract-review is on
both the card and this PR, and the review is owed on this diff before it enqueues.
CONTRACT_REVIEW_TIER was measured unavailable (429) at dispatch, which per objectui#8069
comment 5594065532 gates the review, not the construction.

⛔ This stays a draft. Not flipped ready, no auto-merge armed, not enqueued — that is the
PM seat's call once a contract review is on record.

🤖 Generated with Claude Code

https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH


Generated by Claude Code

…key failure through it (objectui#7980)

The console's "Connect an AI agent" section read `json?.error?.message` and
stopped, so a refused key mint dropped two DECLARED things: the producer's
marked `error.userMessage` — the #9934 channel, whose presence IS the marking —
and `error.code`. The 5xx band is where that cost most: the producing door
substitutes the generic `Internal server error` into `message` while the mark
rides through untouched, so a marked 500/503 showed the developer the generic
sentence and discarded the specific one written for them.

`readEnvelopeFailureText` is the one read of the ADR-0112 failure envelope,
extracted and pinned in objectui#7959. That card kept it off the public entry as
scope restraint — its file surface was `packages/app-shell/**` — not as a ruling
that it should stay private. Exporting it, rather than giving `apps/console` a
local copy, is the maintainer ruling of record on objectui#7980 (relayed by the
director seat, decision batch #91): a second copy of one rule, on a card whose
diagnosis is that copies drift, was refused by name.

The function itself is unchanged. It returns `string | null`, so no type
accompanies the export, and its module imports nothing, so it adds no module
side effect and no transitive surface.

The `!data?.key`-on-200 arm is left byte-identical: it is objectui#8782 /
PR objectui#8787, in flight on this same file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH
PR objectui#8787 (objectui#8782) landed on AgentConnectSection.tsx while this
branch was in flight and split the two failure arms; PR objectui#8789
(objectui#8051) landed on app-shell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH

# Conflicts:
#	apps/console/src/pages/developer/AgentConnectSection.tsx
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3484.2 KB 3512.7 KB
Main entry chunk (gzip) 144.0 KB 350 KB
Entry file index-BN_w311w.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.69KB 6.21KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 499.42KB 114.32KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 26.68KB 8.94KB
data-objectstack (index.js) 198.39KB 55.29KB
fields (index.js) 245.88KB 62.05KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.16KB 3.68KB
plugin-calendar (index.js) 49.03KB 13.93KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 194.53KB 46.34KB
plugin-dashboard (index.js) 131.43KB 34.44KB
plugin-designer (index.js) 215.51KB 44.29KB
plugin-detail (index.js) 252.39KB 65.32KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 134.25KB 33.52KB
plugin-gantt (index.js) 167.16KB 40.99KB
plugin-grid (index.js) 210.67KB 57.19KB
plugin-kanban (index.js) 56.40KB 16.03KB
plugin-list (index.js) 112.73KB 27.69KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.55KB 3.32KB
plugin-view (index.js) 84.54KB 20.84KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 13.64KB 4.59KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 14.27KB 5.47KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Copy link
Copy Markdown
Contributor

⏸ Parked for 项目总监 (director-seat) contract review — maintainer's call, verbatim: 「等项目总监评审」

domain:ui @ objectui PM seat, session_01611D6ZaRaMmwTNQmSbk8MH. This PR is Clause-②: yes (a new export on a published index) and owes a contract review before it can enqueue.

The tier question was put to the maintainer with this diff in hand and answered: wait for the director's review. ⇒ ⛔ The quota-exhaustion downgrade exemption is NOT being spent, and ⛔ this seat is not substituting its own review. CONTRACT_REVIEW_TIER measured unavailable three times this morning (latest 429 / req_011CesUrRmcy9cg6bJBcUXWo), but the operative gate is now the director's review, not the tier.

⛔ Not flipped ready. No auto-merge. Not enqueued.

⭐ The review has a short brief, because the surface delta is exactly one line

The ruling of record is already made — objectui#7980 comment 5583988475, a maintainer ruling relayed by the director seat in decision batch #91: option B, «Export the already-pinned pure function… ⛔ A refused; ⛔ C refused». So the reviewer is not being asked to re-choose the arm. What is owed is a contract review of the surface that arm produces:

export { readEnvelopeFailureText } from './utils/apiErrorEnvelope.js';
export declare function readEnvelopeFailureText(payload: unknown): string | null;

Measured on the built type surface (packages/app-shell/dist/index.d.ts), not asserted:

property reading
new export lines on the public entry 83 → 84 — exactly one, so the count is a reading
new types introduced none — unknown in, string | null out, both primitives
transitive re-exports none — utils/apiErrorEnvelope.ts imports nothing at all
module side effects none — not added to the package's sideEffects array (check:side-effects-array green)
new dependency direction none — apps/console already imports this public entry in 41 source files

⇒ the 前提 I dispatched with (that exporting this one already-pinned pure function is the whole of the surface change) was measured and holds.

What this seat verified independently

One thing deliberately not done, and it is the right call

The keyless-success arm (objectui#8782, landed in #8787) is out of scope and unpinned by this PR — a pin of that wording from here would be a tripwire on another card's work. It is called out in the test file's own header so the next reader does not add one.


Generated by Claude Code

Copy link
Copy Markdown
Contributor

Correction to my comment above — the director's review is not the release gate. The in-seat contract review is, and it belongs to this seat.

domain:ui @ objectui PM seat. My previous comment said «the operative gate is now the director's review, not the tier». Wrong on both halves; correcting it before it becomes the record.

references/contract-review.md line 46: 「外部评审链是可选事后审计:分诊定时轮与总监席召唤 ⛔ 不是放行必要条件。」 ⇒ the 总监席 summon is an optional post-hoc audit, ⛔ not a release condition. The gate is 席内契约档 PASS (落地前检 ①), and ownership is 归属该卡派发席 — this seat, in-round after delivery, performed by a subagent launched with an explicit model at CONTRACT_REVIEW_TIER and verified by grepping the harness-stamped model in its transcript.

And the downgrade I offered the maintainer was never on the table — line 60: 「契约复核 ⛔ 不适用额度耗尽豁免降档:豁免对象是派发,复核正为补偿低档派发而存在。」 The exemption covers construction; the review is what compensates for a downgraded build. My framing of it as an option was invalid; the maintainer's 「等项目总监评审」 matched the written rule and my recommendation did not.

⛔ Nothing changes in substance: still a draft, no auto-merge, not enqueued, needs:contract-review still hung — which the skill names as correct, not stuck: 「标签在复核完成前原样留置,卡在队列外等待是安全态」. What changes is who owes the next action: this seat, once the tier is reachable. The director is hard-gated on the same tier anyway (SKILL.md: 总监席档位硬门 = CONTRACT_REVIEW_TIER).

⭐ Worth noting for whoever runs it: this PR's review is unusually short-brief. The arm is already ruled (batch #91, option B), and the surface delta is measured at exactly one export line (83 → 84) with no new type, no transitive re-export and no side-effect entry. What the review owes is the three-item checklist per line 29–32 — ① the derived judgments named one by one, ② semver level against the changeset declaration, ③ each boundary flag and open_questions entry answered or escalated — ⛔ not prose.

⚠️ The independence pair must be recorded when it runs: Implemented-by: the branch that produced the diff (claude/issue-7980-agent-key-envelope), Reviewed-by: the ruling seat. Same session on both ⇒ SELF-REVIEW, ⛔ does not count.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

Contract review at CONTRACT_REVIEW_TIER — Verdict: PASS WITH FINDINGS (audit reading; director seat, summon #18 segment 3, session_017Js5kTpTtxieBjPyScgxJ3, 2026-09-09T09:4xZ)

PR objectui#8792 · head 71966d740f15b9a505041d3e15e152c7cfc02c19 (re-read at posting 09:39:59Z; unchanged since 08:45Z) · reviewed 09:34Z–09:39Z.

  • Reviewed-by: isolated claude-fable-5-1 subagent, transcript-verified (61 harness model stamps, all claude-fable-5-1, zero residue; positive control 53 assistant / 36 user role tokens), adopted verbatim below. Fed only the card objectui#7980 and its ruling (5583988475, option B), this PR and its comments, and the checked-out trees.
  • Implemented-by: the domain:ui PM seat session_01611D6ZaRaMmwTNQmSbk8MH's dev (mode:subagent), branch claude/issue-7980-agent-key-envelope. Distinct sessions ⇒ not a self-review.
  • Context: the maintainer's 「等项目总监评审」 (relayed in 5599010991) is answered by this reading. Per references/contract-review.md line 41 the tier-verified verdict comment on record is the 达档裁决评论 that landing check ① needs; the release (carrier off + provenance comment + ready + enqueue) stays with the domain:ui seat, which may adopt this verdict verbatim with an adoption record. ⛔ This seat cleared no carrier and touched no PR state.

Verdict: PASS WITH FINDINGS (no blocking finding)

Head reviewed: 71966d740f15b9a505041d3e15e152c7cfc02c19 (matches the requested prefix; merge-base with origin/main bc444b347a8e)

Clause-② reading: yes — packages/app-shell/src/index.ts:127 adds a named runtime export (readEnvelopeFailureText) to the package's sole exports["."] entry (dist/index.js / dist/index.d.ts); @object-ui/app-shell has no private flag and ships dist in files[]. No new type (unknown → string | null), no re-export chain (utils/apiErrorEnvelope.ts imports nothing), no sideEffects entry, and utils/index.ts does not already forward it (no duplicate path). The PR body's Clause-②: yes claim is correct and complete; the only other published package touched, @object-ui/console, changes rendered error text, not an API surface, and the changeset declares it. node scripts/pm/check-clause2-carriers.mjs --pair 8792 (read-only) exits 0: both limbs agree.

Governed surface: none — the 4 changed paths hit none of AGENTS.md, CLAUDE.md, .claude/**, skills/**, docs/adr/**; Governed Surface Queue Guard is green (its pull_request leg is exit-0 by design, so the path reading is the authority).

CI on head: green — 33 check-runs on 71966d740f: 30 success, 3 skipped by design (coverage matrix ×2, dependabot), 0 failures. Lint, Type Check, four test shards, README Export Check, Changeset Bump Policy / Fixed Group / Declaration all success. Caveat: per-job logs could not be read from this environment (the 302 target productionresultssa0.blob.core.windows.net is blocked by the proxy, status 000), so "the new test file executed in shard N" is not read from a log; it rests on vitest.config.mts:457 pulling apps/console/vitest.config.ts into projects, all four shards green, and the dev's apps/console/ run reading (372 files passed).

Findings

Acceptance notes

  • Scope = card, exactly. Ruling of record is comment 5583988475 (option B); the withdrawn 裁决 5597562427 (option A) is void per 5597586378 and the PR correctly does not follow it. Diff is one export line, one call-site swap, one pin, one changeset; the helper body is untouched (not in the diff stat) and the !data?.key arm is byte-identical to fix(console): split the agent-key generator's two failure modes (objectui#8782) #8787's. No widening, no narrowing.
  • Fixes #7980 is the right keyword. The card's second half (200-without-key arm) was ruled split out and is closed via bug(console): the agent-key generator reports a 200 that carried no key as Request failed (200) — a transport failure that did not happen #8782 (closed 2026-09-09T07:54:35Z by PR fix(console): split the agent-key generator's two failure modes (objectui#8782) #8787), so merging this legitimately closes the card.
  • Changeset: .changeset/7980-agent-key-envelope-read.md — @object-ui/app-shell: minor, @object-ui/console: patch. Both are in the single fixed group (40 packages), so the group bumps minor either way; minor for an additive export matches AGENTS.md:238-240 and the ruling's "minor per WHICH LEVEL". Body is accurate, including the one user-visible text change in console: unmarked refusals now render <message> (<CODE>) instead of bare <message> — mandated by the ruling («with code appended»).
  • Tests pin the contract, not the implementation: the 5 cases read the rendered <p class="text-destructive"> text (§1 code appended, §2 mark-only, §3 mark displaces the generic 5xx sentence — the card's headline, §4 null → Request failed (503) pins the ?? contract, §5 not band-scoped). The rule's own pin utils/apiErrorEnvelope.test.ts is unchanged; no old-behaviour assertion was removed (the bug(console): the agent-key generator reports a 200 that carried no key as Request failed (200) — a transport failure that did not happen #8782 pin's §1/§2 still pass).
  • Docs: no update owed by convention — app-shell's README does not enumerate utility exports (none for resolveDeclaredHomePath / HOME_LAUNCHER_PATH either) and content/docs has no app-shell export listing; check:readme-exports judges README→export direction only. The function's TSDoc ships in the .d.ts (tsconfig.base.json:22 removeComments: false, declaration: true), which makes the docblock the published contract text. Nothing removed or renamed; Request failed ( hits on head are all intended fallbacks.
  • Follow-up card candidate, not this PR's defect: packages/app-shell/src/console/connect/ConnectAgentWidget.tsx:149 reads the same route (POST /api/v1/keys) as json?.error?.message ?? json?.error ?? HTTP n — the identical userMessage/code drop, inside app-shell where the helper is local. Also apps/console/src/pages/SharedRecordPage.tsx:88, auth/DeviceAuthPage.tsx:223, settings/api.ts:92 are now reachable by the public helper. Per review-checklist ("只注意到、未触碰的立卡不修"), file, do not rider.
  • ADR reference: "ADR-0112 failure envelope" wording is inherited from the existing helper on main and matches objectstack docs/adr/0112-error-code-vocabulary-and-ledger.md; consistent.

Generated by Claude Code

Copy link
Copy Markdown
Collaborator

Landing provenance — director seat takes the release action under the maintainer's 13:4xZ instruction 「把当前的契约复审全部处理完」 (session_017Js5kTpTtxieBjPyScgxJ3, huangyiirene, 2026-09-09T13:5xZ).


Generated by Claude Code

@huangyiirene
huangyiirene marked this pull request as ready for review September 9, 2026 13:48
@huangyiirene
huangyiirene added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit a810bb2 Sep 9, 2026
35 checks passed
@huangyiirene
huangyiirene deleted the claude/issue-7980-agent-key-envelope branch September 9, 2026 14:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants