Skip to content

fix(ci): remove unused gateway exports and stale suppression entry - #168292

Closed
RomneyDa wants to merge 1 commit into
mainfrom
fix/public-session-script-export-20261009
Closed

RomneyDa wants to merge 1 commit into
mainfrom
fix/public-session-script-export-20261009

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Local required changed gates fail on current main despite unrelated release-tooling changes: the public reader exposes its lifecycle script solely for a test, the live-probe module exports its locally consumed Claude-family predicate, and the max-lines suppression baseline retains an entry whose suppression was removed by a main-branch test cleanup.

Discovered while verifying Batch 3: #168266, #168267, #168271 and #168280. Merged #168241 registers a different dormant SQLite-fence entry; inspection confirms it does not repair this export.

Why This Change Was Made

PUBLIC_SESSION_ENTRY_SCRIPT is consumed inside its renderer and imported only by the refresh test. It is not an external SDK or public API. Keep it private; exercise the script actually emitted by renderPublicSessionDocument, matching the existing operator-handoff test's rendered-document boundary. All four refresh lifecycle regressions remain, now protecting document-to-script wiring too. No replacement production seam or duplicate script is introduced. isClaudeLikeLiveAgent has only its own buildLiveCronProbeMessage caller; keep that predicate private too. Existing live-probe tests protect the Claude-style and other-agent retry wording through the public prompt builder.

The baseline change is shrink-only required maintenance: remove exactly src/commands/doctor-memory-search.test.ts, which no longer declares a max-lines suppression. No assertion, threshold, failure policy, or active exception is weakened.

User Impact

None. The lifecycle script, rendered page, CSP hash, authentication, refresh, revocation and copy behavior are unchanged. The local gate can inspect real production exports without keeping a test-only export alive. No configuration option, database change, runtime state, release mutation, or Gateway mutation.

Evidence

  • Before: native changed gates report the production unused export; current pinned main 6d3f75a1baa71ea5f51db7150ba1eb2d6f067be1 retains that export. The first native gate on this base also fails the stale max-lines baseline entry before later checks.
  • Baseline reader/renderer suites: 16 tests passed. After boundary repair, node scripts/run-vitest.mjs src/gateway/control-ui-public-session-refresh.test.ts src/gateway/control-ui-public-session-render.test.ts src/gateway/control-ui-public-session-entry.test.ts: 42 tests passed, including conditional ETag reads, visibility fencing, revocation, Retry-After and operator handoff siblings. No new duplicate tests.
  • Actual native renderer before/after emitted identical synthetic full-document SHA-256: 3c6411a368a54dd4f90c4e660384a2381dd04a9fdfa502cd800bb68230a71a44. This is behavior-neutral internal export removal, not a user-visible UI change; no live Gateway was changed.
  • Fresh initial three-file independent autoreview: scoped-clean at P0–P2, final source integrity passed. Final four-file independent autoreview is scoped-clean at P0–P2, with final source integrity passed. Acting agent independently searched repository-wide consumers and read renderer, refresh/handoff siblings, response caller and JSDOM parse/close implementation.
  • Existing live-probe owner suite: 7 tests passed before and after export demotion, including Claude-style/non-Claude retry prompts and exact cron scope.
  • Final native full changed gate passed (exit 0): node scripts/check-changed.mjs -- src/gateway/control-ui-public-session-render.ts src/gateway/control-ui-public-session-refresh.test.ts src/gateway/live-agent-probes.ts config/max-lines-baseline.txt. Formatting, all core/root test type shards, all three export scans, scoped production/test/script lint, architecture/schema/database-first guards and runtime import-cycle checks passed. No gate skip or failure-policy change.
  • Production LOC: +2/-2, net 0 (remove two export modifiers only). Tests: +18/-2, net +16; suppression baseline: -1. Test growth binds existing coverage to the real rendered artifact and closes the JSDOM immediately.

Ownership and scope

Renderer: src/gateway/control-ui-public-session-render.ts; real caller: src/gateway/control-ui-public-session-response.ts. Refresh test runs the emitted script with the existing controlled VM transport/timers; existing control-ui-public-session-entry.test.ts exercises the rendered operator handoff. History: 8787ee08687e introduced the public entry path, 45ec7dc8ba50 added copy controls. Script bytes were not modified. Ratchet owner: scripts/check-max-lines-ratchet.mts; only an obsolete baseline record is removed.

Related live PR search found mentions of these blockers in other work, including #168289, but no open implementation for these owner files. No merges.

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes two internal Gateway helpers private, runs existing refresh tests against the rendered script, and removes an obsolete suppression-baseline entry.

Example: A contributor runs the max-lines ratchet on the current source tree.

  • Before: The baseline still lists src/commands/doctor-memory-search.test.ts despite its removed suppression, causing a stale-entry failure.
  • After: That obsolete entry is removed without weakening any active suppression or threshold.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, source-verified maintenance with no identified defect; validation is harness-based and exact-head CI remains unresolved.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored internal cleanup is outside the external-contributor proof gate; supplied validation describes rendered-document equivalence and existing VM lifecycle suites, without a shipped-entry-point run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Contributors encounter repository gate failures from unused internal exports and an obsolete suppression record.
Reason: The maintainer-authored patch restores existing tooling contracts without changing product behavior or adding configuration.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is maintainer-authored, repairs concrete gate failures still present on fetched main, and introduces no identified code defect.

Priority: P3
Reviewed head: 8133cc33327afa7c7882cd625d0a6e324ee5e2e0

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway renderer turns public conversation data into HTML and its lifecycle script; live-probe helpers build validation prompts, while repository gates enforce export and suppression contracts.

flowchart TD
  A[Public conversation request] --> B[Gateway response owner]
  B --> C[Public document renderer]
  C --> D[HTML and lifecycle script]
  D --> E[Refresh lifecycle tests]
  F[Source exports and baseline] --> G[Repository gates]
Loading

Technical review

Best possible solution:

Land this focused cleanup once the existing CI gates are resolved.

Do we have a high-confidence way to reproduce the issue?

Current-main source retains unused exports and a stale baseline record that the existing ratchet explicitly rejects; execution was excluded by the read-only review scope.

Is this the best way to solve the issue?

The patch fixes the owning source declarations and obsolete record directly while preserving existing lifecycle coverage and runtime bytes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 06cf159ba182.

Provenance checked

  • Public-reader script export and refresh tests keeps the original intent (8787ee0: Support canonical read-only public threads with controlled refresh and operator handoff.)
  • Live-agent family predicate keeps the original intent (8659495: Allow agent-generic live cron prompts while retaining Claude-specific retry wording.)
  • Max-lines suppression baseline keeps the original intent (chore: enforce max-lines suppression ratchet #107315: Enforce a shrink-only suppression ratchet; stale entries must be removed when their suppressions disappear.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Dallin Romney: Raw commit 8824637 adds src/gateway/live-agent-probes.ts:57 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 88246371862f; files: src/gateway/live-agent-probes.ts)

PR surface

Source 0, Tests +16, Other -1. Total +15 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 2 2 0
Tests 1 18 2 +16
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 4 20 5 +15

Review metrics

Metric Value Why it matters
Production versus test LOC Production +2/-2; tests +18/-2 Production growth is zero; test growth removes a test-only export and checks the rendered-script wiring without adding cases.

Labels

Label changes:

  • add P3: This is behavior-preserving internal cleanup of export and lint-baseline contracts.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is behavior-preserving internal cleanup of export and lint-baseline contracts.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-10T06:55:23.457Z sha 8133cc3 :: needs maintainer review before merge. :: none

Reviewed October 10, 2026, 3:13 AM ET / 07:13 UTC (Revision 2).

@steipete

Copy link
Copy Markdown
Contributor

Thanks @RomneyDa, the diagnosis here was right. All three fixes have since landed on main separately, so nothing is left to land from this branch:

On main, control-ui-public-session-render.ts and live-agent-probes.ts are now byte-identical to this branch. The only remaining difference is how the refresh test gets the rendered script, and main already covers that by extracting it from the rendered document once. The branch also conflicts with main now, so I'm closing this as superseded.

@steipete steipete closed this Oct 10, 2026
@RomneyDa
RomneyDa deleted the fix/public-session-script-export-20261009 branch October 22, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants