aKode fase 5: test e snapshot adeguati alla rinomina, 429 distinto (ProviderRateLimited), cargo fmt dopo il cambio dei prefissi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,12 +40,9 @@ impl From<String> for SkillLocator {
|
||||
return None;
|
||||
}
|
||||
index.parse::<usize>().ok()?;
|
||||
[
|
||||
SkillSourceKind::Executor,
|
||||
SkillSourceKind::Host,
|
||||
]
|
||||
.into_iter()
|
||||
.find(|source| alias_prefix(source) == Some(prefix))
|
||||
[SkillSourceKind::Executor, SkillSourceKind::Host]
|
||||
.into_iter()
|
||||
.find(|source| alias_prefix(source) == Some(prefix))
|
||||
});
|
||||
Self {
|
||||
value,
|
||||
|
||||
@@ -27,7 +27,11 @@ fn update_spends_budget_only_on_accepted_rows_and_their_new_roots() {
|
||||
"e0",
|
||||
"skill://writing",
|
||||
);
|
||||
let docs = skill("- docs: (executor package: e0/docs)", "e0", "skill://writing");
|
||||
let docs = skill(
|
||||
"- docs: (executor package: e0/docs)",
|
||||
"e0",
|
||||
"skill://writing",
|
||||
);
|
||||
let expected = "\n## Selected-environment skills update\n### Skill roots\nThese mappings replace earlier mappings for the same aliases.\n- `e0` = `skill://writing`\n### Added or updated skills:\n- release-notes: (executor package: e0/notes)\n- docs: (executor package: e0/docs)\n";
|
||||
let mut remaining = SkillMetadataBudget::Characters(expected.chars().count());
|
||||
let mut snapshot = CatalogSnapshot::default();
|
||||
@@ -37,7 +41,10 @@ fn update_spends_budget_only_on_accepted_rows_and_their_new_roots() {
|
||||
assert!(draft.try_append_skill(¬es, &mut snapshot, &mut remaining));
|
||||
assert!(draft.try_append_skill(&docs, &mut snapshot, &mut remaining));
|
||||
|
||||
assert_eq!(draft.into_body("Selected-environment").as_deref(), Some(expected));
|
||||
assert_eq!(
|
||||
draft.into_body("Selected-environment").as_deref(),
|
||||
Some(expected)
|
||||
);
|
||||
assert_eq!(
|
||||
snapshot.roots,
|
||||
BTreeMap::from([("e0".into(), "skill://writing".into())])
|
||||
|
||||
@@ -8,9 +8,9 @@ mod multi_query_lexical;
|
||||
mod routing_card_lexical;
|
||||
mod rrf_lexical_char;
|
||||
mod weighted_lexical;
|
||||
use akode_skills::SkillDependencies;
|
||||
pub(crate) use character_ngram::CharacterNgramSkillSelector;
|
||||
pub(crate) use character_routing_card::CharacterRoutingCardSkillSelector;
|
||||
use akode_skills::SkillDependencies;
|
||||
pub(crate) use fielded_bm25::FieldedBm25SkillSelector;
|
||||
pub(crate) use lru::LruSkillSelector;
|
||||
pub(crate) use lru_plus_character_routing::LruPlusCharacterRoutingSkillSelector;
|
||||
|
||||
@@ -385,9 +385,9 @@ where
|
||||
let mut fragments: Vec<Box<dyn ContextualUserFragment + Send>> = Vec::new();
|
||||
if config.include_instructions && !host_catalog_in_world_state {
|
||||
let mut turn_catalog = catalog.clone();
|
||||
turn_catalog.entries.retain(|entry| {
|
||||
entry.authority.kind != SkillSourceKind::Executor
|
||||
});
|
||||
turn_catalog
|
||||
.entries
|
||||
.retain(|entry| entry.authority.kind != SkillSourceKind::Executor);
|
||||
let model_info = thread_store.get::<ModelInfo>();
|
||||
let include_usage = model_info
|
||||
.as_deref()
|
||||
|
||||
@@ -625,8 +625,8 @@ pub(crate) fn render_prepared_skill_catalogs(
|
||||
);
|
||||
|
||||
for candidate in [host_only_aliases, executor_only_aliases, all_source_aliases]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.into_iter()
|
||||
.flatten()
|
||||
{
|
||||
if combined_render_is_better(
|
||||
&candidate,
|
||||
|
||||
@@ -797,10 +797,7 @@ fn mixed_catalogs_alias_all_skill_sources_under_budget_pressure() {
|
||||
.any(|line| line.contains("(file: r0/host-0/SKILL.md)"))
|
||||
);
|
||||
assert_eq!(
|
||||
(
|
||||
executor.report.included_count,
|
||||
host.report.included_count,
|
||||
),
|
||||
(executor.report.included_count, host.report.included_count,),
|
||||
(3, 3)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -124,10 +124,7 @@ async fn turn_input_and_history_advance_while_ranking_is_blocked()
|
||||
catalog: thread_store
|
||||
.get::<SkillsThreadState>()
|
||||
.unwrap()
|
||||
.prepare_step_catalog(
|
||||
SkillCatalog::default(),
|
||||
/*discovery_v2*/ false,
|
||||
),
|
||||
.prepare_step_catalog(SkillCatalog::default(), /*discovery_v2*/ false),
|
||||
host_catalog: Some(host_catalog),
|
||||
config: config.clone(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user