Skip to content

Latest commit

 

History

History

Rust Starter Embedded Failure

This directory is the failing companion to starter-embedded/.

Read ../HOWTO.md first if you want the full model, especially the determinism gate, the provider host contract, and the difference between standalone and embedded host modes.

It keeps the same real Rust embedded provider flow:

  • compile an application binary with Cargo
  • keep normal app behavior outside the observe subcommand
  • inspect raw observe list output
  • derive inventory
  • run a simple Observer suite
  • emit and verify canonical artifacts

The difference is that one exported test is intentionally wrong:

  • ledger/broken-running-total asserts the wrong expected total

That makes the app-owned failing path as obvious as the standalone failing path.

Contents:

  • src/lib.rs: tiny Rust code under test
  • src/main.rs: application main plus embedded Observer routing and one intentional failure
  • observer.toml: provider resolution config using args = ["observe"]
  • tests.obs: simple-surface Observer suite
  • Makefile: end-to-end commands
  • tests.inv: derived inventory snapshot
  • expected.inventory.sha256: expected canonical inventory hash
  • expected.suite.sha256: expected canonical suite hash
  • expected.default.jsonl: expected canonical report snapshot for the failing run

Suggested reading order:

  1. read src/main.rs
  2. run make app-run
  3. run make list
  4. run make host-run TARGET='ledger/broken-running-total'
  5. run make inventory
  6. inspect tests.inv
  7. run make run
  8. run make verify

Useful commands:

make app-run
make list
make host-run TARGET='ledger/broken-running-total'
make inventory
make run
make report
make verify