NOTE Auto-detected staged changes
   - .gitignore
   - Cargo.toml
   - fettl-exceptions.toml
   - src/main.rs
   Use 'fettl check --full' for complete scan
   Found 4 changed file(s)
running without cache: /fixture/.fettl-cache is not initialized; run fettl local-store init --root '/fixture/.fettl-cache'
Code Fettl
   Checking for AI slop and code quality issues
============================================================

------------------------------------------------------------------------------
KEY INSTRUCTION: fettl is here to help you write better code. The problems
it finds aren't puzzles to be creatively worked around. You will be tempted to
focus your attention on doing whatever it takes to get rid of the complaints.
RESIST that temptation. Instead, put all of your energy into making genuinely
better software. Be a hero!

------------------------------------------------------------------------------
Violations in CQ003-deferred_work:

  • src/main.rs - 2 violations:
    :3 [add] Deferred work marker 'TODO'
    :6 Deferred work marker 'FIXME'

WHAT TO DO:
   ━━━ FINISH THE WORK OR DELETE THE CODE. NO MIDDLE GROUND. ━━━
   ⚠️  TODO, FIXME, "for now", "hack", "temporary fix" - these are PROMISES OF UNFINISHED WORK.
   The comment is a SYMPTOM. The real problem: you left something half-done.
   WHY THIS MATTERS:
   • Deferred work accumulates and never gets done
   • "Temporary" solutions become permanent
   • TODOs are where bugs hide
   • Each TODO is tech debt
   ✅ FIX IT:
   1. IMPLEMENT THE PROMISED FUNCTIONALITY NOW (don't defer it)
   2. If blocked by external dependency:
      - Must be blocked on: external team decision, third-party API unavailable, awaiting security audit
      - NOT BLOCKERS: "don't know how" (research it), "might be complex" (do it anyway), "need more time" (take the time)
      - File proper issue ticket with specific blocker, link in comment (NOT a TODO), remove TODO
   3. If not needed: DELETE the incomplete code AND the TODO
   ❌ EVASION TACTICS - FORBIDDEN:
   - Rewording TODO to "NOTE" or "OPTIMIZE" (SAME THING!)
   - Changing "placeholder" to "stub" or "skeleton" (SAME THING! The word is not the problem.)
   - Changing "TODO: add X" to "X is not yet present" (DEFERRAL BY PASSIVE VOICE!)
   - Changing "TODO: add X" to "Nothing here yet" (STILL DEFERRED — you just hid the admission!)
   - Adding suppressions or exceptions (FIX IT INSTEAD!)
   - Moving TODO to another file (STILL DEFERRED!)
   ⚠️  REWORDING TO AVOID THE CHECK IS THE MOST COMMON AI EVASION PATTERN.
   If you changed the text and the check no longer fires, ask yourself: did you finish the work,
   or did you just stop admitting it's unfinished? Finishing the work means the code is complete.
   🚫 EXCEPTIONS SKEPTICISM: If you think your TODO "deserves" an exception, you're rationalizing
   unfinished work. Finish it or delete it.
   The two cases where by_design exceptions ARE legitimate for this check:
   1. DOMAIN VOCABULARY in technical code: Code that implements or describes deferred-work
      detection (like a linter) may legitimately use words like "placeholder", "stub", or
      "TODO" as domain terms — not as markers of unfinished work. Example: a comment in a
      linter explaining "this detects placeholder files, not real code" is describing the
      domain, not admitting unfinished work. Use by_design with a concrete justification.
   2. TEST FIXTURE DATA: Test code that writes files containing intentional deferred-work
      markers (to verify the check detects them) uses TODO in a string literal, not in
      real source code. The TODO is the test input, not a promise. Use by_design with a
      justification that explicitly states the marker is test input, not deferred work.
   In both cases: the justification must name the specific use and why it is not deferred work.
   "This is intentional" alone is not a justification — it is the claim that requires proof.
   3. UNICODE DATA TABLES: Generated or imported Unicode character data tables may contain
      character names that include words like "TODO" (e.g., "MONGOLIAN TODO SOFT HYPHEN",
      Unicode codepoint U+1806) or "PLACEHOLDER" as part of their official Unicode Standard
      names. These are immutable normative data, not code stubs. Use by_design with a
      justification identifying the file as a Unicode data table.

------------------------------------------------------------------------------
Violations in EV003-test_skip_evasion:

  • src/main.rs:8 [test_add] - Empty test function: test_add

WHAT TO DO:
   ━━━ FIX OR DELETE. NEVER SKIP. ━━━
   ⚠️  EVASION TACTICS - FORBIDDEN:
   - "Temporarily skip" (becomes permanent)
   - "Known flaky" (fix it)
   - Trivialize test to pass (useless)
   - Conditional skip (fix root cause)
   - "Known failures" file (still broken)
   TEST PAIN = DESIGN FEEDBACK:
   - "Too hard to debug" → Code too complex
   - "Fragile setup" → Design fragile
   - "Too much mocking" → Too coupled
   - "Flaky" → Hidden state/races
   Hard-to-test code IS hard-to-use code.
   ACTION: Reduce coupling, explicit dependencies, eliminate hidden state.
   Skipped tests ROT. They lie about coverage.
   → FIX OR DELETE. NO EXCEPTIONS.
   🚫 EXCEPTIONS SKEPTICISM: "This skip is legitimate!" No. Fix the test or delete it. Skips accumulate until test suite is meaningless.

------------------------------------------------------------------------------
Violations in EV011-empty_test_bodies:

  • src/main.rs:8 [test_add] - Empty test body in `test_add`: no statements in body

WHAT TO DO:
   ━━━ A TEST THAT CANNOT FAIL IS NOT A TEST — IT IS A CHECKBOX ━━━
   🫙  This test function has no assertions and no failure path. It will always
       pass, no matter how broken the code under test becomes.
   WHY THIS MATTERS:
   • Test suites with empty or trivially-passing tests give false confidence
   • CI stays green while production bugs accumulate silently
   • Empty test bodies are the #1 AI evasion tactic for "add tests" requests
   • Test COUNT is not test QUALITY — ten useless tests are worse than one real one
   • Every test exists to catch a specific regression. What does THIS one catch?
   ✅ FIX IT:
   - Add an actual assertion that verifies behavior: assert_eq!(result, expected)
   - If you're testing an error path, assert the error type/message
   - If you're testing a side effect, verify the side effect occurred
   - Ask: "If the function returned garbage, would THIS test catch it?" If no, fix it.
   Bad (empty body — cannot fail):
       #[test]
       fn test_parse() {}
   Bad (let-only — cannot fail):
       #[test]
       fn test_parse() {
           let result = parse("input");
       }
   Bad (trivially true — always passes):
       #[test]
       fn test_parse() {
           assert!(true);
       }
   Good (asserts real behavior):
       #[test]
       fn test_parse() {
           let result = parse("input");
           assert_eq!(result, Ok(42));
       }
   ❌ EVASION TACTICS - FORBIDDEN:
   - Adding `assert!(true)` to silence the check (trivially true, still flagged)
   - Adding a let binding with no assertion (setup without verification, still flagged)
   - Adding only a docstring describing what the test "should" do someday
   - `todo!()` or `unimplemented!()` — a placeholder is not a test
   - Commenting out assertions "for now" — now is when tests need to run
   🚫 EXCEPTIONS SKEPTICISM: There is almost never a legitimate reason for a test
       function with no assertions. If you think you need one:
       - "Compile-only test" (verifies something compiles): rare; use an exception
         with a clear justification explaining what compile-time property it checks
       - "#[should_panic] test": must have a body that actually calls something to
         trigger the panic — a should_panic test with an empty body is still wrong
       - Snapshot tests (insta::assert_snapshot!): add to assertion_indicators if
         your framework uses different macros

------------------------------------------------------------------------------
Violations in EV012-always_passing_tests:

  • src/main.rs:8 [test_add] - Test function `test_add` has no assertion indicators — it will always pass regardless of what the code under test does

WHAT TO DO:
   ━━━ A TEST THAT ALWAYS PASSES IS NOT A TEST. IT IS A TRAP. ━━━
   ⚠️  This test has code in its body but NO assertion indicators. It will always
       pass, regardless of whether the code under test is working correctly or is
       completely broken. Running code is not the same as verifying code.
   WHY THIS MATTERS:
   • A test with no assertions catches ZERO regressions — ever
   • It inflates your test count and coverage statistics without providing any safety
   • Future maintainers will trust these tests and be betrayed by them
   • "But it exercises the code path!" — so does production traffic, and THAT
     doesn't have assertions either
   • Test coverage without assertions is coverage theater
   • This is the #1 AI evasion for "write tests": write setup code, call the function,
     never check the result. Green checkmark, zero protection.
   ✅ FIX IT:
   Add an assertion that verifies the actual behavior you're testing:
       # BAD — always passes no matter what:
       def test_add():
           result = add(2, 3)
       # GOOD — fails if add() is broken:
       def test_add():
           result = add(2, 3)
           assert result == 5
       // BAD (Rust) — always passes:
       #[test]
       fn test_parse() {
           let result = parse_input("42");
           let _ = result;
       }
       // GOOD — fails if parse_input() is broken:
       #[test]
       fn test_parse() {
           let result = parse_input("42").unwrap();
           assert_eq!(result, 42);
       }
   Every test must answer: "What specific regression does this catch?"
   If you can't answer that, it's not a real test.
   ❌ EVASION TACTICS - FORBIDDEN:
   - Adding `assert!(true)` at the end (asserts nothing about your code)
   - Adding `assert_eq!(x, x)` (a value always equals itself)
   - Moving the function call to a different test and calling that one "the real test"
   - Adding a comment "verified manually" (not a test, never automated, will drift)
   - Adding `println!("it ran!")` as if output logging counts as verification
   - "The test checks that the function doesn't panic" — if panic is the contract,
     use #[should_panic]; otherwise, add a real assertion
   - Calling a helper that has assertions in it but whose name doesn't hint at
     that (give it an assert_* or verify_* name so the check can see it)
   🚫 EXCEPTIONS SKEPTICISM: The only legitimate always-passing tests are:
       - #[should_panic] tests where the panic IS the assertion (already excluded)
       - Compile-only tests that verify type constraints or trait bounds — extremely
         rare; add an exception with an explicit justification like
         "verifies that Foo: Send + Sync compiles"
       - Tests using custom assertion frameworks not in the indicators list — add
         your framework's assertion function to assertion_indicators in config instead
         of adding exceptions
   CUSTOM ASSERTION FRAMEWORKS — KNOWN FALSE-POSITIVE PATTERN:
   Some test harnesses use custom methods that panic on failure but whose names are
   not in the default assertion indicators list. Example from TUI integration tests:
       let mut h = TuiTestHarness::new("picker_switch");
       h.spawn_tui();
       h.wait_for("[all]");           // panics if text doesn't appear in timeout
       h.wait_for_absent("Profiles"); // panics if text is still present
   `wait_for()` and `wait_for_absent()` ARE assertions — they fail the test if the
   expected state doesn't occur. The check doesn't recognize them because they aren't
   in the indicators list.
   FIX: Add your harness's assertion methods to `assertion_indicators` in your
   project-level `fettl-patterns.toml` override:
       [EV012-always_passing_tests]
       rust = ["assert", "assert_eq", ..., "wait_for", "wait_for_absent"]
   This is the same mechanism used for mockall's `.times(N)` and `.called()` patterns,
   which are included in the system defaults for the same reason. Add your project's
   custom methods to the list rather than adding exceptions for each test.

------------------------------------------------------------------------------
Violations in CH011-outdated_setup:

  • Cargo.toml:4 - Outdated Rust edition '2021' (use '2024' for fresh vibes)

WHAT TO DO:
   ━━━ USE CURRENT EDITIONS AND VERSIONS. ━━━
   ⚠️  Old edition/version in setup files signals unmaintained code or AI using outdated training data.
   WHY THIS MATTERS:
   • Old editions miss important improvements (better error messages, new features)
   • Signals project isn't maintained
   • AI agents often use outdated boilerplate from training data
   ✅ FIX IT:
   - Rust: Use `edition = "2021"` in Cargo.toml (or newer if available)
   - Python: Use `requires-python = ">=3.11"` in pyproject.toml (or current)
   ❌ EVASION TACTICS - FORBIDDEN:
   - "Old edition still works!" (USE CURRENT TOOLS!)
   - "Compatibility with old systems" (UPDATE THEM!)
   - Adding exception (UPDATE THE FILE!)
   🚫 EXCEPTIONS SKEPTICISM: "We need old edition for compatibility!" Very rare. Update and test. Modern editions are compatible.
   Keep setup files current. It takes 2 minutes and avoids technical debt.

============================================================
Summary: 6 total violations
  • CQ003-deferred_work: 2
  • EV003-test_skip_evasion: 1
  • EV011-empty_test_bodies: 1
  • EV012-always_passing_tests: 1
  • CH011-outdated_setup: 1

Total time: 0.25s
