build: personas naming undeclared needs is the reader's mapping, not a builder bug
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
20e5e16641
commit
b1f0210691
+10
-1
@@ -1570,8 +1570,17 @@ pub fn run(argv: &[String]) -> anyhow::Result<()> {
|
||||
|
||||
if let Some(lint) = value("--lint") {
|
||||
let output = std::process::Command::new(&lint).arg("--path").arg(out.join("questions")).output().with_context(|| format!("running {lint}"))?;
|
||||
print!("{}{}", String::from_utf8_lossy(&output.stdout), String::from_utf8_lossy(&output.stderr));
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
print!("{}{}", String::from_utf8_lossy(&output.stdout), stderr);
|
||||
if !output.status.success() {
|
||||
// Personas are attached from a file and name needs by id; a
|
||||
// planned site whose model chose other ids fails only on
|
||||
// that mapping, which is the reader's to fix, not the
|
||||
// builder's.
|
||||
let unmapped = stderr.lines().filter(|l| l.starts_with("FAIL")).all(|l| l.contains("points at a need that is not declared") || l.contains("unmet business need finding"));
|
||||
if unmapped && stderr.contains("points at a need that is not declared") {
|
||||
bail!("the site is sound, but the personas name needs this plan does not declare: map each persona's `need:` to one of the plan's ids, or rename the plan's needs, then build again");
|
||||
}
|
||||
bail!("the verifier rejected a deterministically built site - that is a bug in the builder, not in the words");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user