Skip to content

Commit b59c37a

Browse files
committed
Merge branch 'chore/cicd-optimizations'
2 parents 4b0d474 + dede093 commit b59c37a

12 files changed

Lines changed: 173 additions & 28 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Dustfile — Cleanup and Hygiene Contract
3+
4+
[dustfile]
5+
version = "1.0.0"
6+
format = "a2ml"
7+
8+
[cleanup]
9+
stale-branch-policy = "delete-after-merge"
10+
artifact-retention = "90-days"
11+
cache-policy = "clear-on-release"
12+
13+
[hygiene]
14+
linting = "required"
15+
formatting = "required"
16+
dead-code-removal = "encouraged"
17+
todo-tracking = "tracked-in-issues"
18+
19+
[reversibility]
20+
backup-before-destructive = true
21+
rollback-mechanism = "git-revert"
22+
data-retention-policy = "preserve-30-days"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Feedback-o-Tron Integration — Autonomous Bug Reporting
3+
4+
[integration]
5+
name = "feedback-o-tron"
6+
type = "bug-reporter"
7+
repository = "https://github.com/hyperpolymath/feedback-o-tron"
8+
9+
[reporting-config]
10+
platforms = ["github", "gitlab", "bugzilla"]
11+
deduplication = true
12+
audit-logging = true
13+
auto-file-upstream = "on-external-dependency-failure"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Proven Integration — Formally Verified Safety Library
3+
4+
[integration]
5+
name = "proven"
6+
type = "safety-library"
7+
repository = "https://github.com/hyperpolymath/proven"
8+
version = "1.2.0"
9+
10+
[binding-policy]
11+
approach = "thin-ffi-wrapper"
12+
unsafe-patterns = "replace-with-proven-equivalent"
13+
modules-available = ["SafeMath", "SafeString", "SafeJSON", "SafeURL", "SafeRegex", "SafeSQL", "SafeFile", "SafeTemplate", "SafeCrypto"]
14+
15+
[adoption-guidance]
16+
priority = "high"
17+
scope = "all-string-json-url-crypto-operations"
18+
migration = "incremental — replace unsafe patterns as encountered"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# VeriSimDB Feed — Cross-Repo Analytics Data Store
3+
4+
[integration]
5+
name = "verisimdb"
6+
type = "data-feed"
7+
repository = "https://github.com/hyperpolymath/nextgen-databases"
8+
data-store = "verisimdb-data"
9+
10+
[feed-config]
11+
emit-scan-results = true
12+
emit-build-metrics = true
13+
emit-dependency-graph = true
14+
format = "hexad"
15+
destination = "verisimdb-data/feeds/"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Vexometer Integration — Irritation Surface Analysis
3+
4+
[integration]
5+
name = "vexometer"
6+
type = "friction-measurement"
7+
repository = "https://github.com/hyperpolymath/vexometer"
8+
9+
[measurement-config]
10+
dimensions = 10
11+
emit-isa-reports = true
12+
lazy-eliminator = true
13+
satellite-interventions = true
14+
15+
[hooks]
16+
cli-tools = "measure-on-error"
17+
ui-panels = "measure-on-interaction"
18+
build-failures = "measure-on-failure"

EXPLAINME.adoc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
= hesiod-dns-map — Show Me The Receipts
3+
:toc:
4+
:icons: font
5+
6+
The README makes claims. This file backs them up.
7+
8+
[quote, README]
9+
____
10+
HS-class DNS zone files, Hesiod naming, and resource mapping for the FlatRacoon Network Stack.
11+
____
12+
13+
== Technology Choices
14+
15+
[cols="1,2"]
16+
|===
17+
| Technology | Learn More
18+
19+
| **Rust** | https://www.rust-lang.org
20+
|===
21+
22+
== File Map
23+
24+
[cols="1,2"]
25+
|===
26+
| Path | What's There
27+
28+
| `test(s)/` | Test suite
29+
|===
30+
31+
== Questions?
32+
33+
Open an issue or reach out directly — happy to explain anything in more detail.

justfile renamed to Justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,7 @@ validate file:
6363
build-riscv:
6464
@echo "Building for RISC-V..."
6565
cross build --target riscv64gc-unknown-linux-gnu
66+
67+
# Run panic-attacker pre-commit scan
68+
assail:
69+
@command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"

crates/hesinfo/src/main.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ enum Commands {
7171
async fn main() -> Result<()> {
7272
tracing_subscriber::fmt()
7373
.with_env_filter(
74-
tracing_subscriber::EnvFilter::try_from_default_env()
75-
.unwrap_or_else(|_| "info".into()),
74+
tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or_else(|_| "info".into()),
7675
)
7776
.init();
7877

@@ -129,12 +128,10 @@ async fn cmd_lookup(key: &str, map: &str, server: &str, port: u16) -> Result<()>
129128
sock.send_to(&wire, &addr).await?;
130129

131130
let mut buf = vec![0u8; 4096];
132-
let (len, _) = tokio::time::timeout(
133-
std::time::Duration::from_secs(5),
134-
sock.recv_from(&mut buf),
135-
)
136-
.await
137-
.context("DNS query timed out")??;
131+
let (len, _) =
132+
tokio::time::timeout(std::time::Duration::from_secs(5), sock.recv_from(&mut buf))
133+
.await
134+
.context("DNS query timed out")??;
138135

139136
let response = Message::from_vec(&buf[..len])?;
140137

@@ -199,7 +196,11 @@ fn cmd_validate(file: &std::path::Path) -> Result<()> {
199196
for (line_no, line) in content.lines().enumerate() {
200197
let line = line.trim();
201198
// Skip comments and empty lines
202-
if line.is_empty() || line.starts_with(';') || line.starts_with('$') || line.starts_with('@') {
199+
if line.is_empty()
200+
|| line.starts_with(';')
201+
|| line.starts_with('$')
202+
|| line.starts_with('@')
203+
{
203204
continue;
204205
}
205206
// Look for HS TXT lines

crates/hesiod-lib/src/health.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
44
use std::sync::Arc;
55

6+
use axum::Router;
67
use axum::extract::State;
78
use axum::http::StatusCode;
89
use axum::response::Json;
910
use axum::routing::{get, post};
10-
use axum::Router;
11-
use serde_json::{json, Value};
11+
use serde_json::{Value, json};
1212
use tracing::info;
1313

1414
use crate::server::DnsServerState;
@@ -35,9 +35,7 @@ async fn health_check(State(state): State<Arc<DnsServerState>>) -> Json<Value> {
3535

3636
/// `GET /dns/metrics` - Returns query count and performance metrics.
3737
async fn metrics(State(state): State<Arc<DnsServerState>>) -> Json<Value> {
38-
let query_count = state
39-
.query_count
40-
.load(std::sync::atomic::Ordering::Relaxed);
38+
let query_count = state.query_count.load(std::sync::atomic::Ordering::Relaxed);
4139
let uptime = state.start_time.elapsed().as_secs();
4240
let qps = if uptime > 0 {
4341
query_count as f64 / uptime as f64

crates/hesiod-lib/src/records.rs

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
use std::fmt;
66

7-
use anyhow::{bail, Context, Result};
7+
use anyhow::{Context, Result, bail};
88
use serde::{Deserialize, Serialize};
99

1010
/// Map types corresponding to Hesiod naming conventions.
@@ -75,7 +75,10 @@ impl PasswdRecord {
7575
pub fn from_txt(txt: &str) -> Result<Self> {
7676
let parts: Vec<&str> = txt.splitn(7, ':').collect();
7777
if parts.len() != 7 {
78-
bail!("passwd record requires 7 colon-separated fields, got {}", parts.len());
78+
bail!(
79+
"passwd record requires 7 colon-separated fields, got {}",
80+
parts.len()
81+
);
7982
}
8083
Ok(Self {
8184
username: parts[0].to_string(),
@@ -115,7 +118,10 @@ impl GroupRecord {
115118
pub fn from_txt(txt: &str) -> Result<Self> {
116119
let parts: Vec<&str> = txt.splitn(4, ':').collect();
117120
if parts.len() != 4 {
118-
bail!("group record requires 4 colon-separated fields, got {}", parts.len());
121+
bail!(
122+
"group record requires 4 colon-separated fields, got {}",
123+
parts.len()
124+
);
119125
}
120126
let members = if parts[3].is_empty() {
121127
Vec::new()
@@ -157,7 +163,10 @@ impl ServiceRecord {
157163
pub fn from_txt(txt: &str) -> Result<Self> {
158164
let parts: Vec<&str> = txt.splitn(3, ':').collect();
159165
if parts.len() != 3 {
160-
bail!("service record requires 3 colon-separated fields, got {}", parts.len());
166+
bail!(
167+
"service record requires 3 colon-separated fields, got {}",
168+
parts.len()
169+
);
161170
}
162171
Ok(Self {
163172
host: parts[0].to_string(),
@@ -188,13 +197,19 @@ pub struct FilsysRecord {
188197

189198
impl FilsysRecord {
190199
pub fn to_txt(&self) -> String {
191-
format!("{} {} {} {}", self.fs_type, self.mount_path, self.source, self.mode)
200+
format!(
201+
"{} {} {} {}",
202+
self.fs_type, self.mount_path, self.source, self.mode
203+
)
192204
}
193205

194206
pub fn from_txt(txt: &str) -> Result<Self> {
195207
let parts: Vec<&str> = txt.splitn(4, ' ').collect();
196208
if parts.len() != 4 {
197-
bail!("filsys record requires 4 space-separated fields, got {}", parts.len());
209+
bail!(
210+
"filsys record requires 4 space-separated fields, got {}",
211+
parts.len()
212+
);
198213
}
199214
Ok(Self {
200215
fs_type: parts[0].to_string(),
@@ -289,7 +304,10 @@ mod tests {
289304
shell: "/bin/bash".into(),
290305
};
291306
let txt = record.to_txt();
292-
assert_eq!(txt, "admin:*:1000:1000:FlatRacoon Admin:/home/admin:/bin/bash");
307+
assert_eq!(
308+
txt,
309+
"admin:*:1000:1000:FlatRacoon Admin:/home/admin:/bin/bash"
310+
);
293311
let parsed = PasswdRecord::from_txt(&txt).unwrap();
294312
assert_eq!(record, parsed);
295313
}

0 commit comments

Comments
 (0)