Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions artifacts/decisions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@
status: draft
tags: [rendering, markdown, architecture]
fields:
rationale: CommonMark rendering via pulldown-cmark. Lightweight, no-alloc, already proven in the Rust ecosystem. Artifact descriptions contain markdown syntax that is currently escaped and displayed as plain text.

Check warning on line 681 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

681:121 [line-length] line too long (219 > 120 characters)

links:
- type: satisfies
Expand All @@ -689,7 +689,7 @@
status: draft
tags: [documents, embedding, architecture]
fields:
rationale: Embed syntax uses colon-separated modifiers (full, links, upstream, downstream, chain) that the schema interprets. The schema defines which link types go up (satisfies, implements) vs down (satisfied-by, implemented-by). Traversal depth is configurable. Same syntax works in dashboard and static HTML export.

Check warning on line 692 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

692:121 [line-length] line too long (325 > 120 characters)
links:
- type: satisfies
target: REQ-033
Expand All @@ -705,8 +705,8 @@
with structure matching the STPA Handbook methodology.
tags: [adapter, stpa, architecture]
fields:
alternatives: Reuse the generic YAML adapter with type-prefixed keys. Rejected because it obscures the STPA methodology structure and makes manual editing harder for safety engineers who think in STPA terms.

Check warning on line 708 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

708:121 [line-length] line too long (213 > 120 characters)
rationale: STPA artifacts use a domain-specific YAML structure (losses.yaml, hazards.yaml, ucas.yaml) rather than the generic format, matching the STPA Handbook structure and enabling direct import from meld.

Check warning on line 709 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

709:121 [line-length] line too long (214 > 120 characters)

links:
- type: satisfies
Expand All @@ -724,8 +724,8 @@
downstream tool can consume without domain-specific knowledge.
tags: [adapter, architecture]
fields:
alternatives: Per-domain YAML formats for each schema (ASPICE YAML, cybersecurity YAML). Rejected because it fragments tooling and requires adapter-per-domain rather than a single generic path.

Check warning on line 727 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

727:121 [line-length] line too long (199 > 120 characters)
rationale: The generic YAML adapter uses a single canonical format with explicit type, links array, and fields map per artifact. This provides a universal interchange format that any adapter can target and any tool can consume without domain-specific knowledge.

Check warning on line 728 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

728:121 [line-length] line too long (267 > 120 characters)

links:
- type: satisfies
Expand All @@ -741,8 +741,8 @@
internal salsa/rowan state.
tags: [adapter, aadl, architecture]
fields:
alternatives: Embed spar-parser as a Rust library dependency. Rejected because spar uses salsa and rowan with complex internal state that would tightly couple the two tools. CLI JSON is a clean boundary.

Check warning on line 744 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

744:121 [line-length] line too long (209 > 120 characters)
rationale: The AADL adapter imports architecture models via spar CLI JSON output rather than parsing AADL directly. This avoids duplicating spar's parser and leverages spar's analysis results (diagnostics, resolved references). The JSON interchange format is stable and version-negotiable between spar and rivet.

Check warning on line 745 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

745:121 [line-length] line too long (318 > 120 characters)

links:
- type: satisfies
Expand All @@ -760,8 +760,8 @@
SpecObject attribute values.
tags: [adapter, reqif, architecture]
fields:
alternatives: Strip XHTML and store plain text only. Rejected because it loses formatting, tables, and embedded images that are semantically significant in requirements documents.

Check warning on line 763 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

763:121 [line-length] line too long (185 > 120 characters)
rationale: The ReqIF adapter preserves XHTML rich-text content during import/export rather than flattening to plain text. This is required for round-trip fidelity with tools like Polarion and DOORS that use embedded XHTML in SpecObject attribute values. Content is stored as-is in artifact fields and rendered in the dashboard.

Check warning on line 764 in artifacts/decisions.yaml

View workflow job for this annotation

GitHub Actions / YAML Lint

764:121 [line-length] line too long (333 > 120 characters)
links:
- type: satisfies
target: REQ-005
Expand Down Expand Up @@ -845,3 +845,24 @@
metadata from the export content so the same export can be deployed
in multiple contexts.
alternatives: Embed version list at export generation time. Rejected because it requires re-export when new versions are published.

- id: DD-039
type: design-decision
title: Embed assets via include_str!/include_bytes! with build.rs stub generation
status: approved
description: >
JavaScript (HTMX, Mermaid) and WASM (spar) assets are embedded in the
binary via include_str!/include_bytes!. build.rs generates stub files
when spar WASM is not built, ensuring compilation always succeeds.
The runtime detects stubs and shows a fallback message.
tags: [architecture, assets, wasm]
links:
- type: satisfies
target: REQ-022
fields:
rationale: >
Embedding assets eliminates CDN dependencies and enables offline
operation. Stub generation ensures the build never fails due to
missing optional WASM assets.
alternatives: Serve from filesystem at runtime. Rejected because it
requires deploying assets separately from the binary.
4 changes: 4 additions & 0 deletions artifacts/features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ artifacts:
links:
- type: satisfies
target: REQ-014
- type: satisfies
target: REQ-009
fields:
phase: phase-1

Expand Down Expand Up @@ -245,6 +247,8 @@ artifacts:
links:
- type: satisfies
target: REQ-015
- type: satisfies
target: REQ-003
- type: implements
target: DD-010
fields:
Expand Down
13 changes: 12 additions & 1 deletion rivet-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ enum Command {
/// Port to listen on
#[arg(short = 'P', long, default_value = "3000")]
port: u16,
/// Address to bind to (default: 127.0.0.1, localhost only)
#[arg(short = 'B', long, default_value = "127.0.0.1")]
bind: String,
},

/// Sync external project dependencies into .rivet/repos/
Expand Down Expand Up @@ -648,8 +651,15 @@ fn run(cli: Cli) -> Result<bool> {
format,
strict,
} => cmd_commits(&cli, since.as_deref(), range.as_deref(), format, *strict),
Command::Serve { port } => {
Command::Serve { port, bind } => {
let port = *port;
let bind = bind.clone();
if bind == "0.0.0.0" || bind == "::" {
eprintln!(
"warning: binding to {} exposes the dashboard to all network interfaces",
bind
);
}
let ctx = ProjectContext::load_full(&cli)?;
let schemas_dir = resolve_schemas_dir(&cli);
let mut doc_dirs = Vec::new();
Expand All @@ -674,6 +684,7 @@ fn run(cli: Cli) -> Result<bool> {
schemas_dir,
doc_dirs,
port,
bind,
))?;
Ok(true)
}
Expand Down
5 changes: 3 additions & 2 deletions rivet-cli/src/serve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ pub async fn run(
schemas_dir: PathBuf,
doc_dirs: Vec<PathBuf>,
port: u16,
bind: String,
) -> Result<()> {
let git = capture_git_info(&project_path);
let loaded_at = std::process::Command::new("date")
Expand Down Expand Up @@ -405,8 +406,8 @@ pub async fn run(
},
));

let addr = format!("0.0.0.0:{port}");
eprintln!("rivet dashboard listening on http://localhost:{port}");
let addr = format!("{bind}:{port}");
eprintln!("rivet dashboard listening on http://{bind}:{port}");

let listener = tokio::net::TcpListener::bind(&addr).await?;
axum::serve(listener, app).await?;
Expand Down
24 changes: 24 additions & 0 deletions rivet-cli/src/serve/styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,4 +651,28 @@ table.sortable th:hover{color:var(--text)}
.cell-detail ul{list-style:none;padding:.5rem;margin:0}
.cell-detail li{padding:.25rem .5rem;border-bottom:1px solid var(--border)}
.cell-detail li:last-child{border-bottom:none}

/* ── Filter bar ────────────────────────────────────────── */
.filter-bar{margin-bottom:1rem;padding:1rem}
.filter-bar .form-row{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}

/* ── Pagination ────────────────────────────────────────── */
.pagination{display:flex;gap:.25rem;align-items:center;justify-content:center;
margin-top:1rem;padding:.75rem 0;flex-wrap:wrap}
.pagination a{display:inline-flex;align-items:center;justify-content:center;
min-width:2rem;height:2rem;padding:0 .5rem;border:1px solid var(--border);
border-radius:var(--radius-sm);font-size:.82rem;font-family:var(--font);
color:var(--text);background:var(--surface);text-decoration:none;
transition:all var(--transition);cursor:pointer}
.pagination a:hover{background:var(--accent);color:#fff;border-color:var(--accent)}
.pagination-current{display:inline-flex;align-items:center;justify-content:center;
min-width:2rem;height:2rem;padding:0 .5rem;border:1px solid var(--accent);
border-radius:var(--radius-sm);font-size:.82rem;font-weight:600;
color:#fff;background:var(--accent)}
.pagination-disabled{display:inline-flex;align-items:center;justify-content:center;
min-width:2rem;height:2rem;padding:0 .5rem;border:1px solid var(--border);
border-radius:var(--radius-sm);font-size:.82rem;
color:var(--text-secondary);background:var(--surface);opacity:.5}
.pagination-ellipsis{display:inline-flex;align-items:center;justify-content:center;
min-width:1.5rem;height:2rem;font-size:.82rem;color:var(--text-secondary)}
"#;
Loading
Loading