chore: add roam CI workflow, fitness config, formatting, beads sync
- Add .github/workflows/roam.yml for automated codebase indexing - Add .roam/fitness.yaml with architectural fitness rules - Reformat show.rs and vector.rs (rustfmt line-wrapping only, no logic) - Sync beads issue tracker Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
21
.github/workflows/roam.yml
vendored
Normal file
21
.github/workflows/roam.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: Roam Code Analysis
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main, master]
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
jobs:
|
||||||
|
roam:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
- run: pip install roam-code
|
||||||
|
- run: roam index
|
||||||
|
- run: roam fitness
|
||||||
|
- run: roam pr-risk --json
|
||||||
11
.roam/fitness.yaml
Normal file
11
.roam/fitness.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
rules:
|
||||||
|
- name: No circular imports in core
|
||||||
|
type: dependency
|
||||||
|
source: "src/**"
|
||||||
|
forbidden_target: "tests/**"
|
||||||
|
reason: "Production code should not import test modules"
|
||||||
|
- name: Complexity threshold
|
||||||
|
type: metric
|
||||||
|
metric: cognitive_complexity
|
||||||
|
threshold: 30
|
||||||
|
reason: "Functions above 30 cognitive complexity need refactoring"
|
||||||
@@ -1228,9 +1228,19 @@ mod tests {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn seed_discussion_with_notes(conn: &Connection, issue_id: i64, project_id: i64, user_notes: usize, system_notes: usize) {
|
fn seed_discussion_with_notes(
|
||||||
|
conn: &Connection,
|
||||||
|
issue_id: i64,
|
||||||
|
project_id: i64,
|
||||||
|
user_notes: usize,
|
||||||
|
system_notes: usize,
|
||||||
|
) {
|
||||||
let disc_id: i64 = conn
|
let disc_id: i64 = conn
|
||||||
.query_row("SELECT COALESCE(MAX(id), 0) + 1 FROM discussions", [], |r| r.get(0))
|
.query_row(
|
||||||
|
"SELECT COALESCE(MAX(id), 0) + 1 FROM discussions",
|
||||||
|
[],
|
||||||
|
|r| r.get(0),
|
||||||
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
conn.execute(
|
conn.execute(
|
||||||
"INSERT INTO discussions (id, gitlab_discussion_id, project_id, issue_id, noteable_type, first_note_at, last_note_at, last_seen_at)
|
"INSERT INTO discussions (id, gitlab_discussion_id, project_id, issue_id, noteable_type, first_note_at, last_note_at, last_seen_at)
|
||||||
|
|||||||
@@ -150,7 +150,10 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_knn_k_reproduces_original_bug_scenario() {
|
fn test_knn_k_reproduces_original_bug_scenario() {
|
||||||
let k = compute_knn_k(1500, 1);
|
let k = compute_knn_k(1500, 1);
|
||||||
assert!(k <= SQLITE_VEC_KNN_MAX, "k={k} exceeded 4096 at RECALL_CAP with 1 chunk");
|
assert!(
|
||||||
|
k <= SQLITE_VEC_KNN_MAX,
|
||||||
|
"k={k} exceeded 4096 at RECALL_CAP with 1 chunk"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user