feat(rules): adapter-has-contracts rule for daw-architecture pack #33
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#33
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
Adapters in DAW projects define contracts via _contracts table for hailjan
runtime observation. fragjan can statically verify that adapters declare
their contracts -- without _contracts, hailjan cannot observe the adapter.
Solution
New rule: adapter-has-contracts
Check that every file matching adapters/*.lua contains a _contracts table
declaration.
Pack: daw-architecture (adapter contract enforcement fits there)
Notes
This closes the static analysis side of the fragjan/hailjan learning loop:
fragjan checks if the cell has DNA (_contracts declared).
hailjan checks if the cell lives by its DNA (contracts honored at runtime).
The nil,nil bug in adapters/primitive/init.lua is the first concrete
example: hailjan would have logged it, fragjan gets a rule.
Dispatch adapters (adapters/ui) are a special case -- they may not need
_contracts in Phase 1. Revisit when hailjan Phase 3 is active.
Related
Blocked by DAW/fragjan#102 (feat(runner): flexible scan targets --
file_include, glob patterns, single file, auto-root detection).
Completed