Stages: optional skills block loading pinned library skills per visit
A model stage may declare a skills block (name or name@N per line). Drafts and publications are validated against the server skill library; human/ntfy stages reject the block. Each run resolves unpinned names to the latest version at admission and records name@N per stage (run stage_skills, step skills); retry reuses the recorded versions. Every visit gets a private read-only copy of exactly those bundles under the run's artifact tree, and the harness loads only them: Claude via a session plugin (--plugin-dir, Skill tool with per-skill allow rules, bundled skills off, ambient loads fail the visit), Pi via --skill under --no-skills, and OpenCode via per-session instruction entries (V2 only). The app shows the block in the stage definition and the resolved versions on each visit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,10 @@ JsonMap _stage() => <String, dynamic>{
|
||||
'skipped_blank': ' ',
|
||||
'skipped_null': null,
|
||||
},
|
||||
'blocks': <String, dynamic>{'tools': 'shell\nread_file'},
|
||||
'blocks': <String, dynamic>{
|
||||
'tools': 'shell\nread_file',
|
||||
'skills': 'review-checklist\nrelease-notes@3\n',
|
||||
},
|
||||
'limits': <String, dynamic>{
|
||||
'max_visits': 3,
|
||||
'on': <String>['success', 'error'],
|
||||
@@ -56,6 +59,7 @@ void main() {
|
||||
'Retries',
|
||||
'Timeout',
|
||||
'Tools',
|
||||
'Skills',
|
||||
'Max visits',
|
||||
'Limit on',
|
||||
'Memory',
|
||||
@@ -75,12 +79,14 @@ void main() {
|
||||
expect(fields[4].value, '12.5');
|
||||
expect(fields[5].value, 'codex');
|
||||
expect(fields[10].value, 'shell\nread_file');
|
||||
expect(fields[11].value, '3');
|
||||
expect(fields[12].value, 'success, error');
|
||||
expect(fields[13].value, 'context: latest\nnotes: keep');
|
||||
expect(fields[14].value, 'failure');
|
||||
expect(fields[15].value, 'ops@example.test');
|
||||
expect(fields[16].value, 'run.log');
|
||||
expect(fields[11].value, 'review-checklist\nrelease-notes@3');
|
||||
expect(fields[11].block, isTrue);
|
||||
expect(fields[12].value, '3');
|
||||
expect(fields[13].value, 'success, error');
|
||||
expect(fields[14].value, 'context: latest\nnotes: keep');
|
||||
expect(fields[15].value, 'failure');
|
||||
expect(fields[16].value, 'ops@example.test');
|
||||
expect(fields[17].value, 'run.log');
|
||||
});
|
||||
|
||||
test('a blank or absent type reads model; an authored type is kept', () {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:pipelines_app/features/runs/ui/run_detail_visit_facts.dart';
|
||||
|
||||
void main() {
|
||||
test('a visit lists the skill versions it loaded after the model', () {
|
||||
final facts = detailVisitFacts(<String, dynamic>{
|
||||
'status': 'completed',
|
||||
'provider': 'anthropic',
|
||||
'model': 'claude-haiku',
|
||||
'skills': <String>['review@2', 'notes@1'],
|
||||
});
|
||||
final labels = [for (final fact in facts) fact.label];
|
||||
expect(labels.indexOf('Skills'), labels.indexOf('Provider/model') + 1);
|
||||
expect(facts, contains((label: 'Skills', value: 'review@2, notes@1')));
|
||||
});
|
||||
|
||||
test('a visit without recorded skills has no skills row', () {
|
||||
for (final skills in <dynamic>[
|
||||
null,
|
||||
<String>[],
|
||||
<String>[' '],
|
||||
'x',
|
||||
]) {
|
||||
final facts = detailVisitFacts(<String, dynamic>{
|
||||
'status': 'completed',
|
||||
'skills': skills,
|
||||
});
|
||||
expect(facts.any((fact) => fact.label == 'Skills'), isFalse);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user