Описание
The verdict codes on state-protocol tokens are correct, but the message text is the core's generic disposable wording. Real output from TB-MVP-01 (samples/OrderBackend/corpus/negative/C8_stale_draft.cs.txt):
OrderBackend/C8_stale_draft.cs:18: error: [OWN002] IDisposable local 'draft' is used after it is disposed [resource: disposable]
draft is a DraftOrder state token, not an IDisposable. "Disposed" here means "spent by the Submit transition". The line points to the region entry (OrderProtocol.WithDraft(...)), not to the line where the stale use happened.
Each code has the same wording problem:
| code |
actual meaning |
needed wording |
| OWN002 |
use after a transition |
e.g. "state token 'draft' is used after a transition spent it (Submit, line N)" |
| OWN005 |
a copy is a move |
the token was copied, and the source is dead |
| OWN013 |
raw entity inside a region |
the entity is touched while a state of it is open |
| OWN001 |
a bound token never spent |
an open state never transitioned (see the affine-tokens issue) |
The line should point to the offending use, not to the region entry.
Мотивация / сценарий
This is the main UX debt of the TB-MVP-01 typed EF workflow. The compiler errors are perfect: 'DraftOrder' does not contain a definition for 'Approve'. The Own.NET errors read as if the developer had a Dispose bug, so a user unfamiliar with the analyzer internals will not understand them. samples/OrderBackend/README.md currently has to explain the wording away in a separate paragraph.
Acceptance:
- the protocol-token findings carry their own resource kind or wording, with a kind tag such as
[resource: protocol-token], and the line of the actual violating use;
- the codes do not change;
- Python and Rust CLI output stays byte-identical, and the renders and ledgers are regenerated with their own writers;
- messages for ordinary disposables do not change.
Альтернативы
- Leave the core untouched and post-process the text in the CLI front. That is a hack, and it breaks the parity contract.
- Introduce a separate
TYP0xx family (P-010 open question 6). That is a bigger decision; this issue only needs the wording and the line.
Область
diagnostics (OWN-коды)
Refs: TB-MVP-01 (#391), docs/notes/tb-mvp-01-report.md section "What the slice does not claim".
Описание
The verdict codes on state-protocol tokens are correct, but the message text is the core's generic
disposablewording. Real output from TB-MVP-01 (samples/OrderBackend/corpus/negative/C8_stale_draft.cs.txt):draftis aDraftOrderstate token, not anIDisposable. "Disposed" here means "spent by theSubmittransition". The line points to the region entry (OrderProtocol.WithDraft(...)), not to the line where the stale use happened.Each code has the same wording problem:
The line should point to the offending use, not to the region entry.
Мотивация / сценарий
This is the main UX debt of the TB-MVP-01 typed EF workflow. The compiler errors are perfect:
'DraftOrder' does not contain a definition for 'Approve'. The Own.NET errors read as if the developer had a Dispose bug, so a user unfamiliar with the analyzer internals will not understand them.samples/OrderBackend/README.mdcurrently has to explain the wording away in a separate paragraph.Acceptance:
[resource: protocol-token], and the line of the actual violating use;Альтернативы
TYP0xxfamily (P-010 open question 6). That is a bigger decision; this issue only needs the wording and the line.Область
diagnostics (OWN-коды)
Refs: TB-MVP-01 (#391),
docs/notes/tb-mvp-01-report.mdsection "What the slice does not claim".