1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Intent-source resolver (ISR) — shared resolver for the conformance gates.
//!
//! # Spec References
//!
//! - [`SPEC-CONFORMANCE-03~draft`](docs/specs/intent-conformance.md#SPEC-CONFORMANCE-03~draft)
//!
//! Why: the intent/method conformance capability (DOC-15) ships two gates — a
//! FRONT gate in trusty-mpm (pre-work) and a BACK gate in trusty-review
//! (post-implementation). Both must resolve "what method did the ticket and the
//! spec prescribe?" and apply the same precedence (ticket > spec). Implementing
//! that resolution **once**, in the crate both gates already depend on, is the
//! only placement that guarantees the two gates can never disagree (spec §6.5,
//! goal G4) and avoids a new cross-crate edge.
//!
//! What: the ISR resolves a [`IntentQuery`] (a PR or a ticket-id) into a single
//! [`ResolvedIntent`] carrying the ticket method, the spec method, the
//! precedence winner, and the `conflict`/`stale_spec` flags. Resolution is
//! **fail-open**: any fetch/parse failure yields
//! [`ResolvedIntent::unresolved`], never a panic or `Err` (spec §4.2). The
//! crate is a library, so errors are a `thiserror` enum ([`IsrError`]) and
//! there are no `unwrap()`s on fetch/parse paths.
//!
//! Submodules (one concept each, to stay under the 500-SLOC cap):
//! - [`types`] — the data contract (`IntentQuery`, `ResolvedIntent`, …).
//! - [`linkage`] — PR → ticket extraction (tga regexes lifted, spec §6.3).
//! - [`spec_resolve`] — SLD docstring-ref → spec section (spec §6.4; C4 hardens).
//! - [`extract`] — method extraction (the OQ-1 seam; heuristic default).
//! - [`resolve`] — the `resolve` entry point + precedence + auth seams.
//! - [`backend_fetcher`] — production `TicketFetcher`/`SpecLookup` defaults.
//!
//! Test: `super::tests` (inline `#[cfg(test)] mod tests`) covers AC-1..AC-7 —
//! all four precedence cases, fail-open, PR→ticket linkage, the no-SLD-ref gap,
//! and the stale-spec conflict flag — without any network access.
// ── Public facade re-exports (callers import from `intent_source::*`) ─────────
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;