docs(fermata): the failure list moves out of the READMEs into docs/known-failures.md
One list, merged from both READMEs and security-model.md "Known limits", each entry with its test. Entries fixed on this branch are gone. Both READMEs keep the warning and point at the page. tests/docs_known_failures.rs keeps the page and known_limits.rs in step, and test_crate_export.py checks that the public README's links resolve in the exported tree.
This commit is contained in:
+32
-4
@@ -1,7 +1,8 @@
|
||||
//! What fermata is known to fail at, shown through the binary. Every test here asserts that
|
||||
//! the failure HAPPENS: a value stays visible, or a call passes. When one of them starts to
|
||||
//! fail, a limit was fixed, and the README's "Known to fail" and `docs/security-model.md`
|
||||
//! must change with it. All values are fake, and each run has a home of its own.
|
||||
//! fail, a limit was fixed, and `docs/known-failures.md` must change with it
|
||||
//! (`tests/docs_known_failures.rs` checks that each test here is named there). All values
|
||||
//! are fake, and each run has a home of its own.
|
||||
//!
|
||||
//! What the binary cannot show has no test: Claude Code's own routes (a failed tool's
|
||||
//! output, Monitor, attachments) are claims from its documentation and bundle.
|
||||
@@ -154,8 +155,8 @@ fn a_shell_quoted_value_is_not_masked_when_a_program_prints_it_decoded() {
|
||||
}
|
||||
}
|
||||
|
||||
/// README claims an unclosed quote swallows the next assignment. Each spelling here is
|
||||
/// masked by the binary, so the claim is not true of it: this pins what is true.
|
||||
/// Not a failure: an unclosed quote does not swallow the next assignment. Each spelling here
|
||||
/// is masked by the binary, and this pins that.
|
||||
#[test]
|
||||
fn a_value_after_an_unclosed_quote_is_masked_in_every_spelling_tried() {
|
||||
for text in [
|
||||
@@ -441,6 +442,33 @@ fn a_flag_value_as_verb_and_a_glob_over_directories_pass_the_read_gate() {
|
||||
}
|
||||
}
|
||||
|
||||
/// A file run as the program is not read by this check: the verb word is no path, unless a
|
||||
/// wrapper given by an absolute path comes before it.
|
||||
#[test]
|
||||
fn a_ruled_file_run_as_the_program_passes() {
|
||||
let p = project(&[(".botignore", b".env\nvendor/\n"), (".env", b"x"), ("vendor/bin/x", b"x")]);
|
||||
for command in ["./.env", ".env", "vendor/bin/x", "sudo vendor/bin/x", "time ./.env"] {
|
||||
assert!(passes(&p.bash(command)), "{command}");
|
||||
}
|
||||
}
|
||||
|
||||
/// The over-denials that stay. Each errs towards stopping a command.
|
||||
#[test]
|
||||
fn a_harmless_command_a_rule_still_stops() {
|
||||
let p = project(&[(".botignore", b".env\nvendor/\n"), (".env", b"x"), ("vendor/a", b"x"), ("a.txt", b"x")]);
|
||||
for command in [
|
||||
"/bin/ls .env",
|
||||
"git -c core.pager=x status .env",
|
||||
"git log vendor/$BRANCH",
|
||||
"curl example.invalid/vendor/$ID",
|
||||
"composer require vendor/*",
|
||||
"tool --name=.env",
|
||||
"grep --color always .env a.txt",
|
||||
] {
|
||||
assert!(denied(&p.bash(command)), "{command}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Writing verbs are a list. A new file named to any other program is not there to check,
|
||||
/// and a flag's value is one word among others.
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user