Skip to content

fix(openclaw): correct misleading consolidation guidance, narrow field type, enforce ID length limit - #52

Merged
KHAEntertainment merged 2 commits into
feat/openclaw-secrets-migration-v2from
copilot/sub-pr-51
Mar 23, 2026
Merged

fix(openclaw): correct misleading consolidation guidance, narrow field type, enforce ID length limit#52
KHAEntertainment merged 2 commits into
feat/openclaw-secrets-migration-v2from
copilot/sub-pr-51

Conversation

Copilot AI commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

discoverAuthStorePaths() only scans per-agent agents/*/agent/auth-profiles.json — never the main store — so agentsWithNoUniqueProfiles means "all profiles duplicated within scanned agents", not "available from main". Cleanup output was incorrectly advising users to delete local auth files and inherit from main without verifying main has those secrets.

src/cli/commands/openclaw-cleanup.ts

  • Replaced all 5 "inherit from main" strings across --apply, --audit, and --consolidate output with accurate descriptions (e.g. "These agents only have profiles that are duplicated across other scanned agents", "Review if these agents still need their own auth-profiles.json")

src/openclaw/plan.ts

  • MigratableSecret.field: narrowed from string'key' | 'token'; existing constructions in migrate.ts already use the literal values so no call-site changes needed
  • buildExecProviderId: added truncation to guarantee the returned ID never exceeds 256 chars. Available budget = 256 − "providers/".length(10) − 1 (separator) = 245; split as ⌈245/2⌉ = 123 for provider, ⌊245/2⌋ = 122 for field:
    const available = 256 - 'providers/'.length - 1  // 245
    sanitizedProvider = sanitizedProvider.slice(0, Math.ceil(available / 2))
    sanitizedField    = sanitizedField.slice(0, Math.floor(available / 2))

docs/MIGRATION.md

  • Added text language specifier to two unlabelled fenced code blocks (example CLI output ~line 65, ID mapping ~line 232)

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…ype narrowing, ID length enforcement, doc code block language specifiers

Co-authored-by: KHAEntertainment <43256680+KHAEntertainment@users.noreply.github.com>
Agent-Logs-Url: https://github.com/KHAEntertainment/clawvault/sessions/f266caee-ba37-485d-a8a9-765045dabc0e
Copilot AI changed the title [WIP] [WIP] Address feedback on auto-migration implementation in OpenClaw PR fix(openclaw): correct misleading consolidation guidance, narrow field type, enforce ID length limit Mar 23, 2026
Copilot AI requested a review from KHAEntertainment March 23, 2026 02:15
@KHAEntertainment
KHAEntertainment marked this pull request as ready for review March 23, 2026 03:40
@KHAEntertainment
KHAEntertainment merged commit fa7261f into feat/openclaw-secrets-migration-v2 Mar 23, 2026
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.

2 participants