tool: require exact current contracts without negotiation
This commit is contained in:
1 parent
8bfe0c36ee
commit
f83d992c61
16 files changed
+229
-366
No files matched your search
@@ -51,7 +51,7 @@ def main():
|
||||
analysis_schema = "analysis.schema.json"
|
||||
require_valid(analysis_schema, analysis, "analysis")
|
||||
require_valid("trace-v2.schema.json", trace, "trace")
|
||||
require_valid("tool-v1.schema.json", tool, "tool")
|
||||
require_valid("cli-tool.schema.json", tool, "tool")
|
||||
|
||||
# Negative mutations: structure, version and traversal must fail closed.
|
||||
bad = copy.deepcopy(analysis)
|
||||
@@ -76,11 +76,11 @@ def main():
|
||||
|
||||
bad = copy.deepcopy(tool)
|
||||
bad["entrypoint"] = "../outside"
|
||||
require_invalid("tool-v1.schema.json", bad, "tool traversal entrypoint")
|
||||
require_invalid("cli-tool.schema.json", bad, "tool traversal entrypoint")
|
||||
|
||||
bad = copy.deepcopy(tool)
|
||||
bad["version"] = "not semver"
|
||||
require_invalid("tool-v1.schema.json", bad, "tool invalid version")
|
||||
require_invalid("cli-tool.schema.json", bad, "tool invalid version")
|
||||
|
||||
print(
|
||||
"validated analysis/trace/tool artifacts "
|
||||
|
||||
Vendored
+1
-7
@@ -13,14 +13,8 @@ fn main() {
|
||||
}
|
||||
println!(
|
||||
"protocol={}",
|
||||
std::env::var("MARQDO_TOOL_PROTOCOL").unwrap_or_default()
|
||||
std::env::var("MARQDO_API_REVISION").unwrap_or_default()
|
||||
);
|
||||
if let Ok(value) = std::env::var("MARQDO_PROTOCOL_ANALYSIS") {
|
||||
println!("analysis={value}");
|
||||
}
|
||||
if let Ok(value) = std::env::var("MARQDO_PROTOCOL_TRACE") {
|
||||
println!("trace={value}");
|
||||
}
|
||||
let mut stdin = String::new();
|
||||
let _ = std::io::stdin().read_to_string(&mut stdin);
|
||||
if !stdin.is_empty() {
|
||||
|
||||
Reference in new issue
Block a user