Skip to content

feat(dashboard/skills): diff + propose-to-registry for pending evolution drafts (#5819)#6104

Merged
houko merged 6 commits into
mainfrom
feat/skill-evolution-mode
Jun 14, 2026
Merged

feat(dashboard/skills): diff + propose-to-registry for pending evolution drafts (#5819)#6104
houko merged 6 commits into
mainfrom
feat/skill-evolution-mode

Conversation

@houko

@houko houko commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes the dashboard slice that #5844 deferred. #5844 landed the EvolutionMode Free/Controlled core, pending-queue routing, and registry PR automation, but noted that "the dashboard diff / 'Available' UI and the 'Propose to Registry' action land separately" — this is that follow-up.

Change

Backend (librefang-api):

  • New POST /api/skills/pending/{id}/propose-to-registry: stages a pending candidate as an InstalledSkill in a temp dir and opens a registry PR straight from the draft (no approve-first step). For update candidates it pulls the target skill's evolution history into the PR body.
  • The existing installed-skill propose route and the new route now share a run_registry_proposal() core (reuse over duplication). Wired into the router + OpenAPI paths.

Dashboard:

  • PendingCandidate type extended with kind / target_skill_id / current_version / proposed_version.
  • PendingSkillsSection renders an inline unified diff (current skill body vs proposed prompt_context) with current_version → proposed_version for update candidates, plus a per-candidate "Propose to Registry" button.
  • Dependency-free unified-diff helper (unifiedDiff.ts) with vitest tests. No new npm dependency.

Scope / deferred

background_skill_review prompt tuning is out of scope (this issue is scoped to the dashboard diff / propose UI). openapi.json + baselines regenerate via cargo xtask or CI's openapi-drift job.

Test plan

  • cargo build -p librefang-api && cargo clippy -p librefang-api -- -D warnings
  • (cd crates/librefang-api/dashboard && pnpm test && pnpm build)

Closes #5819

…ion drafts (#5819)

Completes the UI slice #5844 deferred. Pending update/patch candidates now render an inline unified diff (current skill body vs proposed prompt_context) with current_version -> proposed_version, and gain a Propose to Registry action that opens a registry PR straight from the draft via POST /api/skills/pending/{id}/propose-to-registry. The new route shares its proposal core with the installed-skill route (refactored to run_registry_proposal). Diff helper is dependency-free. Prompt tuning out of scope.
@github-actions github-actions Bot added the area/docs Documentation and guides label Jun 14, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 14, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
librefang-deploy 02e612c Jun 14 2026, 10:43 PM

@github-actions github-actions Bot added size/L 250-999 lines changed ready-for-review PR is ready for maintainer review labels Jun 14, 2026

@houko houko left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Committed one mechanical fix; one finding needs attention before merge.


Generated by Claude Code

(status = 502, description = "GitHub request failed")
)
)]
pub async fn propose_pending_to_registry(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing #[tokio::test] integration test for this route. Per CLAUDE.md (§ "What you MUST do for any route / wiring change"), every new endpoint needs a test in crates/librefang-api/tests/ that spawns the router via start_test_server(), POSTs to /api/skills/pending/{id}/propose-to-registry, and asserts on the response shape — covering at minimum the 404 (unknown id), 401 (no GitHub token), and a happy-path stub (or a mocked GitHub token producing 200 with a pr_url). Without this, the dead_route_audit_test and openapi_path_coverage_test will catch wiring drift but nothing exercises the handler's load / staging / error paths. The cargo build in the test plan does not substitute for cargo test -p librefang-api.


Generated by Claude Code

@houko
houko enabled auto-merge (squash) June 14, 2026 14:03
@github-actions github-actions Bot added the area/sdk JavaScript and Python SDKs label Jun 14, 2026
@houko
houko merged commit 7d99abf into main Jun 14, 2026
33 of 34 checks passed
@houko
houko deleted the feat/skill-evolution-mode branch June 14, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation and guides area/sdk JavaScript and Python SDKs ready-for-review PR is ready for maintainer review size/L 250-999 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(skills): configurable skill evolution mode (free/controlled) + registry PR proposal

2 participants