Repository navigation
feat(harness): configure reviewed Skill Packs through projects and Workflows - #15302
ogabrielluiz wants to merge 1 commit into
Conversation
Pre-merge checks:
|
| Check name | Status | Explanation |
|---|---|---|
| Test Coverage For New Implementations | The check passes on the evidence in the checked-out tree. The repository has one root commit (600ef43), so no base diff was available. I could not list the exact test files this PR added or changed. I… | |
| Test Quality And Coverage | PR #15302 (langflow-ai/langflow, author ogabrielluiz, base review/harness-c12-skill-runtime, head review/harness-c13-skill-projects) adds Skill Pack configuration, review, and workflow execution. The … |
|
| Excessive Mock Usage Warning | Scope: The checkout is a single squashed commit (600ef43) with no base branch, so the PR patch could not be isolated. I reviewed the test files that match the PR's Skill Pack, project and Workflow sco… |
Full details: Test Coverage For New Implementations
-
Explanation
The check passes on the evidence in the checked-out tree. The repository has one root commit (600ef43), so no base diff was available. I could not list the exact test files this PR added or changed. I checked correspondence and substance from the tree instead. Skill feature code and matching tests: - Core model:
src/lfx/src/lfx/projects/skills.py. Covered bysrc/lfx/tests/unit/components/models_and_agents/agent_helpers/test_harness_skills.py, which has tests for activation, tool enforcement, approval resume, duplicate-name rejection, and the Agent component run. - Backend project API:project_compositions.py,config_writer.py,project_tool_packs.py,skill_packs.py,archives.py. Covered bysrc/backend/tests/unit/api/v1/test_harness_skill_packs.py. That file tests snapshot retention after a Skill Pack edit, the 422 on a changed Skill Pack, composition export and import with revisions, invalid content and foreign packs, permission checks, and standalone artifact dependency rejection. - Workflows API:src/backend/tests/unit/api/v2/test_workflow_skills.py. It tests imported skill execution, approval resume, and tool access recheck before execution. - Standalone serve CLI:src/lfx/tests/unit/cli/test_serve_workflow_skills.py. - Frontend:skills.tsandskill-definitions-editor.tsxare covered byharnessPage/__tests__/skill-packs.test.tsx. That file tests review before acceptance, dependency loading failures, instruction editing, and duplicate-name and empty-body validation. Naming follows the required conventions:test_*.pyfor backend and lfx, and*.test.tsxunder__tests__for frontend. The tests assert behavior, not placeholders. They use the real API, graph, and middleware paths, and they check concrete values such as instructions, scoped tool origins, revisions, and error text. Gaps: -deployment_artifacts/builder.py(_validate_harness_packaging) has no direct unit test. The backend testtest_standalone_artifact_rejects_unprovisioned_skill_dependenciesappears to exercise it. - The PR description reports test runs. I did not verify those runs, and they do not count as evidence here. PASS is based on correspondence and substance. Confirming that each test file is new or updated, rather than pre-existing, would need the base revision.
Full details: Test Quality And Coverage
-
Explanation
PR
#15302(langflow-ai/langflow, author ogabrielluiz, base review/harness-c12-skill-runtime, head review/harness-c13-skill-projects) adds Skill Pack configuration, review, and workflow execution. The check passes on the test evidence in the tree. Limitation: the local clone is shallow. HEAD (600ef43) has no usable parent, and the PR base branch is not present. The local parent object 6c9aea6 is main, not the base. I could not isolate the exact PR patch. I assessed the skill-pack test suite as it exists in the tree. Evidence against the criteria: 1. Main functionality is covered. - Backend API (src/backend/tests/unit/api/v1/test_harness_skill_packs.py): saves embed reviewed content and scoped tools. Later edits to the pack do not change saved flows (snapshot retention). Composition export and import relocate skills and revisions. Standalone artifact builds reject unprovisioned skill dependencies. - Workflows API (src/backend/tests/unit/api/v2/test_workflow_skills.py): imported skill compositions run through sync, stream, and AG-UI modes. Approval and rejection resume a suspended job. Tool access is rechecked before execution. - lfx (src/lfx/tests/unit/components/models_and_agents/agent_helpers/test_harness_skills.py): skill activation and tool scope run through real LangChain agent graphs. Parallel activation is blocked. Approval state persists across resume. The Agent component records reviewed skills. - Frontend (skill-packs.test.tsx): the Skill Pack picker shows instructions before acceptance. Dependency load failure blocks acceptance. Instruction edits and name validation are checked. 2. Async patterns are correct. pyproject files set asyncio_mode = "auto". Async tests and fixtures use plain async def. wait_status uses asyncio.timeout with polling and a bounded wait. 3. Tests check behavior, not only smoke. Assertions cover tool-message status, model-visible prompt content, database state after failed PATCH, and exact revision and reference values. 4. Project patterns are followed. The backend uses pytest. The frontend uses Jest and React Testing Library. A Playwright end-to-end test for the Skill Pack UI was not found. This is a coverage gap for the UI flow, but criterion 4 does not require end-to-end tests for each feature. 5. Success and error paths are covered for the endpoints. Error cases include 422 for invalid skill content, a foreign or non-skill project, and a changed pack revision. They include 404 for denied execute permission, 409 for a duplicate resume, and has_errors for denied tool access. Frontend error handling is covered by the rejected dependency request. Residual risk: the tests cannot be attributed to this PR alone, because the base diff is unavailable. The check does not treat that as a failure.Resolution
None required for PASS. To confirm attribution, fetch the base branch review/harness-c12-skill-runtime and diff it against 600ef43. Consider adding a Playwright end-to-end test for the Skill Pack configuration flow.
Full details: Excessive Mock Usage Warning
-
Explanation
Scope: The checkout is a single squashed commit (600ef43) with no base branch, so the PR patch could not be isolated. I reviewed the test files that match the PR's Skill Pack, project and Workflow scope. Findings: - lfx tests (test_harness_skills.py, test_slots.py, test_project_types.py, test_serve_workflow_skills.py) and backend test_workflow_skills.py and test_project_types.py use no mocks. - test_harness_skill_packs.py uses one monkeypatch to inject a permission denial. It also uses real HTTP client calls. - test_project_deployment_snapshot.py (648 lines) has about 18 mock references. Most patch.object calls inject a failure into build_project_deployment_snapshot or stub the transaction helper, so the route's error mapping is tested. The two dialect tests use a MagicMock session to check the emitted SQL for SQLite and PostgreSQL. This is targeted use of mocks at boundaries and does not hide the logic under test. - skill-packs.test.tsx (145 lines, about 15 mock references) mocks the API client, navigation, and the folders query. This is typical for a component test. - harness-page.test.tsx (1474 lines) is the most heavily mocked file. It has about 13 jest.mock calls that replace child pickers, the field renderer, the alert store, and the query hooks. Its comments say the stand-ins are intentional, because those components have their own tests. The assertions check the page's own rendering and the payloads sent through the mocked patch mutation. The mocks do not hide the page's behaviour. This is a concern to watch, and a future integration test could cover the real pickers. It does not meet an explicit failure condition. No explicit failure condition in the check is met. The check is advisory, so the file-level warning above is recorded here and not as a FAIL.
Full details: Test File Naming And Structure
-
Explanation
Summary: The PR-scoped test files cannot be isolated, so this check cannot reach PASS. The candidate files that appear related to this PR follow the required naming and structure, but that evidence does not prove which files this PR changed. Evidence gap: - The checkout holds one root commit (600ef43, titled with the PR subject). It has no parent. A
git diffagainstreview/harness-c12-skill-runtimeis therefore impossible. The base branch is not present locally. - The commit adds the full repository tree (13,325 files). Treating the whole tree as PR-introduced would be wrong. Candidate PR test files (from keyword search, not a diff): - Backend:src/backend/tests/unit/api/v1/test_harness_skill_packs.py,src/backend/tests/unit/api/v2/test_workflow_skills.py,src/backend/tests/unit/api/v1/test_project_types.py,src/backend/tests/unit/api/v1/test_project_deployment_snapshot.py. - lfx:src/lfx/tests/unit/components/models_and_agents/agent_helpers/test_harness_skills.py,src/lfx/tests/unit/cli/test_serve_workflow_skills.py. - Frontend:src/frontend/src/pages/MainPage/pages/harnessPage/__tests__/skill-packs.test.tsx,harness-page.test.tsx. - No Playwright*.spec.tsfile undersrc/frontend/testsreferences skills. Observations on the candidate files (not a PR verdict): - Naming and structure: backend tests aretest_*.pywithasync def test_*functions. Descriptive names includetest_skills_reject_invalid_content_and_foreign_packsandtest_skill_attachment_requires_tool_execute_permission. - Negative cases: several candidates cover rejection paths, including invalid content (422), foreign packs, duplicate names, unprovisioned dependencies, and permission denial. - Frontend:skill-packs.test.tsxis a Jest test that uses@testing-library/react. It covers the case where a pack cannot be accepted when its dependencies fail to load. - Setup and teardown: pytest fixtures are used.beforeEachappears in the frontend test. - Integration markers: the candidate backend tests contain nointegrationmarker. They are unit-directory tests that use the real routing stack with a replaced model. Whether this meets criterion 3 depends on the PR's actual files, which are not available. Required next step: Provide the base revision (review/harness-c12-skill-runtime) or a usable PR patch. Then re-run the check on only the test files this PR adds or changes.Resolution
Make the base branch
review/harness-c12-skill-runtimeavailable in the checkout, or supply the PR patch. Then re-evaluate only the test files changed by PR#15302against the seven criteria. Mark integration tests explicitly if the changed tests cross service boundaries.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
|
✅ Migration Validation Passed All migrations follow the Expand-Contract pattern correctly. |
…rkflows Folded from the original layer: - chore(review): collapse generated starter snapshots in diffs - test(harness): respect AG-UI graph-state visibility in Skills workflows
8aaee72 to
600ef43
Compare
Configure Skill Packs, review which ones the agent harness includes, and see activated skills in saved reports. Backend and Workflows API tests cover snapshot retention.
This is layer 28 of 40 in stack #16628 and builds on #15301. It changes 1,274 source lines and 583 test lines, plus 248 lines in generated files (component index, starter projects, locales, secrets baseline).
The stack is rebased onto release-1.14.0 at
f60d17696c. Ruff, Biome and the detect-secrets hook pass on every layer. Before the Run Flow refactor, the stack tip passed lfx (12,942 tests), jest (9,788), and the Postgres migration, concurrency and background execution suites, and the backend unit suite failed only on tests that also fail on the base. After the refactor, the lfx suite and the backend api, agentic and base suites ran again at the tip. Three new lfx failures were fixed and rerun. The only other new failures, intest_files.py, also fail on the base.Still a draft. Live provider calls and a deployed topology were not tested.