Repository navigation
chore(miner): add ourios-miner crate with §5 acceptance stubs (specified → red) #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
23f3a92
chore(miner): add ourios-miner crate with §5 acceptance stubs (specif…
jensholdgaard 5d74cbf
chore(miner, verification): split Red gate into inner and outer loops
jensholdgaard effd842
docs(verification): fix cargo invocation syntax + sync H1.x worked ex…
jensholdgaard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [package] | ||
| name = "ourios-miner" | ||
| version = "0.0.0" | ||
| description = "Drain-derived online template miner for Ourios." | ||
| edition.workspace = true | ||
| rust-version.workspace = true | ||
| license.workspace = true | ||
| repository.workspace = true | ||
| publish = false | ||
|
|
||
| [lints] | ||
| workspace = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| //! Drain-derived online template miner for Ourios. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| //! RFC 0001 §5.1 — Hazards. Acceptance-criteria stubs for H1, H2, | ||
| //! H5, H7. Each `#[test]` carries the scenario id in its doc | ||
| //! comment so `grep -R "H1.1" .` resolves bidirectionally between | ||
| //! the RFC and the tests (`docs/verification.md` §2.3). | ||
|
|
||
| /// Scenario H1.1 — Semantically distinct templates do not silently merge. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h1_1_login_and_logout_remain_distinct_at_default_threshold() { | ||
| todo!("RFC 0001 §6.4"); | ||
| } | ||
|
|
||
| /// Scenario H1.2 — Lossy-zone match retains body. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h1_2_lossy_zone_match_retains_body() { | ||
| todo!("RFC 0001 §6.6"); | ||
| } | ||
|
|
||
| /// Scenario H1.3 — Every widening emits an audit event. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h1_3_every_widening_emits_an_audit_event() { | ||
| todo!("RFC 0001 §6.4"); | ||
| } | ||
|
|
||
| /// Scenario H2.1 — Oversized parameter triggers OVERFLOW marker and forced body retention. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h2_1_oversized_parameter_triggers_overflow_marker() { | ||
| todo!("RFC 0001 §6.5"); | ||
| } | ||
|
|
||
| /// Scenario H2.2 — Per-service overflow rate above 1% raises an alert. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h2_2_per_service_overflow_rate_above_one_percent_alerts() { | ||
| todo!("RFC 0001 §6.5"); | ||
| } | ||
|
|
||
| /// Scenario H5.1 — Wildcard widening increments `template_version` and emits `template_widened`. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h5_1_wildcard_widening_increments_version_and_emits_template_widened() { | ||
| todo!("RFC 0001 §6.4"); | ||
| } | ||
|
|
||
| /// Scenario H5.2 — Type expansion increments `template_version` and emits `template_type_expanded`. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h5_2_type_expansion_increments_version_and_emits_template_type_expanded() { | ||
| todo!("RFC 0001 §6.4"); | ||
| } | ||
|
|
||
| /// Scenario H5.3 — Drift query returns templates that gained a version in window. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h5_3_drift_query_returns_templates_that_gained_a_version() { | ||
| todo!("RFC 0001 §6.7"); | ||
| } | ||
|
|
||
| /// Scenario H7.1 — Reconstruction property holds across the corpus. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h7_1_reconstruction_property_holds_across_corpus() { | ||
| todo!("RFC 0001 §6.6"); | ||
| } | ||
|
|
||
| /// Scenario H7.2 — Tokenizer failure sets `lossy_flag = true` and retains body. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h7_2_tokenizer_failure_sets_lossy_flag_and_retains_body() { | ||
| todo!("RFC 0001 §6.6"); | ||
| } | ||
|
|
||
| /// Scenario H7.3 — Reader emits body verbatim when `lossy_flag` is true. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h7_3_reader_emits_body_verbatim_when_lossy_flag_is_true() { | ||
| todo!("RFC 0001 §6.6"); | ||
| } | ||
|
|
||
| /// Scenario H7.4 — Widened literal slot reconstructs via STR fallback. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn h7_4_widened_literal_slot_reconstructs_via_str_fallback() { | ||
| todo!("RFC 0001 §6.2"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| //! RFC 0001 §5.2 — Invariants. Acceptance-criteria stubs for | ||
| //! CLAUDE.md §3.1, §3.2, §3.3, §3.5, §3.7. Each `#[test]` carries | ||
| //! the scenario id in its doc comment so `grep -R "§3.1.1" .` | ||
| //! resolves bidirectionally between the RFC and the tests | ||
| //! (`docs/verification.md` §2.3). | ||
|
|
||
| /// Scenario §3.1.1 — Default similarity threshold is 0.7. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn invariant_3_1_1_default_threshold_is_0_7() { | ||
| todo!("RFC 0001 §6.3"); | ||
| } | ||
|
|
||
| /// Scenario §3.1.2 — Mandatory metric set is exposed. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn invariant_3_1_2_mandatory_metric_set_is_exposed() { | ||
| todo!("RFC 0001 §6.8"); | ||
| } | ||
|
|
||
| /// Scenario §3.2.1 — Default per-parameter byte limit is 256. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn invariant_3_2_1_default_param_byte_limit_is_256() { | ||
| todo!("RFC 0001 §6.5"); | ||
| } | ||
|
|
||
| /// Scenario §3.2.2 — Configured limit above 1 KiB is rejected at startup. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn invariant_3_2_2_param_limit_above_1_kib_rejected_at_startup() { | ||
| todo!("RFC 0001 §6.5"); | ||
| } | ||
|
|
||
| /// Scenario §3.3.1 — Separators array captured on every successful tokenization. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn invariant_3_3_1_separators_captured_on_every_tokenization() { | ||
| todo!("RFC 0001 §6.6"); | ||
| } | ||
|
|
||
| /// Scenario §3.5.1 — Snapshot format carries a leading version byte. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn invariant_3_5_1_snapshot_format_carries_leading_version_byte() { | ||
| todo!("RFC 0001 §6.9"); | ||
| } | ||
|
|
||
| /// Scenario §3.5.2 — Unknown snapshot version triggers full WAL replay. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn invariant_3_5_2_unknown_snapshot_version_triggers_wal_replay() { | ||
| todo!("RFC 0001 §6.9"); | ||
| } | ||
|
|
||
| /// Scenario §3.7.1 — Tenants' template trees never cross-pollinate. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn invariant_3_7_1_tenant_trees_never_cross_pollinate() { | ||
| todo!("RFC 0001 §6.1, §6.2"); | ||
| } | ||
|
|
||
| /// Scenario §3.7.2 — Same structural template in two tenants gets distinct `template_id`s. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn invariant_3_7_2_same_template_two_tenants_distinct_template_ids() { | ||
| todo!("RFC 0001 §6.1"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| //! RFC 0001 §5.3 — RFC-internal design commitments. Acceptance- | ||
| //! criteria stubs for `RFC0001.x`. Each `#[test]` carries the | ||
|
jensholdgaard marked this conversation as resolved.
Resolved
|
||
| //! scenario id in its doc comment so `grep -R "RFC0001.1" .` | ||
| //! resolves bidirectionally between the RFC and the tests | ||
| //! (`docs/verification.md` §2.3). | ||
|
|
||
| /// Scenario RFC0001.1 — Fresh-leaf creation does not emit an audit event. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn rfc0001_1_fresh_leaf_creation_does_not_emit_audit_event() { | ||
| todo!("RFC 0001 §6.2"); | ||
| } | ||
|
|
||
| /// Scenario RFC0001.2 — Degenerate-template guard rejects fully-wildcard widening. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn rfc0001_2_degenerate_template_guard_rejects_fully_wildcard_widening() { | ||
| todo!("RFC 0001 §6.4"); | ||
| } | ||
|
|
||
| /// Scenario RFC0001.3 — Tokenizer is Unicode whitespace only; punctuation stays in tokens. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn rfc0001_3_tokenizer_is_unicode_whitespace_only() { | ||
| todo!("RFC 0001 §6.2"); | ||
| } | ||
|
|
||
| /// Scenario RFC0001.4 — Confidence ratio = simSeq / threshold; decision boundary at 1.0. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn rfc0001_4_confidence_ratio_decision_boundary_at_one() { | ||
| todo!("RFC 0001 §6.3"); | ||
| } | ||
|
|
||
| /// Scenario RFC0001.5 — Bare `template_id = X` spans all versions of leaf X. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn rfc0001_5_bare_template_id_spans_all_versions_of_leaf() { | ||
| todo!("RFC 0001 §6.7"); | ||
| } | ||
|
|
||
| /// Scenario RFC0001.6 — Bare `template_id = X` does NOT follow alias chains. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn rfc0001_6_bare_template_id_does_not_follow_alias_chains() { | ||
| todo!("RFC 0001 §6.7"); | ||
| } | ||
|
|
||
| /// Scenario RFC0001.7 — Combined widening + type-expansion increments version twice and emits two events in order. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn rfc0001_7_combined_widening_and_type_expansion_emits_two_events_in_order() { | ||
| todo!("RFC 0001 §6.2, §6.4"); | ||
| } | ||
|
|
||
| /// Scenario RFC0001.8 — `confidence_p50` and `confidence_p01` are emitted as gauges. | ||
| /// See `docs/rfcs/0001-template-miner.md` §5. | ||
| #[test] | ||
| fn rfc0001_8_confidence_p50_and_p01_are_emitted_as_gauges() { | ||
| todo!("RFC 0001 §6.8"); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.