Skip to content

Commit 55b9347

Browse files
committed
markdownlint
1 parent 64ad2fe commit 55b9347

File tree

3 files changed

+55
-38
lines changed

3 files changed

+55
-38
lines changed

notes/state-machine-findings.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ branch. A summary of key commits:
509509
| `opp07-case-status-guard` | OPP-07 (complete) |
510510

511511
**Deferred (explicit):**
512+
512513
- OPP-06 (VFD/PXA machines) — no callers yet; left as future work.
513514
- Full STATUS dict deprecation (ADR-0013 steps 2–4) — complex migration;
514515
minimum step (seed RM.VALID at case creation) is done.

plan/IMPLEMENTATION_NOTES.md

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ things based on that. It seems like it might be better to have a cleaner
567567
separation at the datalayer port where the datalayer returns domain objects
568568
consistently rather than sometimes returning raw dicts or ambiguous document
569569
objects (which are really just a datalayer abstraction rather than a core
570-
abstraction). The following subsections address this issue from different
570+
abstraction). The following subsections address this issue from different
571571
angles.
572572

573573
### Core should reliably get domain objects from datalayer, not raw dicts or datalayer-specific records
@@ -581,17 +581,17 @@ adapter expects, it should be able to say "Store this domain object" and
581581
expect that the port and adapter will handle the details on its behalf. This
582582
improves separation of concerns between core, port, and adapters.
583583

584-
If a mapping layer is needed between core objects and datalayer records,
585-
then that mapping layer belongs in an adapter not in core. The datalayer
586-
port should really be about getting and storing domain objects, with
587-
translation happening in the adapters as needed to convert between core
588-
domain objects and datalayer records. That said, it may make sense for the
589-
datalayer adapters to have a tiered structure where a thin adapter unifies
590-
the translation (like everything is a document or key-value dicts etc. with
591-
pydantic object definitions) and then storage-specific adapters decide how
584+
If a mapping layer is needed between core objects and datalayer records,
585+
then that mapping layer belongs in an adapter not in core. The datalayer
586+
port should really be about getting and storing domain objects, with
587+
translation happening in the adapters as needed to convert between core
588+
domain objects and datalayer records. That said, it may make sense for the
589+
datalayer adapters to have a tiered structure where a thin adapter unifies
590+
the translation (like everything is a document or key-value dicts etc. with
591+
pydantic object definitions) and then storage-specific adapters decide how
592592
to generically persist those (into TinyDB, MongoDB, SQL, etc. as needed).
593-
The key point is that if core is struggling to identify what it got back
594-
from the datalayer, then we haven't got the right abstractions in place at
593+
The key point is that if core is struggling to identify what it got back
594+
from the datalayer, then we haven't got the right abstractions in place at
595595
the port and adapter layers yet.
596596

597597
## Datalayer storage records might need a rethink
@@ -604,27 +604,34 @@ core, and datalayer. Research into the codebase to understand the problem is
604604
needed before implementing any refactoring. Both the investigation and the
605605
refactoring should be tracked in the implementation plan.
606606

607-
Core should be agnostic to datalayer's storage structure and organization,
608-
not just the format. Core doesn't need to know if datalayer has separate
609-
tables per type or just a giant blob of JSON records with a type field, or
610-
whatever. Datalayer needs to care, but even that might be an
611-
adapter-specific concern rather than a port-level concern (except insofar as
612-
the port must provide sufficient abstractions to cover the core's need to do
607+
Core should be agnostic to datalayer's storage structure and organization,
608+
not just the format. Core doesn't need to know if datalayer has separate
609+
tables per type or just a giant blob of JSON records with a type field, or
610+
whatever. Datalayer needs to care, but even that might be an
611+
adapter-specific concern rather than a port-level concern (except insofar as
612+
the port must provide sufficient abstractions to cover the core's need to do
613613
CRUD operations, plus find/search/query, usual database stuff.)
614614

615615
### Vocabulary registry entanglement across wire, core, and datalayer
616616

617-
Thirdly, the vocabulary registry was created when wire and core were the same
618-
thing
619-
and datalayer was a persistence detail. So there are places where the
620-
vocabulary registry is being used for lookups for things outside of wire,
621-
when in fact that is an artifact of the pre-hexagonal architecture.
617+
Thirdly, the vocabulary registry was created when wire and core were the same
618+
thing
619+
and datalayer was a persistence detail. So there are places where the
620+
vocabulary registry is being used for lookups for things outside of wire,
621+
when in fact that is an artifact of the pre-hexagonal architecture.
622622
`db_record.py` and `rehydration.py` are specific examples of this problem. We
623-
need to tease these apart. The interaction between core and datalayer should
624-
be in terms of core domain objects without the tight coupling to wire format
625-
that the vocabulary registry creates. This is not to say that the datalayer
626-
should be ignorant of data types or that the vocabulary registry should be
627-
abandoned, but rather that the datalayer should have its own way to
628-
recognize what kinds of objects it is handling and the core should be able
629-
to work with the datalayer just as robustly (with typed objects) even if the
630-
entire wire layer were removed.
623+
need to tease these apart. The interaction between core and datalayer should
624+
be in terms of core domain objects without the tight coupling to wire format
625+
that the vocabulary registry creates. This is not to say that the datalayer
626+
should be ignorant of data types or that the vocabulary registry should be
627+
abandoned, but rather that the datalayer should have its own way to
628+
recognize what kinds of objects it is handling and the core should be able
629+
to work with the datalayer just as robustly (with typed objects) even if the
630+
entire wire layer were removed.
631+
632+
## VCR-019d is largely addressed by the `transitions` refactor
633+
634+
Although we've largely addressed VCR-019d through the `transitions` refactor,
635+
we should still do a sweep to identify any remaining procedural state logic that
636+
could benefit from using the newly created state machine factory functions
637+
in `vultron.core.states.{em,rm,cs}` and the state machines they enable.

plan/PRIORITIES.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,23 @@ specs, or tasks should be updated to reflect the new information from
3939
IDEAS.md. DOCS-2 is required at this stage so we can merge a clean PR with all
4040
github action CI tasks passing.
4141

42+
## Priority 90: Fully address ADR-0013 and OPP-06
43+
44+
`docs/adr/ADR-0013.md` was created to capture the decision to unify state
45+
tracking for the RM lifecycle. As noted in `notes/state-machine-findings.
46+
md`, there are a number of steps to be taken to fully implement this
47+
decision. We need to clearly identify and execute those steps before we
48+
proceed with the next priority. These need to be added to `notes/`, `specs/`,
49+
and `plan/IMPLEMENTATION_PLAN.md` tasks as appropriate.
50+
51+
We should also capture references to OPP-06
52+
in the relevant `notes/` files, and in `specs/` and in the implementation
53+
plan.
54+
55+
This priority covers both *capturing* the tasks, requirements, and notes,
56+
and *implementing* the changes needed to fully realize this aspect of the
57+
design.
58+
4259
## Priority 100: Actor independence
4360

4461
Each actor exists in its own behavior tree domain. So Actor A and Actor B
@@ -51,14 +68,6 @@ Implementation Phase OUTBOX-1 logically falls under this priority, because
5168
it's part of getting messages flowing between actors. But it does not
5269
fully achieve this goal by itself.
5370

54-
## Priority 150: Refactor RM, EM, and CS state models to use `transitions`
55-
56-
This item is briefly captured in VCR-019d but it represents a larger
57-
evaluation that will need to be broken into subtasks before any
58-
implementation can occur. A study task should be injected to evaluate the
59-
suitability of the `transitions` library to assist tracking state changes in
60-
the Report and Case objects in `vultron.core`.
61-
6271
## Priority 200: Case Actor as source of truth for case state
6372

6473
The CaseActor becomes a resource that can manages the VulnerabilityCase. While

0 commit comments

Comments
 (0)