Investigation views: define Hackmode-local Tek9 MapReduce views over operation data #15
Labels
No labels
bug
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/hackmode#15
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
Hackmode needs fast operation-scoped investigation queries, but view ownership must be split correctly: Tek9 should provide generic materialized-view primitives, while Hackmode defines investigation-specific view semantics.
Current behavior
Desired behavior
Define Hackmode-owned views after the Tek9 public read API exists.
Initial local views:
assets/by-typeassets/by-operationassets/by-domainassets/by-hostassets/by-ipassets/by-sourceassets/by-tagdomains/by-rootdomains/subdomainsurls/by-domainurls/by-statusurls/by-content-typehosts/by-porthosts/by-servicefindings/by-severityfindings/by-operationdocuments/by-operationdocuments/by-sourcerelationships/by-sourcerelationships/by-targetingest/by-stateingest/failedOnly implement views whose underlying canonical fields exist. Do not fabricate schema just to satisfy the list.
Architecture
starintel-serverwhere they serve central datasetsDependencies
Acceptance criteria
assets/by-type,assets/by-tag,ingest/by-state) is defined with fixturesVerification
Fixture operation with multiple asset types/tags/outbox states; test exact and range queries, incremental updates, and full rebuild equivalence.
Database slice landed via #166 at merge
04f65eb17ffd00198776af6770096268b95f514d.Completed in this slice:
assets/by-typeandassets/by-tagviews over canonical operation documents;query-assetsnow consumesassets/by-typerather than full-scanning the operation database;RED:
872639d130feeddcee3a6328f66795f3e4f297c9failed the real Common Lisp gate on the intentionally absentHACKMODE:ENSURE-INVESTIGATION-VIEWScontract.GREEN: exact implementation head
d23073e6df8bc8f060e84877d510d5569e12df93passed fresh non-draft PR core, monorepo, and agent-framework-boundary workflows before expected-head squash merge.Remaining #15 work stays open. In particular,
ingest/by-statecannot correctly materialize the durable outbox yet because Tek9 view application is currently hard-wired to the primary DB while the outbox is a named DB. Generic source-database selection is now tracked upstream as lost-rob0t/tek9#15; I did not duplicate/move outbox state or reach around Tek9 internals.Final database acceptance reconciliation on current master
78a9f94dc80075240afe8e595938c2cec75c984e.The issue's required first-useful subset is now complete:
assets/by-type— landed via #166;assets/by-tag— landed via #166;ingest/by-state— landed via #169 after Tek9 named-source view support became available.The acceptance invariants are covered by repository tests: repeated writes do not duplicate view rows, view rebuild matches incremental maintenance, reads go through public Tek9 materialized-view APIs, and Hackmode contains no raw-LMDB investigation-view path.
Candidate views beyond this subset remain intentionally deferred until their canonical fields exist. Per the issue contract, I am not fabricating domain/host/IP/source/finding/document/relationship schema solely to populate the original wishlist.
#15 therefore meets its stated acceptance criteria and can close. Future concrete views should be opened from proven canonical fields/query needs rather than keeping this acceptance issue artificially open.