Skip to content

fix(deploy): make Deploy actually deploy a webapp artifact from the dashboard - #12832

Merged
iamwhatever merged 1 commit into
mainfrom
fix/artifact-deploy-direct-confirm
Sep 23, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/artifact-deploy-direct-confirm

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

1. What is the problem?

A user with a kind=webapp artifact could not deploy it from the dashboard at
all. Every button labelled "Deploy" sent them to a chat session, and the chat
sent them back to the button.

Three things had to be wrong at once:

Neither Deploy button deployed. The webapp artifact card and the Artifact
Deploy page's "Ready to deploy" row both set window.__mc_chat_launch and
navigated to /chat. A human standing on the confirm surface, already
cookie-authenticated, was handed to an agent instead of getting a deploy.

The agent could not deploy either. Its only tool is the MCP deploy_artifact,
which is preview-only by design: it writes a pending entry and returns.

The one button that executes a deploy was easy to never see. That is "Pending
confirmations -> Confirm Deploy" on /deploy, whose card renders nothing when the
list is empty. In the reported session
deploy_artifact was unavailable three times, so no entry was ever written: no
entry -> no card -> click Deploy -> chat -> "click Deploy on the Artifact Deploy
page" -> loop.

Underneath, the deploy endpoint refused a webapp slug outright, so no amount of
frontend work could have deployed one. A webapp artifact's content is an app
summary rather than deployable HTML, and the endpoint had no other way to reach
the app's built files.

Two further defects surfaced while fixing this, both reachable from the same
click. A successful deploy did not flip the artifact it deployed, because the
post-deploy write persisted only distribution_id while the card's "not deployed"
hero keys off deploy_target.public_url. And the deploy TTL defaulted to 72
hours, which requires auto-cleanup infrastructure that nothing in the setup guide
installed, so a first confirm reliably failed on a precondition whose remediation
command was the bare string install-reaper.sh, a command on nobody's PATH.

2. Why this issue matters to the user

Artifact Deploy's whole promise is a public link for something you already built.
For a webapp artifact the product could not deliver that by any route a user could
find. The dashboard's most explicit affordance pointed at a chat, the chat pointed
back at the dashboard, and the agent's own guidance named a sidebar entry and an
App Store install that do not exist, the page is at /deploy, reached from the
Artifacts page, and the deploy layer is part of core.

A user who pushed through to the one working button then met an AWS error naming
two CloudFormation stacks and a parameter, with no way forward offered.

3. How our fix solves it

Working from the symptom back to the cause.

The button now deploys. Both sites run the two-call flow PublishHub already
runs for html and widget artifacts: preview, the blocking public-by-link
acknowledgment, then a confirm bound to the previewed content digest and resolved
identity so a concurrent change is refused rather than silently published. One
hook (useDirectDeploy) and one dialogs component (DirectDeployFlow), shared by
the page row and the card, so the two surfaces cannot drift apart.

The endpoint can reach a webapp's files. A webapp slug resolves to its built
static root through a new resolve_webapp_public_dir, and that root travels the
existing local_dir route, which owns the staging snapshot, the symlink and
sensitive-path refusals, the size guard and the content scan. The root is required
to be app_dir/public: app_dir itself is deliberately not a fallback, because
publishing it whole would upload the app's sources and build config to a
world-readable CloudFront URL. That rule now lives in one function, which the
local preview channel delegates to as well.

The chat hand-off became the fallback, and says so. It is reached only when the
backend answers webapp_root_unavailable, the app has no built root to publish -
and the button then reads "Deploy via agent".

A deploy flips its own card. The post-deploy write now persists public_url,
profile, region and the lifecycle block beside distribution_id. Done
server-side, so the direct confirm and the pending confirm both inherit it;
previously the agent wrote those fields from chat, which is exactly why a
dashboard-initiated deploy had nobody to write them. Still best-effort: the deploy
has already happened, so a metadata write failure must not undo it.

The auto-cleanup precondition has a way forward. Expiry is chosen per deploy
and defaults to permanent, the only value that needs no infrastructure, so a first
deploy cannot fail this precondition. If someone does choose an expiring window
without it, the refusal offers deploying as permanent, re-running the same
previewed content at zero rather than starting over, or copying the exact install
command, now an absolute path resolved from the live skills directory. Setup step 4
documents the same install, resolved through the same helper, so the guide and the
error cannot print different commands.

The error text has one audience per field. Every refusal a human can reach by
clicking splits into error, a plain sentence saying what happened and what they
can do, and details, which keeps the stack, field and directory names behind a
Details toggle. remediation stays the runnable command; code is the machine
field the affordances key off, so wording stays free to change without turning the
buttons off. The MCP tool relays all three: sending only the banner sentence would
have taken ttl_hours=0 away from the one caller that needs it to retry.

The stale guidance is gone. The skill no longer claims to ship as an
installable app, its "sidebar -> Artifact Deploy" pointers name /deploy reached
from the Artifacts page, and both deploy_artifact return strings give the route.

4. What tests we did

821 backend tests pass across test/test_deploy_*.py, test_webapp_preview.py,
test_mcp_core.py and test_error_code_contract.py; 213 frontend tests across 13
files, covering the page, the hook, the card, the /deploy route and all eleven
locale style gates. npm run i18n:check is green on all 19 of its checks, the
per-chunk bundle-size gate passes, and flake8, isort, eslint and the CI
tsconfig.app.json typecheck are clean.

New coverage: the webapp deploy path including an assertion that only the built
public/ contents are published and the app's build config is not; every
webapp-root refusal; the reaper 409's machine code and absolute remediation; the
back-fill writing the fields the card reads, and a back-fill failure not failing
the deploy; that each banner sentence carries none of the seven jargon terms while
details keeps them; and the reaper affordance end to end, including that
"Deploy as permanent" re-confirms at ttl_hours=0 and that this path never hands
the user to a chat.

Existing tests changed, and why. Nine assertions in three frontend files asserted
the chat hand-off, that was the reported behaviour, so they now assert the deploy
request; one setup-command count moved 2 -> 3 for step 4. Six backend assertions
pinned the bare remediation literal or the pre-rename writeback helper. Five more
read the blended error text and now read details. One config assertion asserts the
payload's key set exactly, so a new field has to be declared on purpose rather
than arriving unnoticed, and reaperInstallScript is checked for the property
that matters: an absolute, runnable path. One fake-store helper passed Path("") where it meant "", which had been
exercising the containment branch rather than the empty-metadata one it was named
for.

Not verified locally: no real AWS deploy was performed. Every AWS boundary is
stubbed at engine.run_aws, so CloudFront and S3 behaviour is unchanged and
untested by this PR.

5. Any other suggestions on the work

Disposition: the First Principles review's product-shape item. That lane asks
for a recorded decision on putting the pre-existing deploy ingress (the Artifacts
page button, the card hero, the PublishHub public-web row) behind an
off-by-default Feature Preview, and it names its own clearing conditions: an RFC
covering that gating merged non-draft on the base branch, or a maintainer
override. Neither belongs in this pull request. An RFC is a base-branch document
about the product's default, reviewed on its own terms and not inside a bug fix,
and the override is a repository writer's call rather than the author's. The
gating itself is what makes this change safe to land at all: the flow it adds
publishes to a world-readable URL and spends money in the operator's own AWS
account, so shipping it on by default would be the larger decision, not the
smaller one. The default is stated in the flag's own documentation and shown in
the flag-off frame; if the reviewers or a maintainer want the surface on by
default, that is a one-line change to the flag and it should be made
deliberately, in the change that records the decision.

Disposition: the memory-recall button-row finding. GPT 5.6 blocks on
website/src/pages/chat/MemoryRecallStrip.tsx:34, a file this branch does not
touch and which is byte-identical to the base. The rule it cites grandfathers a
row the diff does not add to. Rebutted in a pull-request comment rather than
fixed here, because changing an untouched chat surface is the kind of rider the
First Principles lane objects to on this same head.

Two lines in this diff are not this change's work, disclosed rather than folded
in silently.

website/scripts/restyle-baseline.json loses one entry. The restyle ratchet
landed on the base at 18:29 and #12805 then removed two restyle sites from
MembersPage.tsx at 21:35 without recording the fall. The gate fails on a fall
as well as a rise, so it is red for every open pull request until someone records
it, and its own error message names the command. The line belongs to #12805; this
pull request only writes it down, and touches no file that gate measures.

Backend Tests shard 7 is red on the base for the same shape and this pull
request cannot clear it: the crew-log exc_info tripwire flags
crew_log/emit.py and crew_log/session_tree_projection.py, neither of which
this branch touches, and CI tests the merge ref so a rebase inherits them. Filed
as #13005, the second trip of the tripwire first reported in #12939.

Localisation. The Ready-to-deploy header row and the four error fallbacks in
useDirectDeploy rendered English in every locale. The header labels now live in
READY_COLUMN_KEY and resolve where the header renders, the same shape as
FILTER_LABEL_KEY in ChatSidebar, and the fallbacks resolve catalog keys.
Values reuse the repo's own existing translations wherever the same English string
is already in a catalog. "Artifact Deploy" is a product name, so it joins the
dnt array in src/i18n/glossary.json beside the thirteen other KiroCrew feature
names already there, which is what check-untranslated-values.mjs names as the
remedy for a value that is legitimately identical in every locale.

Bundle budget. The catalog chunk t went 651 B over its 905 KB ceiling. Cutting
2,963 source bytes of the new copy moved the built chunk only 194 B, so closing
the rest by prose would cost roughly 7 KB of source text, the whole new surface.
The prose cuts are kept on their own merit and the ceiling is raised by the
minimum whole kilobyte, to 906 KB, leaving 567 B of headroom. The measurement and
the ratio are recorded in the budget file's comment. Reverting only src/i18n/
and rebuilding makes the gate pass, so the growth is catalog strings alone and no
new dependency landed in that chunk.

Two things I deliberately left alone.

The local_dir and ttl_hours validation strings keep their parameter names.
They are API-contract errors that no click can reach, the UI composes
ttl_hours itself and the webapp path resolves its directory server-side, and
they are read by the MCP tool's LLM caller, which needs the parameter name to fix
its own call. Rewriting them would blur the contract for no human benefit.

The page defaults expiry to permanent rather than probing whether the auto-cleanup
stack exists. A probe costs two CloudFormation calls on every page load, and
permanent is the one choice that always works; picking an expiring window without
the stack now lands on an actionable refusal instead of a dead end.

Worth a separate look: why deploy_artifact reported unavailable three times in
the reported session. That looks like a runtime deferred-tool problem rather than
anything in the deploy layer, and it is out of scope here, but it is what turned
a discoverability problem into a total dead end for that user.

Fixes #12816

Pattern harvest

Rule candidate: semgrep -- an atomic claim followed by a narrow except.

Pattern: a handler that removes a work item from shared state to claim it, then
processes it inside try/except <SpecificError>. Any other exception escapes
with the claim already consumed, so the item is gone and the caller sees no
error. That is exactly this bug: the pending entry was popped to claim it, the
deploy raised something that was not an AWSError, and the row vanished with no
banner -- which is why the reported symptom was a button that silently did
nothing rather than a visible failure.

The shape a rule can match: within a function, a dict.pop / list.remove /
queue-claim on module or instance state, followed by a try whose handlers do
not include Exception and whose body has no finally or re-add on the failure
path. The fix is always the same -- put the item back before re-raising or
returning an error.

Two narrower observations from the same change, offered as review prompts rather
than rules, because both need judgment a matcher does not have:

  • A refusal surface rendered inside the narrowest cell of a table overflows the
    viewport. Caught here only by looking at a screenshot; no jsdom assertion sees
    layout. The harness added in this PR now measures the banner's right edge, so
    the regression fails a run instead of needing an eye.
  • A preview/confirm pair must send the resolved identity on BOTH calls. Sending
    it only on the preview lets the server re-resolve a default on confirm, so the
    operator previews one account and confirms against another.

Screenshot evidence

Captured with scripted Playwright against the real built SPA, every /api/** call
answered from fixtures, by the harness this PR adds at
website/scripts/capture-artifact-deploy-direct-confirm.mjs. The frames are
attached below rather than committed, which is what .gitignore pins for review
evidence.

Every captioned frame carries an assertion in the harness, and the run fails if
the frame does not show the state its caption claims. The numbers below are the
harness's own output on the pushed head.

frame what it shows what the harness asserts
01-ready the Ready-to-deploy row: profile, Expiry, Deploy no assertion
02-ack the public-by-link acknowledgment, pinned to the previewed digest no assertion
03-refused the auto-cleanup refusal as a plain banner, Details closed no assertion
04-refused-open the same refusal with Details open and its runnable command banner right edge 1434 inside a 1500 viewport
05-no-root no built static root: the explanation plus the "Deploy via agent" fallback the banner and the agent button are both present
11-card-hero the opted-in card BEFORE a deploy: its direct Deploy button and helper line the Deploy button and its caption show, the Settings pointer does not
06-card-deployed the webapp card once a public URL exists the public URL is rendered
07-card-flag-off the card with the preview off: draft info, one pointer direct=0 agent=0 invite=0 pointer=1
08-settings Settings -> Developer -> Feature Previews with the toggle on and its ingress link toggle reads on, the link is present
09-done the row's success state: URL, copy button, propagation note url present, zero failure text
10-scan-blocked a CREDENTIAL scan finding: the one refusal that does not bend the finding shows and NO override button exists
12-scan-overridable a non-credential finding, with its danger override the finding and the "Deploy anyway" button both present

Capturing these found two defects the test suite did not. The refusal banner
rendered inside the actions cell and ran past the viewport's right edge, cutting
off both the Details text and the buttons; it now spans its own full-width row.
The settings frame was shooting Settings -> Overview, because Feature Previews is
a section of the Developer tab rather than a top-level entry, so the frame did
not contain the toggle its caption named.

Default-off behaviour. With the preview off the feature is hidden rather than
rerouted: no in-page button, no agent hand-off, no profile picker, and no line
inviting a deploy. The card shows the app's draft information and one neutral
pointer to Settings -> Developer -> Feature Previews.

On the harness's own opt-in. stubDashboardApi runs localStorage.clear()
inside an init script that fires on every navigation, so a preview flag written by
a separate init script or by page.evaluate is wiped on the next goto. It is
seeded through that stub's own localStorageEntries now, and the run asserts the
flag reads back before shooting anything. This mattered silently rather than
loudly: an absent flag does not empty a frame, it withholds one control and leaves
the rest of the shot looking right, which is how the card's hero frame was
unreachable for several rounds.

after-01-ready

after-02-ack

after-03-refused

after-04-refused-open

after-05-no-root

after-06-card-deployed

after-07-card-flag-off

after-08-settings

after-09-done

after-10-scan-blocked

after-11-card-hero

after-12-scan-overridable

@chenmingwei23
chenmingwei23 requested review from a team and pepmach September 22, 2026 14:45
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — 🟡 CONCERNS

Design-level review of 1e3fc9418696f44967fef3013fa863c1ea389edc — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

Default-off flag silently removes the working PublishHub public-web row and hides the button the MCP tool's own routing guidance names.

Watch

  • The gate is applied unevenly at its removal sites. The webapp card flag-off state shows "one neutral pointer to Settings -> Developer -> Feature Previews" (asserted in frame 07), but PublishHub is "Filtered at the ROW level" with nothing left behind — an existing html/widget publisher upgrades, the destination they used vanishes from the panel with no explanation, and they have no reason to look in Feature Previews. Same seam in chat: deploy_artifact still works flag-off and its return string sends the user to "Artifacts -> Artifact Deploy (/deploy)", a button deployPreview hides — only the literal /deploy URL in the string saves the path.
    Clears when: the filtered PublishHub row leaves the same neutral Feature Previews pointer the card shows (or the maintainer flips the default in the recorded-decision change the description proposes).

Suggestions

  • The description's own "worth a separate look" — deploy_artifact reporting unavailable three times — is the failure that made this a dead end; file it as an issue before it's forgotten, since this PR removes the symptom that would resurface it.

[DESIGN-REVIEWED] 1e3fc94

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🟡 CONCERNS

UX-level review of 1e3fc9418696f44967fef3013fa863c1ea389edc — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

Reaper refusal contradicts the adjacent Expiry control — "Permanent (no expiry)" beside "an expiring deployment needs auto-cleanup"; the blind reader "cannot reconcile those."

Watch

  • Shots 03–04 show the reaper_required banner ("An expiring deployment needs the auto-cleanup job installed first") while the row's Expiry select reads "Permanent (no expiry)"; setTtlHours never clears a refused phase, so changing the select in real use reproduces it, and the banner names the requested window only behind Details. Blind reader: "I cannot reconcile those" and, on the recovery button, "'Deploy as permanent' sounds like it makes something last forever and I don't fully understand it." Low frequency (non-default TTL only) × moderate confusion × every occurrence. Fix: reset the refusal when the Expiry select changes, and put the requested window in the banner sentence ("A 24-hour expiry needs…").
  • "Deploy via agent" (shot-05) was read correctly but only as "a guess — I don't know why it changed", and the table footnote "Deploy publishes from this page after you confirm." still renders under a row whose only button now opens a chat with no confirm step. Fix: give the row's fallback button the card's helper ("Opens a new chat session to run the deploy") and suppress the footnote when every row is in the fallback state.
  • Flag-off card copy "Deployment is available under Settings → Developer → Feature Previews." (shot-07) is plain text; the reader would "go hunting through Settings." Every flag-off user hits it once. Fix: make it navigate to the Feature Previews section (FEATURE_PREVIEWS_HIGHLIGHT_ANCHOR already exists).

Suggestions

  • Unify the deploy-status badges the reader had to double-check: the new green directDeploy.deployed ("Deployed!") sits beside yellow "not deployed" (table) and purple "Not deployed" (card) — drop the exclamation and match casing so one status reads as one thing.

[UX-REVIEWED] 1e3fc94

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ human override accepted

@chenmingwei23 overrode this lane for 1e3fc9418696f44967fef3013fa863c1ea389edc via /ai-review override (this commit only).

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 1e3fc9418696f44967fef3013fa863c1ea389edc and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 1e3fc94

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 1e3fc9418696f44967fef3013fa863c1ea389edc: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 419ebd1e92f3898cf152c559f0ec2388caf4b7d6 — this comment is updated in place on each push.

Review details

Nothing blocks; one advisory finding on the new pending-confirm recovery path.

FINDING — src/kiro_crew/deploy/handlers.py:2546 — except Exception as exc: cannot catch asyncio.CancelledError (a BaseException), so when AppRunner shutdown cancels the request task past shutdown_timeout mid-await _do_deploy(params), the entry already consumed by claim_pending at line 2377 is never re-added — the pending row is gone for good with nothing to retry or dismiss, which is the exact state this new block was added to prevent → Fix: add except asyncio.CancelledError: immediately above it that calls add_pending(entry) synchronously (not through asyncio.to_thread, which is itself cancelled) and re-raises.

[OPUS-REVIEWED] 419ebd1

Verdict parsed from the review's SHA-scoped output markers for commit 419ebd1e92f3898cf152c559f0ec2388caf4b7d6.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 419ebd1e92f3898cf152c559f0ec2388caf4b7d6: <one-sentence reason>

@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from 7c31723 to 0498134 Compare September 22, 2026 16:21
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 22, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from 0498134 to 47d9fb8 Compare September 22, 2026 16:37
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 22, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from 47d9fb8 to c487eb0 Compare September 22, 2026 16:55
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Sep 22, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from c487eb0 to 5951866 Compare September 22, 2026 17:20
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 22, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from 5951866 to 08f0ac3 Compare September 22, 2026 18:11
@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for 08f0ac3fe4e612e8a1037b8bc831d20b8066b6e3; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 08f0ac3fe4e612e8a1037b8bc831d20b8066b6e3: <one-sentence reason>

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for 08f0ac3fe4e612e8a1037b8bc831d20b8066b6e3; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 08f0ac3fe4e612e8a1037b8bc831d20b8066b6e3: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for 08f0ac3fe4e612e8a1037b8bc831d20b8066b6e3; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 08f0ac3fe4e612e8a1037b8bc831d20b8066b6e3: <one-sentence reason>

@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from 08f0ac3 to 6ffad95 Compare September 22, 2026 21:02
@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from daea034 to ca765bb Compare September 23, 2026 05:07
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 23, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from ca765bb to 419ebd1 Compare September 23, 2026 05:49
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 23, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Rebuttal: the max-two-buttons-per-row finding is outside this diff

GPT 5.6 blocks this pull request on website/src/pages/chat/MemoryRecallStrip.tsx:34
(<span className="flex flex-wrap items-center gap-1">, IdList mapping each
memory id to a sibling button). That file is not part of this change.

It is byte-identical to the base. git diff origin/main HEAD -- website/src/pages/chat/MemoryRecallStrip.tsx
is empty, the path does not appear in this branch's file list, and the line the
finding quotes is line 34 of the file as it stands on main. It was last touched
by #12878, which is where the clickable-id list came from.

The rule grandfathers it by its own terms. website/AUTOSDE.yaml, under
max-two-buttons-per-row:

Applies to what the diff ADDS. A row that already carries 3+ on the base branch
is grandfathered, but must not grow.

This diff adds nothing to that row and does not grow it, so the rule does not
reach it here.

No issue filed, deliberately, and here is the reasoning to overturn. I checked
the tracker in every state for this file and for the rule and found nothing, so
the question was whether to open one. I decided the finding is not clearly a
defect rather than clearly one: the rule's stated rationale is that "peer buttons
side by side carry no ranking, so three or more force a read-every-label scan",
and every chip in this list performs the same action on a different identifier.
The code carries that argument explicitly:

The chips are identifiers in a list, not peer actions, so they wrap rather than
fold.

The rule's exclusion list does not name identifier chips, so this is a judgement
call about the rule's edge rather than a violation with an obvious fix. Filing an
issue asserting a defect would overstate what I can show. If a maintainer reads
the edge the other way, the finding is real and an issue is warranted; that is a
cheaper correction than a wrongly filed report, which is why I left it here rather
than in the tracker.

What I am not doing. Not fixing it in this pull request, because a change to a
chat surface this branch does not touch is precisely the kind of rider the
First Principles lane is objecting to on the same head. Not posting an override
either: that is a repository writer's call, never the author's.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 23, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from 419ebd1 to ef7ef5b Compare September 23, 2026 06:27
@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for ef7ef5bbc5de1183d113b5be8359e0e1a447184d; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt ef7ef5bbc5de1183d113b5be8359e0e1a447184d: <one-sentence reason>

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for ef7ef5bbc5de1183d113b5be8359e0e1a447184d; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt ef7ef5bbc5de1183d113b5be8359e0e1a447184d: <one-sentence reason>

Deploy on a webapp artifact card and on the Artifact Deploy page's
"Ready to deploy" row set `window.__mc_chat_launch` and navigated to /chat.
Neither deployed anything. The only button in the product that executes a
webapp deploy lives on a card that renders nothing when the pending list is
empty, so the chat sent the user back to the button they came from.

Both buttons now run the two-call confirm flow `useDirectDeploy`: a preview
that resolves the app's built static root and scans it, the blocking
public-by-link acknowledgment, then the confirmed deploy bound to the previewed
digest and identity so a concurrent change is refused rather than published.
The chat hand-off survives as a labelled fallback, offered only when the
backend reports no built static root to publish.

Three refusals get an affordance instead of a red dead end: the reaper
precondition offers "Deploy as permanent" and the absolute install command, a
stale preview says the app changed, and a scan block shows its findings with an
override that credential findings deliberately do not get.

The whole surface sits behind the off-by-default Artifact Deploy Feature
Preview. With the preview off the card shows the app's draft information and
one neutral pointer to Settings, and offers no deploy route by either path.

The row reports one state: its status badge follows its own flow rather than
the artifact record, whose back-fill lands on a later refetch, and the primary
is inert once a deploy is done or while a scan block stands.

All new copy is in the eleven shipped catalogs, including the Ready-to-deploy
column headers and the hook's error fallbacks, which rendered English
regardless of locale.

Fixes #12816
@chenmingwei23
chenmingwei23 force-pushed the fix/artifact-deploy-direct-confirm branch from ef7ef5b to 1e3fc94 Compare September 23, 2026 08:23
@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for 1e3fc9418696f44967fef3013fa863c1ea389edc; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 1e3fc9418696f44967fef3013fa863c1ea389edc: <one-sentence reason>

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 23, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles 1e3fc94: Accepted for this release. The pre-existing Artifacts doors route into this same confirm flow, which publishes to a world-readable URL and spends in the operator's own AWS account, so gating the whole surface behind one off-by-default Feature Preview is the coherent shape, and shipping it on by default would be the larger decision. Recorded here rather than by RFC deliberately: the surface-wide on-by-default question is a separate follow-up.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@chenmingwei23 marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for 1e3fc9418696f44967fef3013fa863c1ea389edc.

Accepted for this release. The pre-existing Artifacts doors route into this same confirm flow, which publishes to a world-readable URL and spends in the operator's own AWS account, so gating the whole surface behind one off-by-default Feature Preview is the coherent shape, and shipping it on by default would be the larger decision. Recorded here rather than by RFC deliberately: the surface-wide on-by-default question is a separate follow-up.

This decision applies only to this commit. A new push requires a new judgment.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Artifact Deploy: Deploy button loops back to chat, no human deploy path

2 participants