JVNAUTOSCI-2614: Select minimum-adequate capability plans - #329
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Von’s ordinary-turn capability discovery and ranking so that registered direct tools and represented workflows are treated as comparable “capability plans” on a single, bounded, cost-sensitive frontier. It adds explicit plan/effect/cost metadata to catalogue entries, promotes workflow-declared component tools as plausible simpler alternatives, and introduces conservative mechanical pruning only when a workflow declares an authoritative read-only direct equivalent.
Changes:
- Add workflow plan projection (declared components, step counts, direct-equivalence metadata) and effect profiling (semantic vs operational durable-state effect) to represented workflow capabilities.
- Replace previous substring/generic-token routing with whole-token, corpus-relative evidence and interleaved frontier ordering that keeps both direct and workflow options visible while leaving adequacy to the adaptive model.
- Record selection policy and per-invocation plan/effect/cost context in telemetry traces, and expand/adjust test coverage accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/backend/test_workflow_turn_capability_service.py | Adds/updates assertions for workflow plan metadata, semantic vs operational effects, and write/unknown effect marking behaviour. |
| tests/backend/test_adaptive_turn_service.py | Adds extensive tests for the new frontier ranking, component promotion, rarity-based routing evidence, dominance pruning rules, and selection trace enrichment. |
| src/backend/services/workflow_turn_capability_service.py | Projects workflow plan/effect/cost metadata into catalogue entries and allows discovery to use registered capability categories to classify semantic effect when evidence is sufficient. |
| src/backend/services/adaptive_turn_service.py | Implements the cost-sensitive frontier ranking, corpus-relative routing evidence, conservative dominance pruning, compact projection of selection profiles, and selection telemetry enrichment. |
| docs/engineering/von_workflow_language_manual.md | Documents direct_equivalent_capability_names and the new capability-plan selection/dominance rules. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
direct_equivalent_capability_namesdeclaration; retain dominated workflows for exact-name inspection.Why
Workflow relevance was scaled into a separate score range (up to 1000) while direct capabilities received small literal scores. That made representedness an accidental priority and prevented the model from comparing a matched workflow with its simpler direct components. Short substrings and generic routing words also admitted unrelated tools.
The new boundary keeps authority unchanged and does not add a workflow classifier or compulsory controller stage. The adaptive model judges material outcome/evidence adequacy; declared cost breaks ties only after adequacy, and hard pruning requires represented equivalence.
Impact
For the reported
Can you list PhD students supervised by me?shape, the canonical entity-retrieval workflow's five read components and the workflow occupy the top six catalogue positions.find_relations_with_argumentis fourth, while the workflow remains available when its full five-part evidence contract is genuinely needed.Validation
111 passedpost-rebase across adaptive-turn, workflow-turn capability, routing-profile extension, and routing metadata projection tests.git diff --checkpass.201 passedbefore stopping the unrelated Mongo-heavy remainder after 13m46s with no failures.capability_index_wait_timed_out_build_in_progress; this is a separate availability boundary, not treated as selection success.Jira: JVNAUTOSCI-2614