feat: add guided profile readiness checks - #213
Conversation
📝 WalkthroughWalkthroughThe PR adds opt-in profile readiness checks for Google Search Console through CLI setup and the local Console. It introduces reviewed adapter matching, safe read-only probing, audit and policy gates, identity reporting, cancellation propagation, bounded results, and related tests and documentation. ChangesProfile readiness onboarding
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/setup/profile-readiness.ts`:
- Around line 267-276: Update the unsupported path around configuredAuditTrail
so audit.ensureWritable() runs before audit.beginOperation, matching the main
readiness flow. Wrap or normalize ensureWritable failures through the existing
safeReadinessError mechanism, then begin and finish the provider-adapter scope
only after writability succeeds, preserving the blocked status and
PROFILE_READINESS_UNSUPPORTED error code.
- Around line 182-183: Remove the redundant consecutive
throwIfAborted(target.signal) call in the surrounding setup flow, retaining a
single cancellation check; only add a different guard if the code clearly
requires a distinct condition.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 80cdb6df-b0dc-4d6e-816c-69d95472af2c
📒 Files selected for processing (43)
CHANGELOG.mdREADME.mddocs/cli.mddocs/console-api.mddocs/provider-adapters.mdsrc/audit/audit-types.tssrc/cli/init.tssrc/cli/main.tssrc/cli/parse.tssrc/cli/setup.tssrc/config/provider-adapters.tssrc/console/console-application-service.tssrc/console/console-assets.tssrc/console/console-config-metadata.tssrc/console/console-dashboard-application-service.tssrc/console/console-server.tssrc/plugins/plugin-registry.tssrc/policy/policy-types.tssrc/policy/risk-classifier.tssrc/runtime/create-runtime.tssrc/runtime/resolve-runtime-config.tssrc/secrets/external-secret-providers.tssrc/secrets/secret-process-runner.tssrc/secrets/secret-provider.tssrc/secrets/secret-resolver.tssrc/setup/profile-readiness.tssrc/upstream/upstream-process-manager.tstests/cli-parse.test.tstests/console-application-service.test.tstests/console-config-metadata.test.tstests/console-server.test.tstests/fixtures/fake-upstream-bundled.mjstests/fixtures/fake-upstream-runtime.mjstests/oauth-console-threat-model-docs-contract.test.tstests/plugin-api.test.tstests/preset-docs-contract.test.tstests/provider-adapter-contract.test.tstests/readme-product-contract.test.tstests/runtime-config-resolution.test.tstests/secret-providers.test.tstests/setup-command.test.tstests/setup-profile-readiness.test.tstests/upstream-manager.test.ts
Dismissed under the documented rate-limit exception: CodeRabbit reviewed 1020636 and raised two findings; both were fixed in 1786cc6 with a focused regression, and both review threads are resolved. Current-head CI is green across Linux, macOS, and Windows. The current-head CodeRabbit status reports Review rate limited. A narrow local Claude fallback exited with an execution error and produced no review result; it is not being treated as approval.
Summary
This is the first-success/readiness slice of #204; it does not close the parent onboarding issue.
miftah setupand Miftah Consoleprovider-adapter, native OAuth, ormanual-only) and clears stale readiness UI when a configuration is deselectedValidation
npm test— 1,370 passed, 23 skippednpm run test:core— 408 passed, 21 skippednpm run test:coverage— 1,370 passed, 23 skipped; thresholds metnpm run lintnpm run typechecknpm run buildnpm run smoke:clinpm run check:packnpm run test:packagegit diff --checkPartially addresses #204.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation