Detect plain-string error propagation in DAW 2.x Lua code #134
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type/architecture
type
bug
type
config
type
deployment
type
docs
type/documentation
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
type/task
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/fragjan#134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The DAW 2.x error model requires structured
daw_error/v1objects atthe point where actual errors are detected. Historically, internal
helpers could return plain error strings, and that pattern can reappear
unless checked mechanically.
Goal
Teach Fragjan to detect likely plain-string error propagation in DAW 2.x
Lua error paths.
Initial checks
Flag likely cases such as:
when they represent actual error propagation, including cases where a
plain helper error is later passed as the complete message of a
daw_error/v1.Do not assume every returned string is an error.
Acceptance criteria
daw_error/v1.cause.fragjan code ..Related
DAW/daw-lua-common#48daw_error/v1Known limitation: no-plain-string-error-variable
no-plain-string-error-variablestays at warning level as long as itis implemented via
linepattern. It intentionally flags ambiguousreturn nil, <identifier>sites for human review.Correct propagation of an identifier that already holds a
daw_error/v1object cannot be distinguished reliably by linepatternalone -- it has no notion of a variable's origin or type, only the
text of the current line.
Type-/flow-aware suppression of these false positives depends on the
Lua structural analysis tracked in
DAW/fragjan#107(luascan).Until then, known-correct sites may be explicitly suppressed after
human review. They are not violations merely because the warning
remains -- the warning marks "needs a human look", not "is wrong".