One failure-evidence block, assembled from the surfaces the plugin already owns — never from a rival probe or a private field. A test that fails, or a runtime action that refuses, should be explainable from what the plugin recorded while it happened. This helper only reads: it composes PlacementTelemetry snapshots, PlacementExplain guidance and the host's bounded diagnostic records into one JSON-safe dictionary plus a compact text block, so a failing assertion can carry the evidence instead of the reader re-running it with prints. What it deliberately does not do: dispatch anything, mint an attempt id, or invent a record. Anything it could not read is named in missing so an empty section reads as "unavailable here", not as "nothing happened". Usage: var evidence := PlacementFailureEvidence.capture(host, session, { "scenario": "room-stacking", "phase": "commit", }) push_error(PlacementFailureEvidence.format(evidence))
Source: addons/grid_placement/debug/placement_failure_evidence.gd
Syntax
class PlacementFailureEvidence extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
RECORD_TAIL | Field | How many of the host's newest diagnostic records travel with a failure. The host's recorder is bounded; this keeps a failure message readable. |
ORIGIN_INPUT_KEYS | Field | Caller-observed gesture envelope keys, grouped by the proof they carry. Only these keys are copied into the evidence; anything else the caller passes is dropped so the block stays bounded. Absent keys are named in `origin.missing` instead of invented, so a partial envelope reads as partial, never as complete. |
ORIGIN_PICK_KEYS | Field | |
ORIGIN_COMMIT_KEYS | Field | |
RUN_ID_ENV | Field | Which run and which shard produced this failure, as the shard runner exports it. A caller that already knows its labels passes them in the context and wins; a case run outside `run_test_tree.py` reads an empty value, which the block prints rather than inventing a run id. |
SHARD_ENV | Field | |
capture | Method | |
missing | Property | |
evidence | Property | |
startup_summary | Property | |
runtime_summary | Property | |
correlation | Property | |
world_id | Property | |
hover_cast | Property | |
dispatch | Property | |
lifecycle | Property | |
actual_attempt_id | Property | |
expected_attempt_id | Property | |
records | Property | |
format | Method |