Error Attribution

Navigating the evidence gaps through technical traces.

01. The Anatomy of a Trace

When SATE-Laravel rejects a test, it does not merely report a failure. It emits a technical trace designed to attribute the failure to a specific evidentiary gap.

Unlike traditional stack traces which focus on execution errors, a SATE-Laravel trace focuses on causality errors. It identifies where the link between an action and its expected observation has been broken.

“A trace is a map of what was not proven.”

02. Verification Hints

The test:verify process provides diagnostic hints to help you re-anchor unanchored assertions. These hints are derived from the Auditor's analysis of the behavioral surface.

audit_signals — bash — 80x24
✖ [G1] FAIL_EXECUTION_SAFETY: test_webhook_does_not_leak_env

HINT: The Auditor detected unsafe environmental coupling. This test mutates persistent system state (filesystem, env, global config, or shared services) in a way that can outlive the test process.

SUGGESTION: Restore or isolate the mutated state. Prefer framework-provided fakes and per-test sandboxes so the run is clean in isolation.

✖ [G2] FAIL_STRUCTURAL_INVALIDITY: test_reports_are_generated

HINT: The test does not match an admissible Laravel/PHPUnit/Pest shape. The engine cannot safely reason about behavior when the harness bypasses framework conventions.

SUGGESTION: Rework the test into idiomatic structure: use the framework HTTP helpers, DB assertions, queues/events fakes, and avoid manual bootstrapping or custom harness logic.

✖ [G4] FAIL_UNANCHORED_ASSERTION: test_user_can_place_order

HINT: The Auditor detected an Act (POST /api/orders), but the resulting Observation was confined to local return values or in-memory state. No external state transformation (Database, Event, or Filesystem) was uniquely attributed to this Act.

SUGGESTION: Re-anchor this test by verifying that a new record exists in the 'orders' table.
Recommended: $this->assertDatabaseHas('orders', ['user_id' => $user->id]);

✖ [G3] FAIL_NO_SEMANTIC_SIGNAL: test_configuration_is_valid

HINT: The assertion targets a constant or a value derived from the same source as the expected result. This constitutes a tautology and provides zero behavioral signal.

SUGGESTION: Test the effect of the configuration rather than the configuration object itself.
Example: Verify that a service behaves differently when this config is toggled.

✖ [G5] FAIL_HYGIENE_VIOLATION: test_billing_invoice_generation

HINT: The test uses a hardcoded ID ('INV-1001') in a causal assertion. This creates fragile coupling between the test and the database state, increasing the risk of false positives during parallel execution.

SUGGESTION: Use a factory to generate dynamic state and assert on the returned model property.

amari@Jaber:~/projects/testing_engine$

03. CLI Trace Signal

For large-scale audits, the engine provides high-density traces. This allows architects to verify the integrity of thousands of tests across multiple projects in seconds.

amari@SATE-Laravel: ~/projects/testing_engine
amari@Jaber:~/projects/testing_engine$ SATE_LARAVEL_ROOT=/home/amari/projects/Maktabi \
> node scripts/verifyTests.js \
> --counts-only
PHP SYNTAX8
ASSERTION PLACEMENT2
FORBIDDEN ESCAPE HATCH1
RESULT ANCHORED OBSERVABLE ASSERTION478
NO FAKE ANCHOR479
FORBIDDEN MOCKS0
EXIT:0
amari@Jaber:~/projects/testing_engine$

04. Interpreting Gaps

When reading a trace, remember that SATE-Laravel is reporting a loss of admissibility. It is not judging the feature logic, but the technical rigor of the test providing evidence for that logic.

The goal of error attribution is to guide you back to the physical reality of the system. If the Auditor cannot trace the causal link, the evidence is discarded to prevent circular learning and false confidence.

Verification is an exercise in tracing state, not just counting passes.