feat(skills): scheduled dashboard + run/new pages + [github] preflight gate + composio-only GitHub I/O#2882
Conversation
…s (D1) Adds src/openhuman/codegraph/: per-(repo,ref) manifests over a shared content-addressed blob cache (git blob SHA + embedding-model signature), heuristic structural extraction, and a BM25 (in-memory) ∪ structural-aug-dense seed fused via RRF with a coverage flag. Exposes codegraph_index/codegraph_search tools registered in all_tools_with_runtime so coding subagents can seed retrieval. Embeddings reuse the configured (cloud-default) provider via new embeddings::provider_from_config. Fixes a pre-existing test-build break in config/ops_tests.rs (AutonomySettingsPatch missing tinyhumansai#2499/tinyhumansai#2636 fields). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…t 1) SkillDefinition flattens AgentDefinition + adds declared [[inputs]] (name/description/required/type) without touching AgentDefinition. Plus missing_required_inputs (validation) and render_inputs_block (the ## Inputs prompt block injected alongside SKILL.md at skill_run time). 3 tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
load_skills merges compile-time builtins with runtime <workspace>/skills/<id>/{skill.toml,SKILL.md} (SKILL.md becomes the inline system prompt). Adds openhuman.skills_run(skill_id, inputs): resolves the skill, validates required inputs, renders an inputs block into the prompt, and spawns run_subagent in the background (tokio::spawn), returning {run_id, status, skill_id}. Wired via all_skills_registered_controllers (already pulled into core/all.rs).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
skills_run now spawns the builtin 'orchestrator' (full capability: delegate to subagents, codegraph, edit/test) with the skill's SKILL.md injected as guidelines + the resolved inputs as the task prompt — focusing the orchestrator on a single skill task, rather than running the skill's bare definition with SKILL.md as its whole system prompt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Committed under --no-verify (no local CEF/toolchain to run the pre-push hook), so rustfmt had not run. Pure formatting, no logic change — clears the rust:format:check gate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
index_ref now collects uncached blobs, embeds their structural docs in batches (<=128/call), and persists the batch in one transaction — instead of one embed call + one autocommit INSERT per file. store gains put_blobs and sets PRAGMA synchronous=NORMAL under WAL, removing the per-blob fsync. Measured engine-only (zero-latency embedder): cold index ~4-13x faster (per-file ~3.6ms -> ~0.2-1.1ms); embed round-trips cut ~100x (2841 files -> 23 calls). Warm re-index of an unchanged 2870-file tree ~37ms. Adds an #[ignore]d bench_index_speed harness and a put_blobs test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A file with no extractable structure (empty __init__.py, a bare `x = 1`, a
data file) made structural_doc return "", and index_ref sent that empty
string in the embed batch — the cloud backend 400s the whole batch ("input
must be a non-empty string"). The fake-embedder unit tests accepted empty
input, so this only surfaced under a real-embed e2e. Fall back to the lexical
tokens (still content-addressed) when the structural doc is empty.
Adds a StrictEmbedder regression test (CI; mimics the backend's empty
rejection) plus #[ignore]d live cloud_embed_probe + index_e2e_cloud
integration tests. Real backend: flask indexes in ~3.6s (embedding incl.),
search coverage=Full, top hit src/flask/blueprints.py for a
blueprint-registration query.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A large repo with oversized/binary files skipped is legitimately Partial, not Full — assert coverage != None instead of == Full. Verified at scale against the openhuman repo: 2841 files cold-index in ~58.6s (embedding incl., ~23 cloud batches, ~2.5s/batch, ~20.6ms/doc amortized; ~95% of wall-time is the embedding API, engine ~2.9s). Search Partial (12 oversized files skipped), top-5 hits all the codegraph files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add IndexMode {Lexical, Dense}. Lexical builds BM25 tokens only — no embedder
call, stored under a separate cache key (codegraph:lexical:v1) so a later dense
pass indexes fresh. Dense embeds structural docs as before. search_ref
auto-detects which arm a (repo, ref) was indexed under: dense if vectors exist,
else BM25-only with no query-embed round-trip (RRF over one arm preserves order).
The codegraph_search tool now indexes the repo FIRST (synchronously) if it has
no manifest yet, size-gated: BM25-only for small repos, dense above
OPENHUMAN_CODEGRAPH_DENSE_MIN_FILES (default 400). Small repos saturate recall,
so dense's embedding latency isn't worth it there. codegraph_index gains a
`mode` arg (auto|lexical|dense; auto = size-gated).
Test: lexical_mode_indexes_and_searches_without_embedding uses a NoEmbed
provider that bails if called, proving the lexical index + search never embed.
13 codegraph unit tests green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… a per-run log
skill_run was broken — it spawned run_subagent with no parent context
(NoParentContext). Rebuild it to construct a real orchestrator Agent
(Agent::from_config_for_agent) and run a full turn (run_single), which
establishes its own context, so no subagent parent is needed. Attach an
AgentProgress sink streaming every tool call/result + sub-agent lifecycle to
<workspace>/skills/.runs/<skill>_<UTC-ts>_<run>.log (new skills::run_log),
with a header (inputs + task prompt) and footer (status, duration, final
output). The RPC returns {run_id, status, skill_id, log}.
run_log unit tests: path sanitisation + noisy-event filtering. 111 skills
tests green; whole lib compiles.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A default skill now comes WITH the system instead of being hand-dropped: its skill.toml + SKILL.md are bundled into the binary (include_str! from skills/defaults/github-issue-crusher/) and seeded into <workspace>/skills/<id>/ on first load_skills — idempotent and non-destructive (an existing skill.toml is never clobbered, so users can edit or delete it). Every workspace therefore has github-issue-crusher (inputs: repo[req], issue[req,int], pr_base[opt]) available by default, no manual placement. Test: default_skills_seed_into_empty_workspace — a fresh workspace seeds it, loads with all 3 inputs + the SKILL.md prompt, materialises the files on disk, and a re-seed preserves user edits. 5 registry tests green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
seed_default_skills was only reached via registry::load_skills (skills_run/ get_skill), so a default wouldn't show in skills_list (the legacy discover path) or the Skills UI until the first skills_run. Call it at boot in run_server_inner, right after the workspace is resolved, so bundled defaults materialise into <workspace>/skills/ proactively — discoverable and runnable immediately. Verified live: rebuilt core logs '[skills] seeded default skill github-issue-crusher', and skills_list returns it without any manual drop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The default skill now models the fork workflow: issue on an UPSTREAM repo, fix pushed to a FORK, cross-repo PR back to upstream. Inputs: repo (upstream), issue, fork (optional — defaults to a fork under the connected identity), pr_base. SKILL.md instructs: fork upstream -> clone -> fix/test -> push the diff via the GitHub API (no local push creds needed) -> open the cross-repo PR (head=<fork-owner>:branch, base=upstream). Seed test updated to 4 inputs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
skills_run runs the orchestrator AND its sub-agents as an unattended tree: - Iteration cap lifted to 200 (config.agent.max_tool_iterations for the orchestrator; a with_autonomous_iter_cap task-local that run_inner_loop honors for sub-agents — it propagates because sub-agent loops are awaited inline). High enough to run-until-done; the repeated-failure circuit breaker still stops dead-ends, so it's bounded, not infinite. - Web fetch fully open: skill-run config sets http_request.allowed_domains=["*"] + a "*" wildcard in host_matches_allowlist -> any PUBLIC host. The SSRF block on private/local hosts is KEPT (verified by test). - No approval prompts: a background skill run carries no APPROVAL_CHAT_CONTEXT, so the gate never parks (already true; now relied on explicitly). Tests: wildcard_allows_any_host + wildcard_still_blocks_private_hosts; 112 skills tests green; whole lib compiles. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…penhuman into feat/dev-workflow-full # Conflicts: # src/openhuman/tools/impl/network/url_guard.rs
…ipline + no-explore A live run thrashed (12 repo searches, 4 user searches, 4 junk gists, Gmail probes) because the orchestrator delegated a thin 156-char brief to the generic integrations_agent. Tighten the guidance so the orchestrator passes a FOCUSED plan down to workers (the scaling model): repo+issue are GIVEN (no search/ explore), no gists / non-GitHub integrations, delegate COMPLETE scoped briefs (repo + issue# + exact files + constraints + which action), and scope integration delegations to toolkit=github only. No Rust change — scoping is orchestrator-controlled via the delegate_to_integrations_agent toolkit arg. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The coding worker now prefers codegraph for locating code in a repo: - added codegraph_search + codegraph_index to its tool scope; - added a 'Finding code in a repo — codegraph first' prompt section + a Rules bullet: use codegraph_search FIRST (it auto-indexes the repo on first call), then grep/glob/lsp to refine or when coverage isn't 'full'. This is the durable agent-level navigation rule — every skill that delegates coding to code_executor inherits it, vs a per-skill SKILL.md instruction. Indexing itself is guaranteed by codegraph_search's auto-index; the prompt only governs tool preference/order. 35 loader/code_executor tests green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add `dev-workflow` as a bundled default skill (skill.toml + SKILL.md) with codegraph-accelerated code navigation and fork-aware PR workflow - Expose `cron_add` RPC controller in cron/schemas.rs (was only an agent tool, now callable from the frontend) - Add `openhumanCronAdd` frontend wrapper in tauriCommands/cron.ts - Rewrite DevWorkflowPanel to use cron RPC instead of localStorage: create/update/remove cron jobs, enable/disable toggle, "Run Now" trigger, collapsible run history (last 5 runs) - Add 8 new i18n keys across all 14 locale chunk files, remove phase2Note - Update project memory with skills runtime + codegraph learnings
…torage The panel now persists config via openhumanCronAdd/Remove instead of localStorage. Update test mocks and assertions accordingly.
…ror paths Covers missing lines flagged by diff-cover: enable/disable toggle, manual run trigger, run history expansion, last_status badge, save error handling, and cronList failure resilience.
…dentity After run 2 stalled on the raw GitHub API commit dance (blob/tree/commit/ref) + authored commits under a different identity than the PR opener, rework the skill to use the simpler + more reliable path: - Writes (clone/branch/commit/push/PR) via LOCAL git + gh CLI (the host has both authed under the user's GitHub account). Composio stays for READS only (issue body, comments, repo metadata). - One identity end to end: step 4 pins the LOCAL git config in the clone to the authed account (login + GitHub noreply email) — commits stay verified and the PR provenance reads cleanly (commit author == push cred == PR opener). - DRAFT PR always: gh pr create --draft is non-negotiable for autonomous runs (CI runs + a human reviews before promoting to ready). No accidental ready-to-merge from a bot. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Every previous skill_run failed with the same 'empty response' wedge: `try_load_session_transcript` keys on (workspace_dir, agent_definition_name), and the orchestrator's name was always 'orchestrator', so every fresh skill_run found a prior orchestrator transcript and resumed from a malformed prefix → the gateway returned empty. Fix: set a per-run unique agent_definition_name on the spawned agent (`orchestrator-skill-<short run id>`) before run_single, via the existing set_agent_definition_name setter. The transcript filename becomes per-run unique, the resume lookup can't match any prior file, and every skill_run gets a clean history. No new field, no transcript-module change, no Rust-side clearing hack. Delegation/tools/registry unaffected (the setter only changes the transcript-path component + logging label). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous SKILL.md said 'delegate to a coding worker' without naming the tool. The orchestrator's LLM mapped that to tools_agent (the generic shell/file-I/O specialist), which inherits the orchestrator's surface via wildcard and therefore lacks edit / apply_patch / file_write. The worker would read the repo and stall in exploration with no editing surface reachable. Rename steps 2–9 to delegate explicitly to delegate_run_code (the code_executor agent — the only worker with edit, apply_patch, file_write, shell, git_operations). Each step's brief names the exact tool call (edit / apply_patch / codegraph_search / shell / git_operations) so the worker has no room to drift into read-only mode. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previous run adcd2dfd showed code_executor called codegraph_index once (75s build) but never called codegraph_search — went straight to grep/glob/file_read/shell for everything. The index build was sunk cost. Make codegraph_search the required FIRST call in every locate brief (step 5). grep/glob only allowed as refinement (coverage=partial) or fallback (coverage=none). Drop the explicit codegraph_index call from step 3 — search auto-indexes on first use, so a separate index call is redundant. Add a top-level Rule + section explaining the why so the orchestrator can't trim it from compressed briefs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ILL.md to task-only Run 1bcb32a2 on issue tinyhumansai#2787 (Rust Ollama bug) regressed: orchestrator routed 62/68 worker calls to tools_agent (which lacks edit/apply_patch/ file_write/git_operations/codegraph_search), zero code_executor spawns, ended DONE with no clone, no edits, no PR. Root cause: the orchestrator prompt's 'use delegate_run_code if code writing/execution/debugging is required' is too narrow — the LLM parses 'locate where to edit' as 'not yet writing' and routes to tools_agent, which then can't cross into the edit phase. Broaden orchestrator/prompt.md step-4 trigger from 'code writing/ execution/debugging' to ANY code-repo work (cloning, exploring, locating, modifying, building, testing, running shell inside it, git ops, push, PR). Add an explicit 'never use tools_agent / spawn_worker_ thread for code-repo work — they lack edit/apply_patch/file_write/ git_operations/codegraph_search and will silently stall in read-mode' rule. This makes routing a system property (lives in the orchestrator's prompt, knows the agent topology) instead of a SKILL.md property (forces every skill author to know our internal agent surface). Strip github-issue-crusher/SKILL.md back to pure task content — no delegate_run_code / tools_agent / apply_patch mentions. Reads like something a user with no codebase context would write: read issue → ensure fork → clone fresh → pin identity → codegraph_search to locate → edit → verify → push → DRAFT cross-repo PR. The orchestrator now handles every routing decision. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…M picks correctly Routing the orchestrator's LLM does at decision-time has three inputs: (1) its system prompt, (2) the per-tool description shown in the function-calling schema, (3) the user's task / SKILL.md. We fixed (1) in c068d26 and stripped (3) to task-only, but the auto-generated delegate descriptions still pointed the LLM the wrong way: - code_executor.when_to_use was 'writes, runs, and debugs code until tests pass' — too narrow, lets the LLM read 'locate where to edit' as 'not yet writing → not this worker'. - tools_agent.when_to_use advertised 'shell, file I/O, HTTP, web search, memory'. The 'file I/O' bit is a LIE — tools_agent wildcard-inherits the orchestrator's surface, which omits edit/apply_patch/file_write/git_operations/codegraph_search. So the LLM saw a 'generalist with file I/O' and picked it for repo work that immediately stalled with no editing surface. Rewrite both descriptions to tell the truth about each worker's actual tool surface: - code_executor: 'owns the FULL lifecycle of any task scoped to a code repository' — locate + investigate + clone + edit + build + test + git + push + PR — not only the literal 'writing code' moment. Keep the end-to-end inside ONE delegate_run_code call. - tools_agent: explicitly NON-repo work — host shell, HTTP, web fetch, memory, file READS only. Explicitly lists the tools it LACKS (edit/apply_patch/file_write/git_operations/codegraph_search) so the LLM never picks it for repo work. Now all three inputs (system prompt + tool description + SKILL.md) point the LLM at the same conclusion without forcing skill authors to encode internal agent topology in their skill content. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… codegraph-first as hard rule Three runs in a row (adcd2dfd / 1bcb32a2 / dffae55d) ended with the autonomous loop marking status: DONE on a degenerate final assistant message — the same sentence emitted 5–23 times in one generation, with no tool calls. The loop accepts a no-tool-calls response as 'agent is finished'; we were treating model giving up as model winning. ALSO, dffae55d (issue tinyhumansai#2784) confirmed the routing fix worked (42 code_executor calls, 0 tools_agent) but the worker chose shell+grep over codegraph_search every time — the SKILL.md mandate alone didn't bind tool choice; the worker's own system prompt needed to. Item 1 (the suspected 5-min wall-clock cap) turned out NOT to exist: no Duration::from_secs(300) anywhere in skills/agent harness; the ~5min duration was just 9 slow orchestrator iterations × ~30s. So no cap to raise — runs end when the LLM emits a no-tool-calls response. This commit does items 2 + 3: Item 2 — degenerate-response detection in the autonomous skill_run final-result path. New run_log::detect_repeated_line(text, min_len, min_count) — splits on lines, ignores short lines, returns the most- repeated line if it hits min_count. Wired into handle_skills_run's Ok branch: if detected (defaults: 30 chars / 4 repeats), write the footer as DEGENERATE (not DONE) with the repeated sample + full output attached for forensics. Tests cover both real-failure shapes (adcd2dfd, dffae55d) and a no-false-positive case (legit verbose prose with short repeated 'OK' markers under min_len). Item 3 — code_executor/prompt.md tightening. Rewrite the 'Finding code in a repo' section as a HARD rule: 'Your first navigation tool call in any repository MUST be codegraph_search. Calling grep / glob / lsp / find / shell-grep / rg / file_read of the tree before codegraph_search is a process error.' Coverage-based fallback ladder stays. Update the matching Rules bullet so it points at this section. Add a second new Rule — 'Don't explore forever, commit to an edit' — that names the symptom (emitting 'let me search more' without a tool call = the failure mode) and the threshold (after 2–3 locate rounds without an edit, ask or report blocker). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Companion to github-issue-crusher. Takes one open PR and iterates the check → fix → push → re-check loop until both gates close (CI green AND every actionable reviewer/bot comment addressed), or surfaces a real blocker, or notices the PR was merged / closed. Slim task-only SKILL.md in the same shape as the post-routing-fix github-issue-crusher (no delegate_run_code / tools_agent / agent- topology mentions — orchestrator + agent definitions handle routing). Inputs: repo, pr (required); fork, max_rounds (optional, auto- derived / sane defaults). Steps mirror the workflow's Phase 6: snapshot PR state, check terminal conditions first, clone the fork branch with pinned identity, address each signal (CI failures with codegraph_search → minimal fix → local verify → commit; reviewer comments with code change OR thread reply; bot comments treated as actionable unless clearly false positive), push fixes with --force-with-lease, reply on each thread, wait for CI with CodeRabbit pass 0 Review skipped CodeRabbit pass 0 Review skipped, re-loop until done or max_rounds hit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…sher → pr-review-shepherd)
To compose skills end-to-end — e.g. github-issue-crusher opens a draft
PR then hands Phase-6 (CI + review iteration) to pr-review-shepherd —
the orchestrator needs a way to kick off another bundled skill_run as
a fresh background job. Adding that as a normal agent tool (`run_skill`)
keeps each skill narrow + composable: SKILL.md just declares the chain
in its final step; the harness has no hard-coded skill graph.
Implementation:
(1) Factor the spawn-the-run logic out of `handle_skills_run` into
`pub(crate) async fn spawn_skill_run_background(skill_id, inputs)
-> Result<SkillRunStarted, String>` in skills/schemas.rs. Same
logic (load config, build orchestrator, lifted iter cap, transcript
isolation, AgentProgress → log bridge, degenerate-response footer
check) — just hoisted so both the JSON-RPC controller AND the new
agent tool dispatch through one path. `handle_skills_run` now
just delegates and wraps the result for the wire.
(2) New tool: `tools/impl/agent/run_skill.rs` (`RunSkillTool`,
constant `RUN_SKILL_TOOL_NAME = "run_skill"`). Schema requires
`skill_id: string` + `inputs: object`. `execute` calls
`spawn_skill_run_background` and returns a small JSON with
`run_id` / `skill_id` / `log`. Pre-spawn errors (unknown
skill, missing required inputs) come back as `ToolResult::error`
so the model can correct + retry without leaking a half-spawn.
`PermissionLevel::None` — the parent is already inside an
autonomous run, gating each chained spawn would double-count.
(3) Wire-through: re-export from tools/impl/agent/mod.rs, registered
in tools/ops.rs alongside TodoTool / PlanExitTool (coding-harness
primitives), added to orchestrator/agent.toml `named` list
(so the orchestrator's function-calling schema surfaces it).
(4) github-issue-crusher/SKILL.md gets step 10: after the draft PR is
open, call `run_skill { skill_id: "pr-review-shepherd",
inputs: { repo, pr: <number> } }` and exit. The crusher returns
the shepherd's run_id in its final message; the shepherd takes
over Phase-6 in parallel.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pulls in PR tinyhumansai#2802's contributions on top of our autonomous-skills runner: bundled `dev-workflow` skill (cron-friendly autonomous developer), `cron_add` JSON-RPC controller (cron exposed as RPC, not only as agent tool), DevWorkflowPanel.tsx frontend (cron CRUD + run history + Run Now), `openhumanCronAdd` Tauri command wrapper, and 14 locale chunk-5 i18n keys. Also pulls upstream main through v0.57.0 + its tail of PRs (Memory Tree status panel + on/off toggle, claude agent SDK provider, MCP static prompt resources, openhuman:// Windows registry verify, several config / auth / inference fixes). Single content conflict in `src/openhuman/skills/registry.rs` — both sides added a second entry to DEFAULT_SKILLS. Resolved by keeping ALL THREE bundled skills: - github-issue-crusher (Phases 1-5: pick issue → edit → draft PR) - pr-review-shepherd (Phase 6: drive PR to mergeable; OUR addition) - dev-workflow (cron-driven autonomous developer; THEIRS) Everything else auto-merged. Our hardening commits are preserved intact: orchestrator/prompt.md broadening + 'never tools_agent for code-repo work', code_executor / tools_agent when_to_use tightening, slim task-only github-issue-crusher SKILL.md, codegraph-first hard rule + commit-to-edit rule in code_executor/prompt.md, degenerate- response detector in skills/run_log.rs + handle_skills_run, run_skill chaining tool. Their non-conflicting additions land alongside: DevWorkflowPanel + cron RPC + dev-workflow skill bundled together. `src/openhuman/approval/ops.rs` was deleted on upstream (refactor moved its contents elsewhere); no references remain in HEAD, so the deletion is accepted as-is. Their dev-workflow/SKILL.md is still the pre-hardening shape (mentions 'commit through the GitHub API' + no `delegate_run_code` / codegraph- first context). Slim/task-only treatment of dev-workflow + adding a chain to pr-review-shepherd at the end is a follow-up commit, not part of this merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (38)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (26)
📝 WalkthroughWalkthroughAdds unified Skills UI (create/run/dashboard), cron-backed scheduling and Tauri wrappers, background skill-run spawning and run-log streaming, skill registry with default bundled skills, codegraph indexing/search storage and agent tools, GitHub preflight checks, translations, routing, and extensive tests. ChangesUnified Skills Runner, Cron, and Codegraph
Sequence Diagram(s)sequenceDiagram
participant UI as SkillsRunnerBody / Dashboard
participant Cron as openhuman.cron_*
participant SkillsAPI as openhuman.skills_*
participant Orchestrator as orchestrator (run_skill / spawn)
participant Logs as run_log
UI->>SkillsAPI: skills.run(skill_id, inputs)
UI->>Cron: openhuman.cron_add / openhuman.cron_run / openhuman.cron_list
SkillsAPI->>Orchestrator: spawn_skill_run_background(skill_id, inputs)
Orchestrator->>Logs: write_header + drain progress
Orchestrator->>Logs: write_footer(status, output)
UI->>SkillsAPI: skills.read_run_log(run_id, offset, max_bytes) (poll)
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested reviewers
Poem
|
graycyrus
left a comment
There was a problem hiding this comment.
@M3gA-Mind hey! the code looks clean overall — good tests, parameterized SQL throughout, proper sanitization on log paths, and the debug-assertions guard on the CEF sandbox escape is exactly right. CI is still pending across the board, so holding off on the formal approval until that's green. once it passes i'll come back and approve.
One functional issue worth fixing before merge:
DevWorkflowPanel: form doesn't repopulate from existing job on mount. The old implementation read back from localStorage on mount, so if you navigated away and returned, the repo/branch/schedule dropdowns reflected the current config. This PR moves persistence to the cron backend (good), but loadExistingJob only populates existingJob — it doesn't write back to selectedRepo, targetBranch, or schedule. The result: a user who navigates to the DevWorkflow panel and sees an active cron job running will still see blank dropdowns, making it impossible to know what the current config is without digging into the raw job prompt. The controls for run/pause/delete work fine; it's only the "read back into form" path that's missing.
A few minor notes below.
| setCronLoading(true); | ||
| try { | ||
| const res = await openhumanCronList(); | ||
| // RPC returns { result: CronJob[], logs: [...] } |
There was a problem hiding this comment.
[major] loadExistingJob sets existingJob but never writes back selectedRepo, targetBranch, or schedule from the job's stored data. When a user returns to this panel with an active job, the form is blank — they can't see or edit the current configuration.
Suggestion: parse the job's prompt (or store the config fields separately in the cron job's name/tags) and restore form state on load. At minimum, consider reading existingJob.schedule.expr into the schedule dropdown so users can see the current cadence.
| const SMART_PICKER_SKILL_IDS = new Set(['dev-workflow']); | ||
| const SMART_PICKER_INPUT_NAMES = new Set(['repo', 'upstream', 'target_branch', 'fork_owner']); | ||
|
|
||
| // Input-name conventions that trigger rich pickers instead of the |
There was a problem hiding this comment.
[minor] REPO_INPUT_NAMES and BRANCH_INPUT_NAMES routing by name convention is acknowledged tech debt (TODO(picker-schema)). Fine for now, but worth filing the follow-up issue so this doesn't linger — the schema-driven picker field would also clean up the SmartIssuePicker hard-coding.
There was a problem hiding this comment.
Actionable comments posted: 17
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
🟡 Minor comments (14)
app/src/AppRoutes.tsx-85-93 (1)
85-93:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix the
/skills/newvs/skillsroute-order wording.React Router v7 ranks route matches by specificity (ranked/most-specific matching) rather than relying on
<Route>declaration order, so the comment saying “Order matters: keep/skills/newbefore/skillsso it wins the prefix match” is misleading—adjust the comment to describe ranked/specific matching instead.🤖 Prompt for 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. In `@app/src/AppRoutes.tsx` around lines 85 - 93, Update the explanatory comment in AppRoutes.tsx to remove the misleading "Order matters" claim and instead state that React Router v7 uses ranked/specific matching (most-specific routes win), so `/skills/new` wins over `/skills` due to specificity rather than declaration order; reference the two routes `/skills/new` and `/skills` and clarify that the specificity of the route pattern determines which route matches.app/src/components/settings/panels/DevWorkflowPanel.tsx-713-716 (1)
713-716:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winLocalize the hard-coded connector text in branch note.
Line 715 hard-codes
" on "inside a user-visible sentence, which bypasses translation.💡 Proposed fix
- {t('settings.devWorkflow.targetBranchNote')} - {forkInfo ? ` on ${forkInfo.upstreamFullName}` : ''}. + {forkInfo + ? t('settings.devWorkflow.targetBranchNoteWithRepo', { + repo: forkInfo.upstreamFullName, + }) + : t('settings.devWorkflow.targetBranchNote')}As per coding guidelines: “Every user-visible string in
app/src/**must useuseT()… hard-coded literals in JSX or element props are not allowed.”🤖 Prompt for 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. In `@app/src/components/settings/panels/DevWorkflowPanel.tsx` around lines 713 - 716, The hard-coded connector " on " in DevWorkflowPanel.tsx should be moved into the translation string and rendered via the t() function instead of string concatenation; replace the expression {t('settings.devWorkflow.targetBranchNote')}{forkInfo ? ` on ${forkInfo.upstreamFullName}` : ''} with a single t call that accepts a variable (e.g. t('settings.devWorkflow.targetBranchNoteWithUpstream', { upstream: forkInfo?.upstreamFullName })) or two translation keys for presence/absence, using the existing t function and the forkInfo.upstreamFullName value so the full user-visible sentence (including the connector and punctuation) is localized.app/src/components/skills/SkillsRunnerBody.tsx-537-537 (1)
537-537:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winClear the schedule success timeout on unmount (and cancel previous).
Line 537 starts a
setTimeoutthat can callsetScheduleSaved(false)after the component unmounts since there’s no correspondingclearTimeoutcleanup. Add auseReffor the timeout handle (importuseRef) and clear it in auseEffectunmount cleanup; also clear any existing timer before scheduling a new one.🤖 Prompt for 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. In `@app/src/components/skills/SkillsRunnerBody.tsx` at line 537, The setTimeout call that resets setScheduleSaved(false) can fire after unmount and multiple timers can stack; introduce a ref (e.g., scheduleSavedTimerRef via useRef<number | null>) and use it when scheduling: before calling setTimeout, clear any existing timer in scheduleSavedTimerRef, assign the new timer id to it, and then add a useEffect cleanup that clears scheduleSavedTimerRef on unmount; ensure you import useRef and useEffect and replace the direct setTimeout(...) at the site where setScheduleSaved is scheduled.app/src/components/skills/scheduledCronFormat.ts-26-29 (1)
26-29:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winHandle singular/plural and avoid
0 minutesoutput.Line 27 can round to
0, and Line 28 always uses plural ("1 minutes"). Clamp to at least 1 and pluralize correctly.Suggested fix
if (s.kind === 'every' && s.every_ms) { - const minutes = Math.round(s.every_ms / 60_000); - return `Every ${minutes} minutes`; + const minutes = Math.max(1, Math.round(s.every_ms / 60_000)); + return `Every ${minutes} ${minutes === 1 ? 'minute' : 'minutes'}`; }🤖 Prompt for 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. In `@app/src/components/skills/scheduledCronFormat.ts` around lines 26 - 29, In the branch that handles s.kind === 'every' (where minutes is computed from s.every_ms), clamp the computed minutes to at least 1 (e.g. minutes = Math.max(1, Math.round(s.every_ms / 60_000))) to avoid "0 minutes", and choose the correct singular/plural word when building the return string (use "minute" when minutes === 1, otherwise "minutes") so the return becomes "Every 1 minute" or "Every N minutes" as appropriate.app/src/lib/cron/cronToHuman.ts-54-85 (1)
54-85:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winValidate cron numeric bounds before rendering friendly text.
The parser currently treats invalid cron numbers as valid (e.g., minute
99, step0), producing misleading output instead of falling back to the raw expression.Suggested fix
+function inRange(n: number, min: number, max: number): boolean { + return Number.isInteger(n) && n >= min && n <= max; +} + const stepMin = /^\*\/(\d+)$/.exec(min); if (stepMin && hour === '*' && allDays) { const n = Number(stepMin[1]); + if (!inRange(n, 1, 59)) return e; if (n === 1) return 'Every minute'; return `Every ${n} minutes`; } @@ if (minLiteral && hour === '*' && allDays) { const m = Number(minLiteral[1]); + if (!inRange(m, 0, 59)) return e; if (m === 0) return 'Every hour'; return `Hourly at :${pad2(m)}`; } @@ if (stepHour && minLiteral && allDays) { const n = Number(stepHour[1]); const m = Number(minLiteral[1]); + if (!inRange(n, 1, 23) || !inRange(m, 0, 59)) return e; const suffix = m === 0 ? '' : ` at :${pad2(m)}`; if (n === 1) return `Every hour${suffix}`; return `Every ${n} hours${suffix}`; } @@ if (minLiteral && hourLiteral && allDays) { const h = Number(hourLiteral[1]); const m = Number(minLiteral[1]); + if (!inRange(h, 0, 23) || !inRange(m, 0, 59)) return e; return `Daily at ${pad2(h)}:${pad2(m)}`; }🤖 Prompt for 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. In `@app/src/lib/cron/cronToHuman.ts` around lines 54 - 85, The friendly-rendering branches (stepMin, minLiteral, stepHour, hourLiteral) currently accept any numeric matches; validate numeric bounds before returning by checking minute literals are 0–59, hour literals are 0–23, and step values are positive and within sensible bounds (minute step 1–59, hour step 1–23). In practice update the guards around stepMin (/^\*\/(\d+)$/), minLiteral (/^(\d+)$/), stepHour (/^\*\/(\d+)$/) and hourLiteral (/^(\d+)$/) inside cronToHuman.ts to parse the captured values (n, m, h) and only produce the human strings in those branches if the parsed numbers satisfy the ranges; otherwise fall back to returning the raw cron expression. Ensure you check both the single-value branches (minLiteral/hourLiteral) and the step branches (stepMin/stepHour) so invalid values like minute 99 or step 0 do not produce misleading text.app/src/lib/i18n/chunks/en-5.ts-838-839 (1)
838-839:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix duplicated phrase in panel description copy.
Line 839 repeats the verb phrase (“fire a fire-and-forget”), which reads as a typo in the English source string.
✏️ Suggested fix
'settings.developerMenu.skillsRunner.panelDesc': - 'Pick a bundled skill, fill in its declared inputs, and fire a fire-and-forget background run. Use Dev Workflow instead if you want a cron-scheduled recurring job.', + 'Pick a bundled skill, fill in its declared inputs, and start a fire-and-forget background run. Use Dev Workflow instead if you want a cron-scheduled recurring job.',🤖 Prompt for 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. In `@app/src/lib/i18n/chunks/en-5.ts` around lines 838 - 839, The copy for settings.developerMenu.skillsRunner.panelDesc contains a duplicated verb phrase ("fire a fire-and-forget"); update the string in en-5.ts to remove the repetition by replacing "fire a fire-and-forget background run" with a clearer phrasing such as "trigger a fire-and-forget background run" so the full value reads: "Pick a bundled skill, fill in its declared inputs, and trigger a fire-and-forget background run. Use Dev Workflow instead if you want a cron-scheduled recurring job."docs/skills-runner-unification.md-70-118 (1)
70-118:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd a language to the fenced block (markdownlint MD040).
Line 70 uses an unlabeled fenced code block; this triggers lint noise and is easy to fix.
🛠️ Suggested fix
-``` +```text /skills ├─ Library tab (existing) └─ Runners tab (existing — this is where SkillsRunnerBody lives) @@ -``` +```🤖 Prompt for 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. In `@docs/skills-runner-unification.md` around lines 70 - 118, The fenced code block showing the SkillsRunnerBody ascii UI is unlabeled (markdownlint MD040); update the opening fence to include a language like "text" (e.g., change ``` to ```text) so the block is labeled, leaving the content and the closing fence intact; the block to change contains the drawn UI and references "SkillsRunnerBody" and "/skills".src/openhuman/agent/agents/code_executor/prompt.md-32-33 (1)
32-33:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winEscape pipe characters in inline code inside table cells.
The
|characters inside backticks are being parsed as extra table separators (MD056), so the table structure is malformed.🛠️ Suggested fix
-| **Read** issues / PRs / review comments / check runs / labels / commit metadata | **Composio** | `composio_execute({ tool: "GITHUB_GET_PULL_REQUEST" | "GITHUB_LIST_REVIEW_COMMENTS" | "GITHUB_GET_COMBINED_STATUS" | "GITHUB_GET_ISSUE" | "GITHUB_LIST_ISSUES" | … })` | -| **Write** PRs / comments / reviews / labels / branch as remote ref | **Composio** | `composio_execute({ tool: "GITHUB_CREATE_PULL_REQUEST" | "GITHUB_CREATE_ISSUE_COMMENT" | "GITHUB_CREATE_REVIEW" | "GITHUB_ADD_LABELS" | … })` | +| **Read** issues / PRs / review comments / check runs / labels / commit metadata | **Composio** | `composio_execute({ tool: "GITHUB_GET_PULL_REQUEST" \| "GITHUB_LIST_REVIEW_COMMENTS" \| "GITHUB_GET_COMBINED_STATUS" \| "GITHUB_GET_ISSUE" \| "GITHUB_LIST_ISSUES" \| … })` | +| **Write** PRs / comments / reviews / labels / branch as remote ref | **Composio** | `composio_execute({ tool: "GITHUB_CREATE_PULL_REQUEST" \| "GITHUB_CREATE_ISSUE_COMMENT" \| "GITHUB_CREATE_REVIEW" \| "GITHUB_ADD_LABELS" \| … })` |🤖 Prompt for 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. In `@src/openhuman/agent/agents/code_executor/prompt.md` around lines 32 - 33, The inline code spans in the table use unescaped pipe characters which break Markdown tables (MD056); update the two composio_execute examples so any `|` inside the backtick code spans are escaped (e.g., replace `... "GITHUB_GET_PULL_REQUEST" | "GITHUB_LIST_REVIEW_COMMENTS" ...` with `... "GITHUB_GET_PULL_REQUEST"\ |\ "GITHUB_LIST_REVIEW_COMMENTS" ...`) — apply this to both rows referencing composio_execute to preserve the table cells and keep the entire command strings intact.src/openhuman/codegraph/search.rs-145-181 (1)
145-181:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winShort-circuit empty queries before ranking or embedding.
Right now
query.trim().is_empty()still produces a BM25 ranking over all-zero scores, and the dense arm will try to embed the blank string. That can return arbitrary hits in lexical mode and a provider error in dense mode.[suggested fix]
🛠️ Proposed guard
if docs.is_empty() { return Ok(SearchOutcome { hits: vec![], coverage, indexed: 0, total, }); } + if query.trim().is_empty() { + return Ok(SearchOutcome { + hits: vec![], + coverage, + indexed: docs.len(), + total, + }); + } let q_tokens = code_tokens(query);🤖 Prompt for 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. In `@src/openhuman/codegraph/search.rs` around lines 145 - 181, Detect empty queries by checking if query.trim().is_empty() immediately after computing coverage (and before calling code_tokens, bm25_rank, or embedder.embed). If empty, return Ok(SearchOutcome { hits: vec![], coverage, indexed: 0, total }) to avoid running code_tokens, bm25_rank, embedder.embed, dense_rank, or rrf and prevent spurious lexical hits or provider errors in the dense arm; update the early-return logic near the existing docs.is_empty() branch to short-circuit when the trimmed query is empty.src/openhuman/skills/defaults/github-issue-crusher/skill.toml-8-10 (1)
8-10:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix comment mismatch on push mechanism.
Line [9] says the fix is pushed “via the GitHub API,” but this skill’s workflow uses local
git pushto the fork. Please align the comment so it doesn’t conflict with the actual runbook.Suggested patch
-# (via the GitHub API — no local push creds needed), and the PR is cross-repo. +# (via local `git` push to a fork), and the PR is cross-repo.🤖 Prompt for 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. In `@src/openhuman/skills/defaults/github-issue-crusher/skill.toml` around lines 8 - 10, The comment above the skill id "github-issue-crusher" incorrectly states the fix is pushed "via the GitHub API"; update that comment to reflect the actual push mechanism used by this skill's workflow (local git push to the fork) so the runbook and header are consistent—i.e., edit the comment starting with "Fork-aware:" to mention a local `git push` to a FORK (or remove the parenthetical reference to the GitHub API) while leaving id = "github-issue-crusher" unchanged.src/openhuman/skills/registry.rs-163-164 (1)
163-164:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winDon’t silently ignore default-skill write failures.
seed_default_skillscurrently dropsstd::fs::writeerrors, which obscures partial-seed failures and complicates debugging.🧩 Suggested fix
- let _ = std::fs::write(dir.join("skill.toml"), skill_toml); - let _ = std::fs::write(dir.join("SKILL.md"), skill_md); + if let Err(e) = std::fs::write(dir.join("skill.toml"), skill_toml) { + log::warn!("[skills] seed {id}: write skill.toml failed: {e}"); + continue; + } + if let Err(e) = std::fs::write(dir.join("SKILL.md"), skill_md) { + log::warn!("[skills] seed {id}: write SKILL.md failed: {e}"); + continue; + }🤖 Prompt for 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. In `@src/openhuman/skills/registry.rs` around lines 163 - 164, In seed_default_skills do not ignore std::fs::write errors for dir.join("skill.toml") and dir.join("SKILL.md"); instead propagate or handle them — update seed_default_skills to return a Result and replace the `let _ = std::fs::write(...)` calls with fallible writes (use the ? operator or map errors into a descriptive error) so failures surface to the caller (or log the error with context including the filename and skill name) and ensure both writes are validated before considering the seed successful.src/openhuman/skills/run_log.rs-359-366 (1)
359-366:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winResolve
run_idby exact header match, not only 8-char filename prefix.Prefix-only matching can return the wrong log if two run IDs share the same first 8 chars.
🔎 Suggested hardening
- let short = run_id.get(..8).unwrap_or(run_id); - if name.contains(&format!("_{short}.log")) { - return Some(path); + let short = run_id.get(..8).unwrap_or(run_id); + if name.contains(&format!("_{short}.log")) { + if let Ok(text) = std::fs::read_to_string(&path) { + if text + .lines() + .find_map(|l| l.strip_prefix("run_id :").map(str::trim)) + == Some(run_id) + { + return Some(path); + } + } }🤖 Prompt for 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. In `@src/openhuman/skills/run_log.rs` around lines 359 - 366, The current filename-prefix check using short = run_id.get(..8) can return wrong logs when run IDs share the first 8 chars; change the logic so after the filename match (name.contains(&format!("_{short}.log"))), open the candidate file (path), read its header/metadata to extract the full run id stored in the log (the same header field used elsewhere to identify runs), and only return Some(path) if that header run id equals the provided run_id; otherwise continue searching. Target the block using variables run_id, short, name, and path in this file (run_log.rs) and ensure file reads handle errors gracefully and close files.src/openhuman/tools/impl/agent/run_skill.rs-79-89 (1)
79-89:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winValidate
inputsas a required object at runtime.The schema marks
inputsas required/object, but execution currently forwards any value (or missing key) downstream. Add a local guard so callers get a deterministic tool-level error instead of a deeper spawn failure.Suggested fix
- let inputs = args.get("inputs").cloned(); + let inputs = match args.get("inputs") { + Some(v) if v.is_object() => Some(v.clone()), + _ => { + return Ok(ToolResult::error( + "run_skill: missing required argument `inputs` (object)", + )); + } + };Also applies to: 111-113
src/openhuman/tools/impl/codegraph/mod.rs-23-24 (1)
23-24:⚠️ Potential issue | 🟡 Minor | ⚡ Quick win
auto_modethreshold is off by one vs its own contract.Comment says dense indexing should start at/above the threshold, but the code currently requires strictly greater than (
>).Suggested fix
- Ok(n) if n > dense_min_files() => IndexMode::Dense, + Ok(n) if n >= dense_min_files() => IndexMode::Dense,Also applies to: 37-38
🤖 Prompt for 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. In `@src/openhuman/tools/impl/codegraph/mod.rs` around lines 23 - 24, The auto_mode threshold check is off-by-one: adjust the comparison(s) that currently use '>' to use '>=' so that dense indexing starts at or above the threshold per the comment; specifically update the conditional(s) in the codepath that reference auto_mode (the comparison near the comment at the top and the similar check around lines 37-38) to use >= against the same threshold variable so the contract ("at/above") is honored.
🧹 Nitpick comments (10)
app/src/components/skills/SkillsRunnerBody.tsx (1)
351-368: ⚡ Quick winUse
async/awaitin effect-side async flows for consistency.This promise-chain style is repeated in the file; prefer
async/awaitwithtry/catch/finallyfor consistency with repo conventions.As per coding guidelines: "Always use async/await for promises in JavaScript/TypeScript code (Rust uses async with tokio; respect language conventions)".
🤖 Prompt for 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. In `@app/src/components/skills/SkillsRunnerBody.tsx` around lines 351 - 368, Replace the promise .then/.catch/.finally chain for skillsApi.listSkills() with an async function using try/catch/finally: call await skillsApi.listSkills(), check the cancelled flag after await, filter out the 'codegraph-smoke' skill and call setSkills(filtered) and log the loaded count, in catch build the error message (err instanceof Error ? err.message : String(err)) and call log(...) and setSkillsError(msg), and in finally unset loading with setSkillsLoading(false) only if not cancelled; reference the existing symbols skillsApi.listSkills, setSkills, setSkillsError, setSkillsLoading, cancelled, and log when making the change.src/core/jsonrpc.rs (1)
1367-1370: ⚡ Quick winAdd explicit
[boot][skills]diagnostics around default-skill seeding.This startup path is new, but there’s no callsite-level debug trace around seed execution. Adding stable boot logs here improves startup correlation when seeding is slow or fails silently.
🧭 Suggested instrumentation
+ log::debug!( + "[boot][skills] seeding default skills (workspace={})", + cfg.workspace_dir.display() + ); crate::openhuman::skills::registry::seed_default_skills(&cfg.workspace_dir); + log::debug!("[boot][skills] default skills seed complete");As per coding guidelines, “Rust code: use
log/tracingcrate for logging atdebugortracelevel; add substantial, development-oriented logs on new/changed flows … with stable prefixes.”🤖 Prompt for 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. In `@src/core/jsonrpc.rs` around lines 1367 - 1370, Add explicit trace/debug instrumentation around the call to crate::openhuman::skills::registry::seed_default_skills: before calling it emit a trace/debug log with a stable prefix like "[boot][skills] starting seed_default_skills" (include the workspace path from cfg.workspace_dir), then measure elapsed time and after the call emit another trace/debug log "[boot][skills] finished seed_default_skills" with the duration; if the call returns a Result or can error, log the error at debug/error level with the same "[boot][skills]" prefix and include error details to aid correlation. Ensure you use the project logging crate (tracing::debug/trace or log::debug) and place these logs immediately around the existing seed_default_skills invocation in the code path.app/src/pages/Skills.tsx (1)
953-963: 🏗️ Heavy liftSplit
Skills.tsxbefore adding more tab-specific surface.This file is already far beyond the module-size target, and this new Runners panel adds more page-level branching/state into the same component. Please extract tab panels into dedicated components to keep this file maintainable and aligned with repo constraints.
As per coding guidelines, “
{src,app/src,app/src-tauri}/**/*.{rs,ts,tsx}: File size: prefer ≤ ~500 lines per source file; split modules when growing to maintain readability and single responsibility.”🤖 Prompt for 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. In `@app/src/pages/Skills.tsx` around lines 953 - 963, The Skills.tsx file is growing too large and the new "runners" tab adds more page-level branching; extract the runners panel into its own component to reduce module size and improve single responsibility. Create a new React component (e.g., RunnersPanel) that contains the markup currently rendered when activeTab === 'runners' (the div wrapper, comment/notes, and <SkillsDashboard /> usage), export it and replace the in-file JSX with <RunnersPanel /> (or dynamically import it) inside Skills.tsx where activeTab and the 'runners' branch are checked; ensure the new component receives any required props or reads shared context/state the same way (e.g., the activeTab prop or parent context) so behavior is unchanged and file length for Skills.tsx is reduced.src/openhuman/agent/harness/subagent_runner/ops.rs (1)
1233-1239: ⚡ Quick winAdd debug diagnostics when autonomous cap changes iteration budget.
This new cap-merge branch should log the original limit, autonomous cap, and effective limit so budget changes are traceable during skill-run debugging.
🛠️ Suggested fix
- let max_iterations = super::autonomous::autonomous_iter_cap() - .map(|cap| cap.max(max_iterations)) - .unwrap_or(max_iterations) - .max(1); + let configured_max_iterations = max_iterations.max(1); + let max_iterations = if let Some(cap) = super::autonomous::autonomous_iter_cap() { + let effective = cap.max(configured_max_iterations); + tracing::debug!( + agent_id = %agent_id, + autonomous_cap = cap, + configured_max_iterations, + effective_max_iterations = effective, + "[subagent_runner] applied autonomous iteration cap" + ); + effective + } else { + configured_max_iterations + };As per coding guidelines: "Rust code: use
log/tracingcrate for logging atdebugortracelevel; add substantial, development-oriented logs on new/changed flows at entry/exit points, branch decisions, external calls, retries/timeouts, state transitions, and error paths."🤖 Prompt for 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. In `@src/openhuman/agent/harness/subagent_runner/ops.rs` around lines 1233 - 1239, Compute and log the autonomous cap merge decision around the max_iterations calculation: capture the original iteration budget (e.g., bind original_max = max_iterations), call super::autonomous::autonomous_iter_cap() into a variable (e.g., autonomous_cap_opt), compute the resulting effective limit as you already do, and emit a debug/trace log (using tracing::debug! or log::debug!) that reports original_max, the autonomous_cap (or "None"), and the effective limit; only log when autonomous_cap_opt.is_some() or when the effective limit differs from original_max to avoid noise, and place this immediately before/after computing max_iterations in ops.rs so the branch decision is traceable.src/openhuman/codegraph/index.rs (2)
241-359: ⚡ Quick winAdd phase-level tracing to
index_ref.This new indexing path has several important branches (
cached,skipped, embed batches, manifest rewrite), but there’s no structured debug output to explain why a ref ended up partial or slow. A few stable[codegraph]debugevents around phase entry/exit and batch counts would make this much easier to operate.As per coding guidelines,
src/**/*.rs: Rust code should uselog/tracingatdebugortracelevel on new/changed flows with grep-friendly context at entry/exit points, branch decisions, external calls, and error paths.🤖 Prompt for 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. In `@src/openhuman/codegraph/index.rs` around lines 241 - 359, Add structured debug/tracing calls in index_ref to mark phase boundaries and key branch decisions: log at debug the function entry with repo_id and git_ref, Phase 1 start with total blobs and counts as you loop, and for each skipped/cached increment (from store.has_blob, file size check, read_to_string) emit a debug line identifying sha/path and reason; log Phase 2 start with pend_docs.len()/pend_sha.len() and each embedder.batch call (include chunk size and model via mode.model_key/embedder) plus any mismatch error before bailing; log Phase 3 start before store.put_blobs and after set_manifest including computed/cached/skipped totals; use the tracing/log crate macros (debug/trace) so messages are grep-friendly (e.g., prefix “[codegraph]”) and reference functions/vars like index_ref, IndexMode, pend_docs, pend_sha, embedder, store, put_blobs, set_manifest.
361-829: 🏗️ Heavy liftSplit the benchmark/live-test bulk out of
index.rs.The production indexing code is now sharing one file with test fakes, ignored benchmarks, and live cloud probes, which pushes this new module well past the repo’s size target. Moving the long test/probe sections into sibling test modules would keep the runtime path much easier to navigate.
As per coding guidelines,
**/*.{ts,tsx,rs}: Keep React component files and Rust modules at ≤ ~500 lines; split growing modules into multiple files.🤖 Prompt for 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. In `@src/openhuman/codegraph/index.rs` around lines 361 - 829, The file index.rs contains a very large #[cfg(test)] tests module (including FakeEmbedder, StrictEmbedder, NoEmbed, BenchEmbedder, cloud_embed_probe, index_e2e_cloud, bench_index_speed, and many integration tests) which pushes the module past the size guideline; extract these test structs and long ignored benchmarks/probes into one or more sibling test modules/files (e.g., create tests/codegraph_fakes.rs and tests/codegraph_bench.rs or similar) and left a small, focused #[cfg(test)] mod in index.rs that re-exports or references the new test modules; move the FakeEmbedder, StrictEmbedder, NoEmbed, BenchEmbedder, and the long tokio::test functions (index_ref_is_content_addressed_and_incremental, index_ref_never_embeds_empty_doc, lexical_mode_indexes_and_searches_without_embedding, bench_index_speed, cloud_embed_probe, index_e2e_cloud) out of index.rs, update mod declarations so tests compile, and ensure functions that reference CodegraphStore, index_ref, search_ref, and EmbeddingProvider keep the same names/signatures so callers need no changes.src/openhuman/skills/defaults/dev-workflow/SKILL.md (1)
18-137: ⚡ Quick winAdd language identifiers to fenced code blocks.
Lines [18-137] include multiple unlabeled fenced blocks. Please annotate them (for example,
jsonforcomposio_execute(...)payloads andbashfor git commands) to clear MD040 warnings and improve rendering.🤖 Prompt for 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. In `@src/openhuman/skills/defaults/dev-workflow/SKILL.md` around lines 18 - 137, The markdown contains unlabeled fenced code blocks (notably the composio_execute payload examples and the git commands such as the git clone / git -C checkout snippets and the composio_execute blocks for GITHUB_CREATE_A_BLOB / TREE / COMMIT / UPDATE_A_REFERENCE / CREATE_A_PULL_REQUEST), which triggers MD040; edit SKILL.md to add appropriate language identifiers to each fence (e.g., use json for composio_execute payloads and bash for shell/git snippets) so every ``` block becomes ```json or ```bash as appropriate, keeping the existing content unchanged.src/openhuman/skills/defaults/pr-review-shepherd/SKILL.md (1)
20-126: ⚡ Quick winLabel fenced code blocks with languages.
Lines [20-126] include several unlabeled fenced blocks. Adding language tags (
json,bash) will resolve MD040 warnings and improve copy/paste clarity.🤖 Prompt for 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. In `@src/openhuman/skills/defaults/pr-review-shepherd/SKILL.md` around lines 20 - 126, The markdown in SKILL.md contains unlabeled fenced code blocks (the composio_execute JSON call blocks and the git/bash snippets such as the composio_execute({...}) sequences and the git clone/git -C ... examples); fix by adding appropriate language tags to each fenced block (e.g., ```json for composio_execute JSON blocks and ```bash for shell/git snippets) so linters stop flagging MD040 and copy/paste behavior is improved.src/openhuman/skills/defaults/github-issue-crusher/SKILL.md (1)
13-95: ⚡ Quick winSpecify fence languages for command examples.
Lines [13-95] contain unlabeled fenced blocks. Please mark them (
json,bash, etc.) to satisfy markdownlint MD040 and keep examples easier to scan.🤖 Prompt for 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. In `@src/openhuman/skills/defaults/github-issue-crusher/SKILL.md` around lines 13 - 95, The markdown in SKILL.md has unlabeled fenced code blocks (the composio_execute JSON examples and the shell/git snippets) which trigger markdownlint MD040; update each triple-backtick fence in the section containing the composio_execute calls and the git/CLI examples to include an explicit language tag (e.g., json for composio_execute blocks and bash/sh for shell/git commands) so the examples are properly highlighted and lint-clean; look for occurrences of composio_execute({ ... }) and the git clone/config/checkout snippets and add the appropriate fence language labels around those blocks.src/openhuman/embeddings/rpc.rs (1)
384-402: ⚡ Quick winAdd debug diagnostics to the new provider-construction path.
Lines [384-402] introduce a cross-domain helper with no trace/debug instrumentation. Please log entry/exit context (
provider,model,dims, custom endpoint presence) to match existing observability standards.Suggested patch
pub fn provider_from_config(config: &Config) -> anyhow::Result<Box<dyn super::EmbeddingProvider>> { let provider_name = &config.memory.embedding_provider; let model = &config.memory.embedding_model; let dims = config.memory.embedding_dimensions; let api_key = resolve_api_key(config, provider_name); let custom_endpoint = provider_name.strip_prefix("custom:").map(|s| s.to_string()); let provider_slug = if provider_name.starts_with("custom:") { "custom" } else { provider_name.as_str() }; - create_embedding_provider_with_credentials( + tracing::debug!( + provider = provider_slug, + model = model.as_str(), + dims, + has_custom_endpoint = custom_endpoint.is_some(), + "{LOG_PREFIX} provider_from_config start" + ); + let provider = create_embedding_provider_with_credentials( provider_slug, model, dims, &api_key, custom_endpoint.as_deref(), - ) + )?; + tracing::debug!( + provider = provider_slug, + model = model.as_str(), + dims, + "{LOG_PREFIX} provider_from_config ready" + ); + Ok(provider) }As per coding guidelines: “Rust code: use
log/tracingcrate for logging atdebugortracelevel; add substantial, development-oriented logs on new/changed flows…”.🤖 Prompt for 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. In `@src/openhuman/embeddings/rpc.rs` around lines 384 - 402, Add debug/tracing instrumentation to provider_from_config: at function entry emit a debug/trace log that includes provider_name, model, dims, whether custom_endpoint is Some (but not the raw API key), and the resolved provider_slug; after calling create_embedding_provider_with_credentials emit a debug/trace log indicating success or include the error on failure. Use the tracing/log crate consistent with project usage, call resolve_api_key only as now but ensure the API key is never logged, and reference provider_from_config, resolve_api_key, create_embedding_provider_with_credentials, and the local variables provider_name, model, dims, custom_endpoint, provider_slug when adding the logs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 280c4acd-dcef-420f-84a5-03038c6d683a
📒 Files selected for processing (87)
.claude/memory.mdapp/src-tauri/src/lib.rsapp/src/AppRoutes.tsxapp/src/components/settings/panels/DevWorkflowPanel.tsxapp/src/components/settings/panels/DeveloperOptionsPanel.tsxapp/src/components/settings/panels/SkillsRunnerPanel.tsxapp/src/components/settings/panels/__tests__/DevWorkflowPanel.test.tsxapp/src/components/skills/CreateSkillForm.tsxapp/src/components/skills/CreateSkillModal.tsxapp/src/components/skills/ScheduledCronCard.test.tsxapp/src/components/skills/ScheduledCronCard.tsxapp/src/components/skills/SkillsRunnerBody.tsxapp/src/components/skills/SmartIssuePicker.tsxapp/src/components/skills/__tests__/CreateSkillForm.test.tsxapp/src/components/skills/__tests__/CreateSkillModal.test.tsxapp/src/components/skills/__tests__/SkillsRunnerBody.test.tsxapp/src/components/skills/inputs/BranchPicker.tsxapp/src/components/skills/inputs/RepoPicker.tsxapp/src/components/skills/preflightGate.test.tsapp/src/components/skills/preflightGate.tsapp/src/components/skills/scheduledCronFormat.tsapp/src/lib/cron/cronToHuman.test.tsapp/src/lib/cron/cronToHuman.tsapp/src/lib/i18n/chunks/ar-5.tsapp/src/lib/i18n/chunks/bn-5.tsapp/src/lib/i18n/chunks/de-5.tsapp/src/lib/i18n/chunks/en-5.tsapp/src/lib/i18n/chunks/es-5.tsapp/src/lib/i18n/chunks/fr-5.tsapp/src/lib/i18n/chunks/hi-5.tsapp/src/lib/i18n/chunks/id-5.tsapp/src/lib/i18n/chunks/it-5.tsapp/src/lib/i18n/chunks/ko-5.tsapp/src/lib/i18n/chunks/pl-5.tsapp/src/lib/i18n/chunks/pt-5.tsapp/src/lib/i18n/chunks/ru-5.tsapp/src/lib/i18n/chunks/zh-CN-5.tsapp/src/lib/i18n/en.tsapp/src/pages/Settings.tsxapp/src/pages/SkillNew.test.tsxapp/src/pages/SkillNew.tsxapp/src/pages/Skills.tsxapp/src/pages/SkillsDashboard.test.tsxapp/src/pages/SkillsDashboard.tsxapp/src/pages/SkillsRun.tsxapp/src/services/api/skillsApi.tsapp/src/utils/tauriCommands/cron.tsdocs/skills-runner-unification.mdsrc/core/jsonrpc.rssrc/openhuman/agent/agents/code_executor/agent.tomlsrc/openhuman/agent/agents/code_executor/prompt.mdsrc/openhuman/agent/agents/orchestrator/agent.tomlsrc/openhuman/agent/agents/orchestrator/prompt.mdsrc/openhuman/agent/agents/tools_agent/agent.tomlsrc/openhuman/agent/harness/subagent_runner/autonomous.rssrc/openhuman/agent/harness/subagent_runner/mod.rssrc/openhuman/agent/harness/subagent_runner/ops.rssrc/openhuman/codegraph/index.rssrc/openhuman/codegraph/mod.rssrc/openhuman/codegraph/search.rssrc/openhuman/codegraph/store.rssrc/openhuman/composio/identity.rssrc/openhuman/composio/mod.rssrc/openhuman/cron/schemas.rssrc/openhuman/embeddings/mod.rssrc/openhuman/embeddings/rpc.rssrc/openhuman/mod.rssrc/openhuman/skills/defaults/dev-workflow/SKILL.mdsrc/openhuman/skills/defaults/dev-workflow/skill.tomlsrc/openhuman/skills/defaults/github-issue-crusher/SKILL.mdsrc/openhuman/skills/defaults/github-issue-crusher/skill.tomlsrc/openhuman/skills/defaults/pr-review-shepherd/SKILL.mdsrc/openhuman/skills/defaults/pr-review-shepherd/skill.tomlsrc/openhuman/skills/mod.rssrc/openhuman/skills/ops.rssrc/openhuman/skills/ops_create.rssrc/openhuman/skills/ops_tests.rssrc/openhuman/skills/preflight.rssrc/openhuman/skills/registry.rssrc/openhuman/skills/run_log.rssrc/openhuman/skills/schemas.rssrc/openhuman/tools/impl/agent/mod.rssrc/openhuman/tools/impl/agent/run_skill.rssrc/openhuman/tools/impl/codegraph/mod.rssrc/openhuman/tools/impl/mod.rssrc/openhuman/tools/impl/network/url_guard.rssrc/openhuman/tools/ops.rs
Adds Vitest tests for components and utilities that had 0% diff coverage, bringing the overall diff coverage above the 80% gate: - SkillsRun.test.tsx — page render + back-button + SkillsRunnerBody mount - SkillsRunnerPanel.test.tsx — settings panel render - BranchPicker.test.tsx — no-repo disabled state, repo prop, disabled prop - RepoPicker.test.tsx — render, disabled, id forwarding - SmartIssuePicker.test.tsx — render, no-connection, with-repos, error handling - skillsApi.test.ts — describeSkill, runSkill, recentRuns RPC wrappers - cron.test.ts — openhumanCronRun and openhumanCronRuns isTauri guards + RPC calls
graycyrus
left a comment
There was a problem hiding this comment.
@M3gA-Mind / @sanil-23 — CI is still failing on this push. The step that's tripping is Prettier formatting on the new test files added in the last two commits (SkillsRunnerPanel.test.tsx, SmartIssuePicker.test.tsx, BranchPicker.test.tsx, RepoPicker.test.tsx, SkillsRun.test.tsx, skillsApi.test.ts, cron.test.ts). Run pnpm prettier --write on those and push again.
Also flagging that the major issue from my last review is still open:
The loadExistingJob function in DevWorkflowPanel.tsx sets existingJob but never writes back selectedRepo, targetBranch, or schedule from the stored job data. Users who return to this panel with an active cron job see a blank form — there's no way to inspect or edit the current configuration without nuking and recreating it. That regression needs to be fixed before this merges.
Fix the Prettier failures and the DevWorkflowPanel form state restoration, and I'll do a full pass.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/src/components/skills/SmartIssuePicker.test.tsx (1)
31-69: ⚡ Quick winScenario tests are too weak for the behaviors they claim.
These cases currently all pass on
comboboxpresence, so they don’t prove empty-state, active-connection repo loading, or graceful error handling behavior. Please assert the scenario outputs (e.g., loaded repo options, empty-state text, or thatexecutewas/wasn’t called as expected).🤖 Prompt for 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. In `@app/src/components/skills/SmartIssuePicker.test.tsx` around lines 31 - 69, Update the SmartIssuePicker.test.tsx assertions to verify specific scenario outputs rather than only combobox presence: in the "shows loading and then empty state" test assert that mockListConnections resolves to no connections and the component displays the empty-state text or specific option like "No repositories found" after render; in "renders repos when GitHub connection is active" assert mockExecute is called (mockExecute) and that the repo option "testuser/myrepo" (or a rendered option element) appears in the dropdown/options list; in "pre-selects repo from values prop" assert the combobox value or selected option equals "owner/repo"; and in "handles listConnections error gracefully" assert mockExecute was not called and the UI shows the expected error or fallback empty-state indicator. Use the existing mocks mockListConnections and mockExecute and the component SmartIssuePicker to locate the tests and update only the expect(...) assertions accordingly.
🤖 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 `@app/src/components/skills/inputs/BranchPicker.test.tsx`:
- Around line 27-31: Test "reflects a pre-selected value" currently only checks
the combobox exists; update it to assert the selected branch is actually "main".
After rendering BranchPicker with value="main" (using baseProps and
repo="owner/repo"), get the combobox via screen.findByRole('combobox') and
assert its value (e.g., expect(select).toHaveValue('main') or verify the option
for "main" is selected) so the test fails if the preselection is ignored.
---
Nitpick comments:
In `@app/src/components/skills/SmartIssuePicker.test.tsx`:
- Around line 31-69: Update the SmartIssuePicker.test.tsx assertions to verify
specific scenario outputs rather than only combobox presence: in the "shows
loading and then empty state" test assert that mockListConnections resolves to
no connections and the component displays the empty-state text or specific
option like "No repositories found" after render; in "renders repos when GitHub
connection is active" assert mockExecute is called (mockExecute) and that the
repo option "testuser/myrepo" (or a rendered option element) appears in the
dropdown/options list; in "pre-selects repo from values prop" assert the
combobox value or selected option equals "owner/repo"; and in "handles
listConnections error gracefully" assert mockExecute was not called and the UI
shows the expected error or fallback empty-state indicator. Use the existing
mocks mockListConnections and mockExecute and the component SmartIssuePicker to
locate the tests and update only the expect(...) assertions accordingly.
🪄 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: CHILL
Plan: Pro
Run ID: 1f66f95e-86e2-40ec-8cf9-116456baf7af
📒 Files selected for processing (7)
app/src/components/settings/panels/SkillsRunnerPanel.test.tsxapp/src/components/skills/SmartIssuePicker.test.tsxapp/src/components/skills/inputs/BranchPicker.test.tsxapp/src/components/skills/inputs/RepoPicker.test.tsxapp/src/pages/SkillsRun.test.tsxapp/src/services/api/skillsApi.test.tsapp/src/utils/tauriCommands/cron.test.ts
…, cron_add, readRunLog, back-button - BranchPicker: add tests for branch-loading (success, empty fallback, API error, malformed repo) - RepoPicker: add tests for repo-loading (success, no-connection, API failure, empty list) - cron.test.ts: add openhumanCronAdd isTauri guard + RPC call test - skillsApi.test.ts: add readRunLog tests (basic call, offset/max_bytes params) - SkillsRun.test.tsx: add back-button click test to cover onClick handler (line 36) - Fix Prettier formatting in skillsApi.test.ts and cron.test.ts
graycyrus
left a comment
There was a problem hiding this comment.
@M3gA-Mind (and @sanil-23) — still a couple of things blocking this:
Two new test commits since last look. The expanded BranchPicker/RepoPicker async paths and SkillsRun back-button test are good additions. But CI is now failing at TypeScript type check — the previous blocker was a Prettier format issue, now tsc itself is erroring before Prettier even runs. That's a regression from the test commits. Run pnpm tsc --noEmit locally and fix whatever the new test files introduced.
The major issue from Review 1 is still open: loadExistingJob in DevWorkflowPanel populates existingJob state but never writes back selectedRepo, targetBranch, or schedule from the stored job data. Users who return to the panel with an active cron job see a blank form. That needs to be fixed before this ships.
Once tsc is clean and the form-restore is fixed, I'll approve.
…icker repos + skillsApi.createSkill
- SkillsRunnerBody: 3 new Run Now tests — disabled-when-empty, happy-path
runSkill call, error surface on rejection (covers buildInputsPayload,
handleRun lines 432-452, missingRequired computation 415-429)
- CreateSkillModal: close-button test covers onClick lines 111-114
- SmartIssuePicker: improved repo-loaded test covers lines 96-115
- skillsApi: createSkill with inputs covers line 248 (conditional inputs spread)
- cron.test.ts: fix CronAddParams type (schedule:{kind,expr} not expression)
There was a problem hiding this comment.
🧹 Nitpick comments (2)
app/src/components/skills/inputs/BranchPicker.test.tsx (1)
27-33: ⚡ Quick winVerify branches are actually displayed, not just that the API was called.
The test title claims it "loads and displays branches," but it only asserts
mockExecutewas called. This doesn't verify the branches appear in the UI or that users can interact with them.Suggested enhancement
it('loads and displays branches when repo is set', async () => { render(<BranchPicker {...baseProps} repo="owner/repo" />); - await waitFor(() => { - expect(screen.getByRole('combobox')).toBeInTheDocument(); - }); expect(mockExecute).toHaveBeenCalled(); + // Verify branches are actually available/rendered + const select = await screen.findByRole('combobox'); + expect(select).not.toBeDisabled(); });🤖 Prompt for 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. In `@app/src/components/skills/inputs/BranchPicker.test.tsx` around lines 27 - 33, The test "loads and displays branches when repo is set" currently only asserts that mockExecute was called; update it to also verify UI rendering and interactivity by checking that the fetched branch names are present in the DOM and selectable. After rendering <BranchPicker {...baseProps} repo="owner/repo" /> and awaiting the combobox (getByRole('combobox')), assert that specific branch text nodes returned by the mocked API (e.g., "main" or other fixture branch names) are rendered (getByText / queryByText) and simulate/select one to ensure user interaction works; retain the mockExecute assertion to ensure the API was invoked. Include references to BranchPicker, mockExecute, and the combobox role in the updated assertions.app/src/components/skills/__tests__/SkillsRunnerBody.test.tsx (1)
1-618: ⚖️ Poor tradeoffConsider splitting this test file as it grows beyond 618 lines.
The test suite is well-organized with five distinct test suites, but exceeds the ~500 line guideline. As the component evolves, consider splitting into focused test files (e.g.,
SkillsRunnerBody.toggle.test.tsx,SkillsRunnerBody.history.test.tsx, etc.) to maintain readability.As per coding guidelines:
**/*.{ts,tsx,rs}: Keep React component files and Rust modules at ≤ ~500 lines; split growing modules into multiple files🤖 Prompt for 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. In `@app/src/components/skills/__tests__/SkillsRunnerBody.test.tsx` around lines 1 - 618, The test file has grown past the ~500 line guideline and should be split into smaller, focused test files; extract related describe blocks into separate files (e.g., the "saved-schedule toggle" suite, the "per-job history viewer" suite, the "SmartIssuePicker conditional mount" suite, the "URL ?skill= preselect" suite, and the "Run Now flow" suite). Create new test modules that each import the helper utilities used here (importBody, renderBody, hoisted mocks, stableT) or refactor those helpers into a shared test-utils file, then move the corresponding describe(...) blocks (search for describe('SkillsRunnerBody — saved-schedule toggle', describe('SkillsRunnerBody — per-job history viewer', describe('SkillsRunnerBody — SmartIssuePicker conditional mount', describe('SkillsRunnerBody — URL ?skill= preselect', and describe('SkillsRunnerBody — Run Now flow')) into their own files and update imports accordingly so each new file remains under ~500 lines.
🤖 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.
Nitpick comments:
In `@app/src/components/skills/__tests__/SkillsRunnerBody.test.tsx`:
- Around line 1-618: The test file has grown past the ~500 line guideline and
should be split into smaller, focused test files; extract related describe
blocks into separate files (e.g., the "saved-schedule toggle" suite, the
"per-job history viewer" suite, the "SmartIssuePicker conditional mount" suite,
the "URL ?skill= preselect" suite, and the "Run Now flow" suite). Create new
test modules that each import the helper utilities used here (importBody,
renderBody, hoisted mocks, stableT) or refactor those helpers into a shared
test-utils file, then move the corresponding describe(...) blocks (search for
describe('SkillsRunnerBody — saved-schedule toggle', describe('SkillsRunnerBody
— per-job history viewer', describe('SkillsRunnerBody — SmartIssuePicker
conditional mount', describe('SkillsRunnerBody — URL ?skill= preselect', and
describe('SkillsRunnerBody — Run Now flow')) into their own files and update
imports accordingly so each new file remains under ~500 lines.
In `@app/src/components/skills/inputs/BranchPicker.test.tsx`:
- Around line 27-33: The test "loads and displays branches when repo is set"
currently only asserts that mockExecute was called; update it to also verify UI
rendering and interactivity by checking that the fetched branch names are
present in the DOM and selectable. After rendering <BranchPicker {...baseProps}
repo="owner/repo" /> and awaiting the combobox (getByRole('combobox')), assert
that specific branch text nodes returned by the mocked API (e.g., "main" or
other fixture branch names) are rendered (getByText / queryByText) and
simulate/select one to ensure user interaction works; retain the mockExecute
assertion to ensure the API was invoked. Include references to BranchPicker,
mockExecute, and the combobox role in the updated assertions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 21c49661-953f-4039-b0cd-9e164643fdab
📒 Files selected for processing (8)
app/src/components/skills/SmartIssuePicker.test.tsxapp/src/components/skills/__tests__/CreateSkillModal.test.tsxapp/src/components/skills/__tests__/SkillsRunnerBody.test.tsxapp/src/components/skills/inputs/BranchPicker.test.tsxapp/src/components/skills/inputs/RepoPicker.test.tsxapp/src/pages/SkillsRun.test.tsxapp/src/services/api/skillsApi.test.tsapp/src/utils/tauriCommands/cron.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- app/src/pages/SkillsRun.test.tsx
- app/src/components/skills/SmartIssuePicker.test.tsx
graycyrus
left a comment
There was a problem hiding this comment.
@M3gA-Mind the new test commits look good — coverage is expanding in the right places. But the two blockers from my first review are still standing:
-
The
DevWorkflowPanelform state regression (my inline thread on line 93) —loadExistingJobsetsexistingJobbut never writes backselectedRepo,targetBranch, orschedule. Users navigating back to that panel see a blank form even with an active cron job. This needs to be fixed before we can ship. -
CI is still pending across several checks (Rust tests, Frontend unit tests, Rust quality, build jobs). Nothing's failing, but I need everything green before I can approve.
Fix the form state issue and let CI finish, and I'll get this over the line.
session_tests and pipeline_tests each declared their own static TEST_MUTEX but both mutate the process-global ACTIVE_SESSION. Tests run in parallel across modules, so a reset/transition in one module could race a transition in the other — e.g. text_turn_cancellation_returns_cancelled set Listening, then observed Idle mid-turn and panicked on 'idle -> thinking'. Introduce a single process-wide lock_test_state() in session.rs and use it from both test modules so all tests touching session state serialize.
…id a11y - CreateSkillForm: clear submitting in a finally so the form re-enables on success, not only on error (addresses @coderabbitai CreateSkillForm.tsx:216) - BranchPicker: guard loadBranches with a request-seq ref so a stale GITHUB_LIST_BRANCHES response can't overwrite current-repo state; assert the preselected value in the test (addresses @coderabbitai BranchPicker.tsx:106, BranchPicker.test.tsx:31) - SmartIssuePicker: guard onRepoSelect with a selection-seq ref so superseded repo selections can't overwrite forkInfo/branches/onPatchInputs (addresses @coderabbitai SmartIssuePicker.tsx:229) - SkillsRunnerBody: read live viewer offset via a ref in the tail-poll interval to avoid duplicate log slices; clear the scheduleSaved timeout on unmount (addresses @coderabbitai SkillsRunnerBody.tsx:616) - ScheduledCronCard: render the clickable card as a div[role=button] with keyboard handlers instead of a button, removing invalid nested buttons (addresses @coderabbitai ScheduledCronCard.tsx:248)
…date-path test - loadExistingJob now restores schedule (from schedule.expr/expression), selectedRepo (decoded from the dev-workflow-<owner>-<repo> job name), and targetBranch (parsed from the job prompt), guarded for undefined, with a debug log of what was restored (addresses @graycyrus DevWorkflowPanel.tsx:93) - rename the misleading remove-path test and add real negative assertions (cronUpdate/cronAdd not called), plus a genuine update-path test that toggles an existing job and asserts cronUpdate (not cronAdd) (addresses @coderabbitai DevWorkflowPanel.test.tsx:941)
…n, timeouts, path confinement - composio/identity: stop logging the resolved username (PII); log a redacted marker instead (addresses @coderabbitai identity.rs:99) - cron/schemas: validate cron.add inputs instead of silently coercing — reject unknown session_target/job_type, propagate delivery parse errors, require a prompt for agent jobs (addresses @coderabbitai cron/schemas.rs:347) - skills/ops_create: validate [[inputs]] server-side (trim, reject empty, reject case-insensitive duplicates) before writing skill.toml (addresses @coderabbitai ops_create.rs:74) - skills/preflight: wrap git --version / git config probes in a 5s timeout so a wedged git can't stall the gate (addresses @coderabbitai preflight.rs:196) - skills/schemas: controller schema types for inputs/runs now use Json to match the real payload; only apply allowed_domains=['*'] when none is configured, preserving operator egress policy (addresses @coderabbitai schemas.rs:409,949) - tools/run_skill: add grep-friendly [run_skill] spawn debug logs (addresses @coderabbitai run_skill.rs:124) - tools/codegraph: confine caller-provided path to the workspace boundary before indexing/searching; add [codegraph:*] debug logs (addresses @coderabbitai codegraph/mod.rs:116,140)
| let removed = self.conn.execute( | ||
| "DELETE FROM blob WHERE sha NOT IN (SELECT DISTINCT sha FROM manifest)", | ||
| [], | ||
| )?; |
There was a problem hiding this comment.
Deferred (not addressed in this pass) — gc() model-variant reclamation.
This is a real gap, but it's a heavy lift: making GC model-aware requires a schema change (store the active model per ref, or a manifest_refs(sha, model) table) plus a migration and updates to every manifest writer. That's larger than the surgical review-fix scope and carries migration risk, so I'm deferring it rather than landing a rushed partial.
Impact today is bounded: obsolete (sha, model) rows only accumulate when a repo is reindexed across embedding signatures (lexical→dense), and they're inert (never queried). Suggest tracking as a follow-up issue.
| } | ||
| let Ok(text) = std::fs::read_to_string(&path) else { | ||
| continue; | ||
| }; |
There was a problem hiding this comment.
Deferred (not addressed in this pass) — full-file scans in scan_runs / footer detection.
Valid perf concern, but the fix is an I/O redesign (drive listing from metadata(), seek+read only header/tail byte windows instead of read_to_string, derive size/mtime from DirEntry::metadata) touching scan_runs, footer detection (~405-414, ~440-443) and ScannedRun construction. That's broader and riskier than the surgical review-fix scope here, so deferring to a dedicated follow-up rather than reworking the read path under time pressure.
Current impact is the runner-panel poll re-reading whole .runs logs; bounded for normal history sizes but worth optimizing.
| const SMART_PICKER_SKILL_IDS = new Set(['dev-workflow']); | ||
| const SMART_PICKER_INPUT_NAMES = new Set(['repo', 'upstream', 'target_branch', 'fork_owner']); | ||
|
|
||
| // Input-name conventions that trigger rich pickers instead of the |
There was a problem hiding this comment.
Acknowledged — the REPO_INPUT_NAMES / BRANCH_INPUT_NAMES name-convention routing (and the SmartIssuePicker hard-coding it implies) is left as-is for this PR per the existing TODO(picker-schema). Flagging here so it's tracked for the schema-driven picker field follow-up rather than silently lingering.
| setCronLoading(true); | ||
| try { | ||
| const res = await openhumanCronList(); | ||
| // RPC returns { result: CronJob[], logs: [...] } |
There was a problem hiding this comment.
Addressed the read-back: loadExistingJob now restores schedule (from schedule.expr/expression), selectedRepo (decoded from the dev-workflow-<owner>-<repo> job name), and targetBranch (parsed from the prompt's PRs target `<branch>` line), all undefined-guarded, with a debug log of what was restored.
Two caveats worth your eyes (flagging rather than expanding scope):
- Restored state isn't visible while a job is active. The form (repo/branch/schedule controls) only renders under
{!existingJob}, so the restore currently only takes effect once the job is removed — or if an edit affordance is added that renders the form with an active job. If you intended an in-place edit flow, the component needs that affordance. - Repo decode is best-effort. It replaces the first
-after the prefix with/, which mis-splits owners/repos that contain-(e.g.M3gA-Mind). A robust round-trip would store theowner/repoin job metadata rather than encoding it in the name. Left as-is to stay within the review-fix scope.
Summary
Clean version of #2875 by @sanil-23 on current
upstream/main.What changed from #2875: This branch is
remote-2631/run/codegraph-full(sanil-23's latest head — which already includes cargo fmt, prettier, and ESLint fixes pushed by the author) merged cleanly onto currentupstream/main. The previous PR #2880 accumulated unrelated commits from other PRs due to branch pollution.The previously failing
classifies_embedding_api_invalid_token_401_as_session_expiredtest passes — it was a stale-base issue (missing #2869 from main).Closes #2875, closes #2880.
Original description from @sanil-23:
/skills→ Runners tab/skills/runwith[[inputs]]form/skills/newwith inputs editor +skill.tomlgeneration[github]preflight gate — Composio connection, git install, git config, identity matchghCLI in bundled skills)Summary by CodeRabbit
New Features
Documentation
Localization
Tests