Repository navigation
fix: remove internal exports blocking dependency checks - #172956
Conversation
Make unused runtime and tooling declarations private after the Google validation cutover (#172420) and import-free archive grammar move (#172392). Remove the zero-consumer Google minimum-duration constant without changing validation, metadata, diagnostics, session lifecycle, or update behavior. Preserve the release publication import of prefetchPreparedPlugins and model its actual frozen-harness workflow edge in Knip. The regression removes the real import and verifies that its analyzer edge disappears. No ignores added. The two baseline UI findings belong to the separate active #172926.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR makes unused internal exports private and teaches Knip to recognize release-workflow imports from the frozen harness. Example: The release publication workflow imports prefetchPreparedPlugins from ./.release-harness/scripts/openclaw-release-ready.mjs.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs concrete dependency-check failures, preserves real consumers, and introduces no identified defect; the protected security label also prevents closure. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherRepository dependency checks analyze source exports and executable roots; workflow compilers translate embedded imports into dependency edges used by Knip. flowchart TD
A[Source modules] --> D[Knip analyzer]
B[Release workflow] --> C[Workflow import compiler]
C --> D
E[Executable root configuration] --> D
D --> F[Dependency check results]
Technical reviewBest possible solution: Retain the focused export cleanup and source-derived workflow edges through the existing CI and landing workflow. Do we have a high-confidence way to reproduce the issue? Current-main source retains unused exports and omits the real release-workflow import edge; the PR reports baseline scan failures and clean repaired scans, but no target code was executed during this review. Is this the best way to solve the issue? Privatizing unused declarations and extending the existing workflow compiler addresses the analyzer boundary directly without weakening checks or changing runtime ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9b2bc0ed7e13. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -1, Tests +18, Other +14. Total +31 across 15 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 15, 2026, 5:05 AM ET / 09:05 UTC. |
|
Merged at the verified head a85729c as a8efc0d. The only red in exact-head CI run 38708319231 was UI e2e 2/7: two session-management.sidebar cases (nests spawned sessions, personal pin true and false). They fail on main because new child sessions are now revealed automatically (#172362), and open #171981 updates those fixtures. This PR touches no UI files; it only narrows internal export visibility and models the release-workflow consumer of checkPostgresCatalog in the scripts Knip config. 400 focused tests and the targeted static gates passed locally on this head. |
) check-dependencies reported internal declarations exported without production consumers after recent refactors (Google video duration constants, session archive suffix helper, X work origin, model diagnostic observation state, chat run record) plus script exports. Internal declarations become private and the unused Google constant is removed; the real release-workflow consumer of checkPostgresCatalog is modeled in the scripts Knip config instead of being deleted. No runtime capability, public SDK, schema or behavior change.
What Problem This Solves
Fixes repeated
check-dependenciesfailures after internal helpers and types lost their external consumers.User Impact
No user-visible behavior change, migration, update-path change, or release-note entry. Live runtime, Postgres CLI, and release-verification functions keep their existing behavior.
Why This Change Was Made
Make internal declarations private and remove the unused Google minimum-duration constant. Preserve the import-free transcript filename owner from #172392 and the shared duration validation from #172420. The X fixture infers its record from the store's real input contract.
The current script scan also exposes internal declarations. Keep
prefetchPreparedPluginsexported because the release publication workflow actually imports it from its frozen harness; model that source import in Knip's existing workflow compiler. This adds no ignores. The regression verifies that removing the actual import removes the analyzer edge.The two remaining UI exports in the baseline belong to the separate active #172926 and are deliberately untouched.
Evidence
Frozen offline install passes. Unmodified main reproduces six core/plugin and ten script findings. After the cleanup, both production and script export scans report zero; the full-tree scan retains only the two peer-owned UI findings. Both unused-file scans pass with zero entries.
The new workflow-consumer regression fails on the old config and passes after repair (10 tests, including its removal control). Independent P2 review is clean. All 398 focused tests pass across 16 files with
--maxWorkers=1(Google, X, model diagnostics, chat state, archives, SDK filename runtime, Postgres generation, usage ledger, maturity, OpenGrep, release preparation, and Knip). Core/scripts and targeted Google/X typechecks, scoped core/scripts/plugin/boundary lint, formatting, and the line-cap ratchet pass. The full runtime build also passes. Both source-Gateway and built-CLI SQLite flip-proof callers pass unchanged (2 cases), for 400 passing selected tests across 18 files in total. PR CI supplies broad proof.CI follow-through
Exact-head run 38708319231 has two failed cases in
session-management.sidebar.e2e.test.ts: both “nests spawned sessions” variants expect zero children and receive four. The completed clean-main replay at37e45ded12fcalready reproduces both exact cases/assertions; this test file is unchanged through the CI main parentf41b2b656be5. That saved proof is reused rather than repeated.Active non-draft #171981 contains the exact fixture repair: establish the intended collapsed state before the unchanged zero-child assertion, following main #172362. No competing UI hunk is included. Native review and GitHub-gated preparation completed at this head without another push. Merge remains unrequested because exact-head green CI is required.