refactor(dynamic): enhance migration harnesses with Prisma, Sequelize-CLI, Laravel, Rails, Flask support; implement fallback logic and extend SQL framework integration

This commit is contained in:
elipeter 2026-05-27 15:06:51 -05:00
parent ed8decb510
commit fd39304eed
7 changed files with 431 additions and 14 deletions

View file

@ -4026,7 +4026,7 @@ fn message_handler_dependency_files(spec: &HarnessSpec) -> Vec<(String, String)>
}
fn framework_dependency_files(spec: &HarnessSpec) -> Vec<(String, String)> {
if spec.expected_cap != crate::labels::Cap::CODE_EXEC {
if !should_stage_framework_dependency_files(spec) {
return Vec::new();
}
let Some(adapter) = spec.framework.as_ref().map(|b| b.adapter.as_str()) else {
@ -4049,6 +4049,14 @@ fn framework_dependency_files(spec: &HarnessSpec) -> Vec<(String, String)> {
vec![("requirements.txt".to_owned(), body)]
}
fn should_stage_framework_dependency_files(spec: &HarnessSpec) -> bool {
spec.expected_cap == crate::labels::Cap::CODE_EXEC
|| matches!(
&spec.entry_kind,
crate::evidence::EntryKind::Migration { .. }
)
}
fn python_message_handler_deps(source: &str) -> Vec<&'static str> {
let mut deps = Vec::new();
for raw_line in source.lines() {