From 42ec027c81c135a82da93a693d3defeb5ef35342 Mon Sep 17 00:00:00 2001 From: Brian Yahn Date: Thu, 23 Jul 2026 23:19:10 +0000 Subject: [PATCH 001/419] Rename lineage gem to gigasail (bin: giga) Rename the gems/lineage crate to gems/gigasail: package/lib "gigasail", binary "giga", version 0.0.1, PolyForm-Noncommercial-1.0.0 license. Adds ratatui/crossterm for the forthcoming interactive diff TUI. Public MCP tools renamed lineage_* -> giga_* to match the binary. Vendored tree-sitter hazard queries under src/db/hazards/ are left byte-identical to hazard-contract (they must match upstream). Internal identifiers and docs updated; CLI examples use `giga`. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01GkCm54RnxsZDy97qSwh5Xk --- gems/{lineage => gigasail}/.gitignore | 0 gems/{lineage => gigasail}/CONTRIBUTING.md | 22 +- gems/{lineage => gigasail}/Cargo.lock | 378 +++++++++++++++--- gems/{lineage => gigasail}/Cargo.toml | 12 +- gems/{lineage => gigasail}/README.md | 150 +++---- gems/{lineage => gigasail}/askama.toml | 0 .../bin/giga-import} | 0 .../docs/agents/arch-view.md | 32 +- .../agents/call-resolution-mini-corpus.md | 0 gems/{lineage => gigasail}/docs/agents/cli.md | 160 ++++---- .../docs/agents/coverage-history.md | 16 +- .../docs/agents/cross-lang-support.md | 50 +-- .../docs/agents/diff-view.md | 36 +- .../docs/agents/features.md | 2 +- .../docs/agents/gem-ui.md | 48 +-- .../docs/agents/hazard-tracking.md | 10 +- .../docs/agents/lang-support-quality.md | 26 +- gems/{lineage => gigasail}/docs/agents/lsp.md | 30 +- gems/{lineage => gigasail}/docs/agents/mcp.md | 80 ++-- .../docs/agents/plugins.md | 38 +- .../docs/agents/profiling-data-integration.md | 8 +- .../docs/agents/scm_migration.md | 10 +- gems/{lineage => gigasail}/docs/agents/sql.md | 20 +- .../docs/agents/stack-trace-support.md | 4 +- .../docs/agents/tag_queries.md | 40 +- gems/{lineage => gigasail}/docs/agents/ui.md | 16 +- .../docs/agents/zig-production-sources.txt | 0 .../docs/agents/zig-semantic-index-spike.md | 0 .../docs/repo-notes/README.md | 0 .../docs/repo-notes/ants.md | 0 .../docs/repo-notes/cjson.md | 0 .../docs/repo-notes/commons-cli.md | 0 .../docs/repo-notes/costura.md | 0 .../docs/repo-notes/eventpp.md | 0 .../docs/repo-notes/fast-json-stringify.md | 0 .../docs/repo-notes/go-immutable-radix.md | 0 .../docs/repo-notes/javapoet.md | 0 .../docs/repo-notes/jwt.md | 0 .../docs/repo-notes/mapstructure.md | 0 .../docs/repo-notes/mistune.md | 0 .../docs/repo-notes/mockhttp.md | 0 .../docs/repo-notes/mpc.md | 0 .../docs/repo-notes/pino.md | 0 .../docs/repo-notes/plog.md | 0 .../docs/repo-notes/pluggy.md | 0 .../docs/repo-notes/proxy.md | 0 .../docs/repo-notes/pydantic-settings.md | 0 .../docs/repo-notes/requests.md | 0 .../docs/repo-notes/rtree.md | 0 .../docs/repo-notes/smart-enum.md | 0 .../docs/repo-notes/summary.md | 0 .../docs/repo-notes/tsup.md | 0 .../docs/repo-notes/tsyringe.md | 0 .../docs/repo-notes/wrk.md | 0 .../{lineage => gigasail}/looker/lineage.lkml | 0 gems/{lineage => gigasail}/sql/README.md | 4 +- .../sql/architecture/artifact_health.sql | 0 .../sql/architecture/delete_snapshot.sql | 0 .../sql/architecture/insert_artifact.sql | 0 .../sql/architecture/insert_edge.sql | 0 .../sql/architecture/insert_edge_span.sql | 0 .../sql/architecture/insert_node.sql | 0 .../sql/architecture/insert_pressure.sql | 0 .../sql/architecture/latest_artifact.sql | 0 .../sql/architecture/load_edges.sql | 0 .../sql/architecture/load_node.sql | 0 .../sql/architecture/owner_inventory.sql | 0 .../architecture/reconcile_logical_unit.sql | 0 .../sql/architecture/search.sql | 0 .../sql/storage/apply_decayed_risk.sql | 0 .../sql/storage/backfill_mutation_kind.sql | 0 .../sql/storage/configure_connection.sql | 0 .../sql/storage/current_unit_spans.sql | 0 .../storage/current_unit_spans_for_path.sql | 0 .../storage/delete_coverage_for_commit.sql | 0 .../delete_test_exposure_for_commit_test.sql | 0 ...delete_test_exposure_for_commit_test_2.sql | 0 .../storage/ensure_natural_key_indexes.sql | 0 .../sql/storage/existing_quality_event.sql | 0 .../sql/storage/find_definitions.sql | 0 .../sql/storage/init_schema.sql | 0 .../sql/storage/insert_crash_event.sql | 0 .../sql/storage/insert_crash_event_2.sql | 0 .../sql/storage/insert_event.sql | 0 .../sql/storage/insert_hazard_event.sql | 0 .../sql/storage/insert_metadata.sql | 0 .../sql/storage/insert_sarif_artifact.sql | 0 .../sql/storage/insert_sarif_artifact_2.sql | 0 .../sql/storage/insert_sarif_finding.sql | 0 .../storage/insert_test_exposure_event.sql | 0 .../sql/storage/insert_unit_hotness.sql | 0 .../record_coverage_line_with_details.sql | 0 .../sql/storage/record_quality_metric.sql | 0 .../sql/storage/record_quality_metric_2.sql | 0 .../refresh_current_quality_metrics.sql | 0 .../refresh_current_quality_metrics_2.sql | 0 .../refresh_current_sarif_findings_view.sql | 0 .../storage/refresh_test_exposure_summary.sql | 0 .../refresh_test_exposure_summary_2.sql | 0 .../refresh_test_exposure_summary_3.sql | 0 .../refresh_test_exposure_summary_4.sql | 0 .../refresh_test_exposure_summary_5.sql | 0 .../refresh_test_exposure_summary_6.sql | 0 .../sql/storage/refresh_ui_summaries.sql | 0 .../sql/storage/resolve_current_path.sql | 0 .../sql/storage/resolve_current_path_2.sql | 0 .../sql/storage/resolve_unit_id.sql | 0 .../storage/sarif_finding_counts_by_file.sql | 0 .../sql/storage/sarif_findings_for_path.sql | 0 .../sql/storage/sarif_lifecycle_summary.sql | 0 .../sql/storage/unit_ids_for_current_path.sql | 0 .../sql/storage/upsert_logical_unit.sql | 0 .../sql/ui/architecture_owner_by_name.sql | 0 .../sql/ui/architecture_symbols_for_path.sql | 0 .../sql/ui/runtime/analyzer_health.sql | 0 .../sql/ui/runtime/analyzer_health_2.sql | 0 .../sql/ui/runtime/analyzer_health_3.sql | 0 .../sql/ui/runtime/apply_crash_history.sql | 0 .../sql/ui/runtime/apply_hazards.sql | 0 .../sql/ui/runtime/apply_hotness.sql | 0 .../sql/ui/runtime/apply_line_coverage.sql | 0 .../sql/ui/runtime/apply_semantic_churn.sql | 0 .../sql/ui/runtime/apply_test_exposure.sql | 0 .../sql/ui/runtime/apply_unit_quality.sql | 0 .../dashboard_coverage_line_counts.sql | 0 .../ui/runtime/dashboard_hazard_counts.sql | 0 .../sql/ui/runtime/dashboard_line_counts.sql | 0 .../sql/ui/runtime/decay_bounds.sql | 0 .../sql/ui/runtime/file_index_with_scope.sql | 0 .../sql/ui/runtime/file_versions.sql | 0 .../sql/ui/runtime/fix_decay_bounds.sql | 0 .../has_multicommit_quality_history.sql | 0 .../sql/ui/runtime/line_coverage_by_file.sql | 0 .../ui/runtime/persisted_source_symbols.sql | 0 .../read_model_file_index_with_scope.sql | 0 .../sql/ui/runtime/review_next_items.sql | 0 .../runtime/sarif_dark_arm_counts_by_file.sql | 0 .../sql/ui/runtime/top_architecture_risks.sql | 0 .../ui/runtime/top_complexity_functions.sql | 0 .../sql/ui/runtime/top_hotness.sql | 0 .../sql/ui/runtime/unit_signal_counts.sql | 0 .../sql/ui/runtime/unit_signal_counts_2.sql | 0 .../sql/ui/runtime/unit_test_profiles.sql | 0 .../sql/ui/runtime/warning_units.sql | 0 .../sql/ui/runtime/warning_units_2.sql | 0 .../src/application/analyse.rs | 10 +- .../src/application/ci.rs | 30 +- .../src/application/diff.rs | 8 +- .../src/application/ingest.rs | 2 +- .../src/application/mod.rs | 2 +- .../src/application/revision.rs | 22 +- .../src/bin/generate_diff_api.rs | 2 +- .../src/db/architecture.rs | 2 +- gems/{lineage => gigasail}/src/db/engine.rs | 6 +- gems/{lineage => gigasail}/src/db/extract.rs | 12 +- gems/{lineage => gigasail}/src/db/git.rs | 10 +- gems/{lineage => gigasail}/src/db/hazard.rs | 16 +- .../src/db/hazards/c_hazards.scm | 0 .../src/db/hazards/cpp_hazards.scm | 0 .../src/db/hazards/csharp_hazards.scm | 0 .../src/db/hazards/go_hazards.scm | 0 .../src/db/hazards/rust_hazards.scm | 0 .../src/db/hazards/zig_hazards.scm | 0 gems/{lineage => gigasail}/src/db/hotness.rs | 2 +- gems/{lineage => gigasail}/src/db/model.rs | 0 gems/{lineage => gigasail}/src/db/mutant.rs | 6 +- gems/{lineage => gigasail}/src/db/quality.rs | 6 +- .../src/db/queries/c/tags.scm | 0 .../src/db/queries/cpp/tags.scm | 0 .../src/db/queries/csharp/tags.scm | 0 .../src/db/queries/go/tags.scm | 0 .../src/db/queries/java/tags.scm | 0 .../src/db/queries/javascript/tags.scm | 0 .../src/db/queries/kotlin/tags.scm | 0 .../src/db/queries/lua/tags.scm | 0 .../src/db/queries/php/tags.scm | 0 .../src/db/queries/python/tags.scm | 0 .../src/db/queries/ruby/tags.scm | 0 .../src/db/queries/rust/tags.scm | 0 .../src/db/queries/swift/tags.scm | 0 .../src/db/queries/typescript/tags.scm | 0 .../src/db/queries/zig/tags.scm | 0 gems/{lineage => gigasail}/src/db/sarif.rs | 10 +- .../src/db/stack_trace.rs | 4 +- gems/{lineage => gigasail}/src/db/storage.rs | 0 .../src/db/test_exposure.rs | 2 +- gems/{lineage => gigasail}/src/db/vcs.rs | 0 gems/{lineage => gigasail}/src/diff.rs | 14 +- gems/{lineage => gigasail}/src/diff_render.rs | 8 +- .../{lineage => gigasail}/src/diff_service.rs | 2 +- .../src/ingest_service.rs | 0 gems/{lineage => gigasail}/src/lib.rs | 2 +- gems/{lineage => gigasail}/src/main.rs | 152 +++---- gems/{lineage => gigasail}/src/pipeline.rs | 158 ++++---- .../src/ui/assets/app.css | 0 .../src/ui/assets/app.js | 0 .../src/ui/assets/diff/.vite/manifest.json | 0 .../ui/assets/diff/assets/index--_D05yx7.js | 4 +- .../ui/assets/diff/assets/index-BZcXXTiw.css | 1 + .../src/ui/assets/diff/index.html | 2 +- .../src/ui/controllers/architecture.rs | 2 +- .../src/ui/controllers/assets.rs | 0 .../src/ui/controllers/diff.rs | 8 +- .../src/ui/controllers/index.rs | 0 .../src/ui/controllers/mod.rs | 0 .../src/ui/controllers/source.rs | 0 gems/{lineage => gigasail}/src/ui/lsp.rs | 32 +- gems/{lineage => gigasail}/src/ui/mcp.rs | 62 +-- .../src/ui/templates/app.html | 2 +- .../src/ui/templates/branch_context.html | 0 .../src/ui/templates/coverage_table.html | 0 .../src/ui/templates/dashboard.html | 4 +- .../ui/templates/dashboard_disclosure.html | 0 .../ui/templates/dashboard_hazard_files.html | 0 .../src/ui/templates/dashboard_ratio_bar.html | 0 .../src/ui/templates/dashboard_sidebar.html | 2 +- .../src/ui/templates/hotspot_list.html | 0 .../src/ui/templates/index.html | 0 .../src/ui/templates/layers_menu.html | 0 .../src/ui/templates/source_sidebar.html | 0 .../src/ui/templates/source_unavailable.html | 0 .../src/ui/templates/source_view.html | 14 +- .../src/ui/templates/warning_banner.html | 0 gems/{lineage => gigasail}/src/ui/ui.rs | 34 +- .../test/fixtures/codecov-clear-totals.json | 0 .../test/fixtures/sentry-clear-event.json | 0 .../test/fixtures/test-exposure-clear.json | 0 .../test/lsp_integration_test.rb | 0 .../test/mcp_server_test.rb | 0 .../test/pprof_to_hotness_test.rb | 0 gems/{lineage => gigasail}/tests/cli_ci.rs | 0 gems/{lineage => gigasail}/tests/cli_diff.rs | 0 .../tools/build_diff_ui.sh | 2 +- .../tools/change_coupling.rb | 0 .../tools/import_repo.rb | 0 .../tools/ingest_mutation_corpus.rb | 0 .../tools/mutant-converters/ruby-mutant | 0 .../tools/mutant-converters/ruby_mutant.rb | 0 .../tools/mutant-converters/rust_mutant.rb | 0 .../mutant-converters/semantic_mutant.rb | 0 .../tools/mutant-converters/src_subjects.yml | 0 .../tools/mutant-converters/support.rb | 0 .../tools/mutant-converters/zig-mutants | 0 .../tools/pprof_to_hotness.rb | 0 gems/{lineage => gigasail}/ui/.gitignore | 0 gems/{lineage => gigasail}/ui/index.html | 0 gems/{lineage => gigasail}/ui/package.json | 0 gems/{lineage => gigasail}/ui/pnpm-lock.yaml | 0 .../ui/pnpm-workspace.yaml | 0 .../{lineage => gigasail}/ui/src/App.test.tsx | 0 gems/{lineage => gigasail}/ui/src/App.tsx | 0 .../ui/src/api/diff.test.ts | 0 gems/{lineage => gigasail}/ui/src/api/diff.ts | 0 gems/{lineage => gigasail}/ui/src/app.css | 0 .../ui/src/bootstrap.test.tsx | 0 .../ui/src/bootstrap.tsx | 0 .../ui/src/generated/diff.ts | 0 .../ui/src/main.test.tsx | 0 gems/{lineage => gigasail}/ui/src/main.tsx | 0 .../ui/src/monaco/DiffPreview.test.tsx | 0 .../ui/src/monaco/DiffPreview.tsx | 0 .../ui/src/monaco/language.test.ts | 0 .../ui/src/monaco/language.ts | 0 .../ui/src/test/setup.ts | 0 .../ui/src/vite-env.d.ts | 0 gems/{lineage => gigasail}/ui/tsconfig.json | 0 gems/{lineage => gigasail}/ui/vite.config.ts | 0 .../ui/assets/diff/assets/index-BZcXXTiw.css | 1 - 268 files changed, 1060 insertions(+), 790 deletions(-) rename gems/{lineage => gigasail}/.gitignore (100%) rename gems/{lineage => gigasail}/CONTRIBUTING.md (83%) rename gems/{lineage => gigasail}/Cargo.lock (89%) rename gems/{lineage => gigasail}/Cargo.toml (89%) rename gems/{lineage => gigasail}/README.md (74%) rename gems/{lineage => gigasail}/askama.toml (100%) rename gems/{lineage/bin/lineage-import => gigasail/bin/giga-import} (100%) rename gems/{lineage => gigasail}/docs/agents/arch-view.md (96%) rename gems/{lineage => gigasail}/docs/agents/call-resolution-mini-corpus.md (100%) rename gems/{lineage => gigasail}/docs/agents/cli.md (74%) rename gems/{lineage => gigasail}/docs/agents/coverage-history.md (87%) rename gems/{lineage => gigasail}/docs/agents/cross-lang-support.md (82%) rename gems/{lineage => gigasail}/docs/agents/diff-view.md (97%) rename gems/{lineage => gigasail}/docs/agents/features.md (94%) rename gems/{lineage => gigasail}/docs/agents/gem-ui.md (84%) rename gems/{lineage => gigasail}/docs/agents/hazard-tracking.md (77%) rename gems/{lineage => gigasail}/docs/agents/lang-support-quality.md (92%) rename gems/{lineage => gigasail}/docs/agents/lsp.md (62%) rename gems/{lineage => gigasail}/docs/agents/mcp.md (86%) rename gems/{lineage => gigasail}/docs/agents/plugins.md (87%) rename gems/{lineage => gigasail}/docs/agents/profiling-data-integration.md (93%) rename gems/{lineage => gigasail}/docs/agents/scm_migration.md (86%) rename gems/{lineage => gigasail}/docs/agents/sql.md (93%) rename gems/{lineage => gigasail}/docs/agents/stack-trace-support.md (86%) rename gems/{lineage => gigasail}/docs/agents/tag_queries.md (69%) rename gems/{lineage => gigasail}/docs/agents/ui.md (70%) rename gems/{lineage => gigasail}/docs/agents/zig-production-sources.txt (100%) rename gems/{lineage => gigasail}/docs/agents/zig-semantic-index-spike.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/README.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/ants.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/cjson.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/commons-cli.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/costura.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/eventpp.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/fast-json-stringify.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/go-immutable-radix.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/javapoet.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/jwt.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/mapstructure.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/mistune.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/mockhttp.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/mpc.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/pino.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/plog.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/pluggy.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/proxy.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/pydantic-settings.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/requests.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/rtree.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/smart-enum.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/summary.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/tsup.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/tsyringe.md (100%) rename gems/{lineage => gigasail}/docs/repo-notes/wrk.md (100%) rename gems/{lineage => gigasail}/looker/lineage.lkml (100%) rename gems/{lineage => gigasail}/sql/README.md (90%) rename gems/{lineage => gigasail}/sql/architecture/artifact_health.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/delete_snapshot.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/insert_artifact.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/insert_edge.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/insert_edge_span.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/insert_node.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/insert_pressure.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/latest_artifact.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/load_edges.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/load_node.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/owner_inventory.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/reconcile_logical_unit.sql (100%) rename gems/{lineage => gigasail}/sql/architecture/search.sql (100%) rename gems/{lineage => gigasail}/sql/storage/apply_decayed_risk.sql (100%) rename gems/{lineage => gigasail}/sql/storage/backfill_mutation_kind.sql (100%) rename gems/{lineage => gigasail}/sql/storage/configure_connection.sql (100%) rename gems/{lineage => gigasail}/sql/storage/current_unit_spans.sql (100%) rename gems/{lineage => gigasail}/sql/storage/current_unit_spans_for_path.sql (100%) rename gems/{lineage => gigasail}/sql/storage/delete_coverage_for_commit.sql (100%) rename gems/{lineage => gigasail}/sql/storage/delete_test_exposure_for_commit_test.sql (100%) rename gems/{lineage => gigasail}/sql/storage/delete_test_exposure_for_commit_test_2.sql (100%) rename gems/{lineage => gigasail}/sql/storage/ensure_natural_key_indexes.sql (100%) rename gems/{lineage => gigasail}/sql/storage/existing_quality_event.sql (100%) rename gems/{lineage => gigasail}/sql/storage/find_definitions.sql (100%) rename gems/{lineage => gigasail}/sql/storage/init_schema.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_crash_event.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_crash_event_2.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_event.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_hazard_event.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_metadata.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_sarif_artifact.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_sarif_artifact_2.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_sarif_finding.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_test_exposure_event.sql (100%) rename gems/{lineage => gigasail}/sql/storage/insert_unit_hotness.sql (100%) rename gems/{lineage => gigasail}/sql/storage/record_coverage_line_with_details.sql (100%) rename gems/{lineage => gigasail}/sql/storage/record_quality_metric.sql (100%) rename gems/{lineage => gigasail}/sql/storage/record_quality_metric_2.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_current_quality_metrics.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_current_quality_metrics_2.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_current_sarif_findings_view.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_test_exposure_summary.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_test_exposure_summary_2.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_test_exposure_summary_3.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_test_exposure_summary_4.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_test_exposure_summary_5.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_test_exposure_summary_6.sql (100%) rename gems/{lineage => gigasail}/sql/storage/refresh_ui_summaries.sql (100%) rename gems/{lineage => gigasail}/sql/storage/resolve_current_path.sql (100%) rename gems/{lineage => gigasail}/sql/storage/resolve_current_path_2.sql (100%) rename gems/{lineage => gigasail}/sql/storage/resolve_unit_id.sql (100%) rename gems/{lineage => gigasail}/sql/storage/sarif_finding_counts_by_file.sql (100%) rename gems/{lineage => gigasail}/sql/storage/sarif_findings_for_path.sql (100%) rename gems/{lineage => gigasail}/sql/storage/sarif_lifecycle_summary.sql (100%) rename gems/{lineage => gigasail}/sql/storage/unit_ids_for_current_path.sql (100%) rename gems/{lineage => gigasail}/sql/storage/upsert_logical_unit.sql (100%) rename gems/{lineage => gigasail}/sql/ui/architecture_owner_by_name.sql (100%) rename gems/{lineage => gigasail}/sql/ui/architecture_symbols_for_path.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/analyzer_health.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/analyzer_health_2.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/analyzer_health_3.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/apply_crash_history.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/apply_hazards.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/apply_hotness.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/apply_line_coverage.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/apply_semantic_churn.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/apply_test_exposure.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/apply_unit_quality.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/dashboard_coverage_line_counts.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/dashboard_hazard_counts.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/dashboard_line_counts.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/decay_bounds.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/file_index_with_scope.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/file_versions.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/fix_decay_bounds.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/has_multicommit_quality_history.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/line_coverage_by_file.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/persisted_source_symbols.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/read_model_file_index_with_scope.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/review_next_items.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/sarif_dark_arm_counts_by_file.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/top_architecture_risks.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/top_complexity_functions.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/top_hotness.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/unit_signal_counts.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/unit_signal_counts_2.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/unit_test_profiles.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/warning_units.sql (100%) rename gems/{lineage => gigasail}/sql/ui/runtime/warning_units_2.sql (100%) rename gems/{lineage => gigasail}/src/application/analyse.rs (96%) rename gems/{lineage => gigasail}/src/application/ci.rs (92%) rename gems/{lineage => gigasail}/src/application/diff.rs (98%) rename gems/{lineage => gigasail}/src/application/ingest.rs (99%) rename gems/{lineage => gigasail}/src/application/mod.rs (74%) rename gems/{lineage => gigasail}/src/application/revision.rs (87%) rename gems/{lineage => gigasail}/src/bin/generate_diff_api.rs (98%) rename gems/{lineage => gigasail}/src/db/architecture.rs (99%) rename gems/{lineage => gigasail}/src/db/engine.rs (99%) rename gems/{lineage => gigasail}/src/db/extract.rs (99%) rename gems/{lineage => gigasail}/src/db/git.rs (99%) rename gems/{lineage => gigasail}/src/db/hazard.rs (98%) rename gems/{lineage => gigasail}/src/db/hazards/c_hazards.scm (100%) rename gems/{lineage => gigasail}/src/db/hazards/cpp_hazards.scm (100%) rename gems/{lineage => gigasail}/src/db/hazards/csharp_hazards.scm (100%) rename gems/{lineage => gigasail}/src/db/hazards/go_hazards.scm (100%) rename gems/{lineage => gigasail}/src/db/hazards/rust_hazards.scm (100%) rename gems/{lineage => gigasail}/src/db/hazards/zig_hazards.scm (100%) rename gems/{lineage => gigasail}/src/db/hotness.rs (99%) rename gems/{lineage => gigasail}/src/db/model.rs (100%) rename gems/{lineage => gigasail}/src/db/mutant.rs (99%) rename gems/{lineage => gigasail}/src/db/quality.rs (99%) rename gems/{lineage => gigasail}/src/db/queries/c/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/cpp/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/csharp/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/go/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/java/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/javascript/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/kotlin/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/lua/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/php/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/python/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/ruby/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/rust/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/swift/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/typescript/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/queries/zig/tags.scm (100%) rename gems/{lineage => gigasail}/src/db/sarif.rs (99%) rename gems/{lineage => gigasail}/src/db/stack_trace.rs (99%) rename gems/{lineage => gigasail}/src/db/storage.rs (100%) rename gems/{lineage => gigasail}/src/db/test_exposure.rs (99%) rename gems/{lineage => gigasail}/src/db/vcs.rs (100%) rename gems/{lineage => gigasail}/src/diff.rs (99%) rename gems/{lineage => gigasail}/src/diff_render.rs (98%) rename gems/{lineage => gigasail}/src/diff_service.rs (98%) rename gems/{lineage => gigasail}/src/ingest_service.rs (100%) rename gems/{lineage => gigasail}/src/lib.rs (98%) rename gems/{lineage => gigasail}/src/main.rs (89%) rename gems/{lineage => gigasail}/src/pipeline.rs (95%) rename gems/{lineage => gigasail}/src/ui/assets/app.css (100%) rename gems/{lineage => gigasail}/src/ui/assets/app.js (100%) rename gems/{lineage => gigasail}/src/ui/assets/diff/.vite/manifest.json (100%) rename gems/{lineage => gigasail}/src/ui/assets/diff/assets/index--_D05yx7.js (93%) create mode 100644 gems/gigasail/src/ui/assets/diff/assets/index-BZcXXTiw.css rename gems/{lineage => gigasail}/src/ui/assets/diff/index.html (92%) rename gems/{lineage => gigasail}/src/ui/controllers/architecture.rs (99%) rename gems/{lineage => gigasail}/src/ui/controllers/assets.rs (100%) rename gems/{lineage => gigasail}/src/ui/controllers/diff.rs (99%) rename gems/{lineage => gigasail}/src/ui/controllers/index.rs (100%) rename gems/{lineage => gigasail}/src/ui/controllers/mod.rs (100%) rename gems/{lineage => gigasail}/src/ui/controllers/source.rs (100%) rename gems/{lineage => gigasail}/src/ui/lsp.rs (97%) rename gems/{lineage => gigasail}/src/ui/mcp.rs (95%) rename gems/{lineage => gigasail}/src/ui/templates/app.html (91%) rename gems/{lineage => gigasail}/src/ui/templates/branch_context.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/coverage_table.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/dashboard.html (91%) rename gems/{lineage => gigasail}/src/ui/templates/dashboard_disclosure.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/dashboard_hazard_files.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/dashboard_ratio_bar.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/dashboard_sidebar.html (70%) rename gems/{lineage => gigasail}/src/ui/templates/hotspot_list.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/index.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/layers_menu.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/source_sidebar.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/source_unavailable.html (100%) rename gems/{lineage => gigasail}/src/ui/templates/source_view.html (62%) rename gems/{lineage => gigasail}/src/ui/templates/warning_banner.html (100%) rename gems/{lineage => gigasail}/src/ui/ui.rs (99%) rename gems/{lineage => gigasail}/test/fixtures/codecov-clear-totals.json (100%) rename gems/{lineage => gigasail}/test/fixtures/sentry-clear-event.json (100%) rename gems/{lineage => gigasail}/test/fixtures/test-exposure-clear.json (100%) rename gems/{lineage => gigasail}/test/lsp_integration_test.rb (100%) rename gems/{lineage => gigasail}/test/mcp_server_test.rb (100%) rename gems/{lineage => gigasail}/test/pprof_to_hotness_test.rb (100%) rename gems/{lineage => gigasail}/tests/cli_ci.rs (100%) rename gems/{lineage => gigasail}/tests/cli_diff.rs (100%) rename gems/{lineage => gigasail}/tools/build_diff_ui.sh (78%) rename gems/{lineage => gigasail}/tools/change_coupling.rb (100%) rename gems/{lineage => gigasail}/tools/import_repo.rb (100%) rename gems/{lineage => gigasail}/tools/ingest_mutation_corpus.rb (100%) rename gems/{lineage => gigasail}/tools/mutant-converters/ruby-mutant (100%) rename gems/{lineage => gigasail}/tools/mutant-converters/ruby_mutant.rb (100%) rename gems/{lineage => gigasail}/tools/mutant-converters/rust_mutant.rb (100%) rename gems/{lineage => gigasail}/tools/mutant-converters/semantic_mutant.rb (100%) rename gems/{lineage => gigasail}/tools/mutant-converters/src_subjects.yml (100%) rename gems/{lineage => gigasail}/tools/mutant-converters/support.rb (100%) rename gems/{lineage => gigasail}/tools/mutant-converters/zig-mutants (100%) rename gems/{lineage => gigasail}/tools/pprof_to_hotness.rb (100%) rename gems/{lineage => gigasail}/ui/.gitignore (100%) rename gems/{lineage => gigasail}/ui/index.html (100%) rename gems/{lineage => gigasail}/ui/package.json (100%) rename gems/{lineage => gigasail}/ui/pnpm-lock.yaml (100%) rename gems/{lineage => gigasail}/ui/pnpm-workspace.yaml (100%) rename gems/{lineage => gigasail}/ui/src/App.test.tsx (100%) rename gems/{lineage => gigasail}/ui/src/App.tsx (100%) rename gems/{lineage => gigasail}/ui/src/api/diff.test.ts (100%) rename gems/{lineage => gigasail}/ui/src/api/diff.ts (100%) rename gems/{lineage => gigasail}/ui/src/app.css (100%) rename gems/{lineage => gigasail}/ui/src/bootstrap.test.tsx (100%) rename gems/{lineage => gigasail}/ui/src/bootstrap.tsx (100%) rename gems/{lineage => gigasail}/ui/src/generated/diff.ts (100%) rename gems/{lineage => gigasail}/ui/src/main.test.tsx (100%) rename gems/{lineage => gigasail}/ui/src/main.tsx (100%) rename gems/{lineage => gigasail}/ui/src/monaco/DiffPreview.test.tsx (100%) rename gems/{lineage => gigasail}/ui/src/monaco/DiffPreview.tsx (100%) rename gems/{lineage => gigasail}/ui/src/monaco/language.test.ts (100%) rename gems/{lineage => gigasail}/ui/src/monaco/language.ts (100%) rename gems/{lineage => gigasail}/ui/src/test/setup.ts (100%) rename gems/{lineage => gigasail}/ui/src/vite-env.d.ts (100%) rename gems/{lineage => gigasail}/ui/tsconfig.json (100%) rename gems/{lineage => gigasail}/ui/vite.config.ts (100%) delete mode 100644 gems/lineage/src/ui/assets/diff/assets/index-BZcXXTiw.css diff --git a/gems/lineage/.gitignore b/gems/gigasail/.gitignore similarity index 100% rename from gems/lineage/.gitignore rename to gems/gigasail/.gitignore diff --git a/gems/lineage/CONTRIBUTING.md b/gems/gigasail/CONTRIBUTING.md similarity index 83% rename from gems/lineage/CONTRIBUTING.md rename to gems/gigasail/CONTRIBUTING.md index aabe430fa..66a5ce493 100644 --- a/gems/lineage/CONTRIBUTING.md +++ b/gems/gigasail/CONTRIBUTING.md @@ -1,7 +1,7 @@ -# Contributing To Lineage +# Contributing To Gigasail Start with the repository-level [../../CONTRIBUTING.md](../../CONTRIBUTING.md). -This file only covers Lineage-specific architecture and contribution +This file only covers Gigasail-specific architecture and contribution rules. ## Local Development Setup @@ -11,13 +11,13 @@ See [Get Started](README.md#getting-started). Common checks: ```sh -cargo test --manifest-path gems/lineage/Cargo.toml -cargo build --manifest-path gems/lineage/Cargo.toml --release +cargo test --manifest-path gems/gigasail/Cargo.toml +cargo build --manifest-path gems/gigasail/Cargo.toml --release ``` ## Architecture -Lineage is a Rust history and evidence engine with deliberately separate +Gigasail is a Rust history and evidence engine with deliberately separate boundaries: - `src/vcs.rs` and `src/git.rs` own repository traversal. @@ -32,20 +32,20 @@ boundaries: - `src/lsp.rs` exposes editor diagnostics and CodeLens data. Keep these boundaries intact. Provider-specific parsing should not write -directly to the database; Lineage core should verify commits, paths, and +directly to the database; Gigasail core should verify commits, paths, and logical-unit identity before recording evidence. ## Boundaries -Lineage should track evidence over time and make that evidence easy to +Gigasail should track evidence over time and make that evidence easy to query. It should not become a replacement for mature tools that already solve their own domain. - Linting and smells are solved problems. Import them as SARIF or another normalized artifact format instead of building custom lint or smell - engines in Lineage. + engines in Gigasail. - Static risk tools such as Decomplex, SlopCop, Boobytrap, Nil-Kill, and - Espalier should publish SARIF or normalized artifacts. Lineage should + Espalier should publish SARIF or normalized artifacts. Gigasail should preserve, scope, and display those findings. - Coverage, test exposure, mutant evidence, hazards, and crash data should be commit-scoped and idempotent on re-ingest. @@ -84,7 +84,7 @@ returning no units over inventing low-confidence boundaries. ## UI And LSP -The UI and LSP should render evidence that Lineage has already ingested. +The UI and LSP should render evidence that Gigasail has already ingested. They should not run source analyzers, coverage tools, mutation tools, or quality gates themselves. @@ -105,6 +105,6 @@ client-side application stack. ## Testing -Use `cargo test --manifest-path gems/lineage/Cargo.toml` for Lineage +Use `cargo test --manifest-path gems/gigasail/Cargo.toml` for Gigasail changes. Tests should cover both the parser/adapter and the resulting stored evidence whenever possible. diff --git a/gems/lineage/Cargo.lock b/gems/gigasail/Cargo.lock similarity index 89% rename from gems/lineage/Cargo.lock rename to gems/gigasail/Cargo.lock index 9ce919d35..be5269d56 100644 --- a/gems/lineage/Cargo.lock +++ b/gems/gigasail/Cargo.lock @@ -271,9 +271,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.3" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "bytes" @@ -281,6 +281,21 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" version = "1.2.64" @@ -339,7 +354,7 @@ version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.117", @@ -357,6 +372,20 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" +[[package]] +name = "compact_str" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd622ebbb56a5b2ccb651b32b911cdeb2a9b4b11776b2473bf26a26a286244e" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -406,6 +435,31 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +[[package]] +name = "crossterm" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" +dependencies = [ + "bitflags 2.13.0", + "crossterm_winapi", + "mio", + "parking_lot", + "rustix", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -506,6 +560,7 @@ name = "fact-mine-rust" version = "0.1.0" dependencies = [ "anyhow", + "flate2", "hazard-contract", "regex", "serde", @@ -566,6 +621,12 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -685,6 +746,60 @@ dependencies = [ "wasip2", ] +[[package]] +name = "gigasail" +version = "0.0.1" +dependencies = [ + "anyhow", + "askama", + "axum", + "clap", + "crossterm", + "fact-mine-rust", + "flate2", + "git2", + "hazard-contract", + "hex", + "idna_adapter", + "libc", + "openssl-sys", + "ratatui", + "rayon", + "rmcp", + "roxmltree", + "rusqlite", + "rust-embed", + "serde", + "serde_json", + "serde_yaml", + "sha2", + "streaming-iterator", + "tempfile", + "tokio", + "toml", + "tower-http", + "tower-lsp", + "tree-sitter", + "tree-sitter-c", + "tree-sitter-c-sharp", + "tree-sitter-cpp", + "tree-sitter-go", + "tree-sitter-java", + "tree-sitter-javascript", + "tree-sitter-kotlin-ng", + "tree-sitter-language", + "tree-sitter-lua", + "tree-sitter-php", + "tree-sitter-python", + "tree-sitter-ruby", + "tree-sitter-rust", + "tree-sitter-swift", + "tree-sitter-typescript", + "tree-sitter-zig", + "ts-rs", + "url", +] + [[package]] name = "git2" version = "0.18.3" @@ -710,6 +825,17 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + [[package]] name = "hashbrown" version = "0.17.1" @@ -739,6 +865,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hex" version = "0.4.3" @@ -891,12 +1023,43 @@ dependencies = [ "hashbrown 0.17.1", ] +[[package]] +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", +] + +[[package]] +name = "instability" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb2d60ef19920a3a9193c3e371f726ec1dafc045dac788d0fb3704272458971" +dependencies = [ + "darling", + "indoc", + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -993,58 +1156,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "lineage" -version = "0.1.0" -dependencies = [ - "anyhow", - "askama", - "axum", - "clap", - "fact-mine-rust", - "flate2", - "git2", - "hazard-contract", - "hex", - "idna_adapter", - "libc", - "openssl-sys", - "rayon", - "rmcp", - "roxmltree", - "rusqlite", - "rust-embed", - "serde", - "serde_json", - "serde_yaml", - "sha2", - "streaming-iterator", - "tempfile", - "tokio", - "toml", - "tower-http", - "tower-lsp", - "tree-sitter", - "tree-sitter-c", - "tree-sitter-c-sharp", - "tree-sitter-cpp", - "tree-sitter-go", - "tree-sitter-java", - "tree-sitter-javascript", - "tree-sitter-kotlin-ng", - "tree-sitter-language", - "tree-sitter-lua", - "tree-sitter-php", - "tree-sitter-python", - "tree-sitter-ruby", - "tree-sitter-rust", - "tree-sitter-swift", - "tree-sitter-typescript", - "tree-sitter-zig", - "ts-rs", - "url", -] - [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -1066,6 +1177,15 @@ version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.5", +] + [[package]] name = "lsp-types" version = "0.94.1" @@ -1130,6 +1250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" dependencies = [ "libc", + "log", "wasi", "windows-sys 0.61.2", ] @@ -1183,6 +1304,16 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + [[package]] name = "parking_lot_core" version = "0.9.12" @@ -1196,6 +1327,12 @@ dependencies = [ "windows-link", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pastey" version = "0.2.3" @@ -1264,6 +1401,27 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "ratatui" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" +dependencies = [ + "bitflags 2.13.0", + "cassowary", + "compact_str", + "crossterm", + "indoc", + "instability", + "itertools", + "lru", + "paste", + "strum", + "unicode-segmentation", + "unicode-truncate", + "unicode-width 0.2.0", +] + [[package]] name = "rayon" version = "1.12.0" @@ -1625,6 +1783,37 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" +[[package]] +name = "signal-hook" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + [[package]] name = "simd-adler32" version = "0.3.10" @@ -1653,6 +1842,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "streaming-iterator" version = "0.1.9" @@ -1671,6 +1866,28 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.117", +] + [[package]] name = "syn" version = "2.0.117" @@ -2156,6 +2373,35 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-truncate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" +dependencies = [ + "itertools", + "unicode-segmentation", + "unicode-width 0.1.14", +] + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -2269,6 +2515,22 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.11" @@ -2278,6 +2540,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows-core" version = "0.62.2" diff --git a/gems/lineage/Cargo.toml b/gems/gigasail/Cargo.toml similarity index 89% rename from gems/lineage/Cargo.toml rename to gems/gigasail/Cargo.toml index 2fe302b27..e5709aaf6 100644 --- a/gems/lineage/Cargo.toml +++ b/gems/gigasail/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "lineage" -version = "0.1.0" +name = "gigasail" +version = "0.0.1" edition = "2021" -description = "Logical-unit history engine for Boobytrap and sibling gems" +description = "Risk-weighted diff review and logical-unit history engine" license = "PolyForm-Noncommercial-1.0.0" [lib] -name = "lineage" +name = "gigasail" path = "src/lib.rs" [[bin]] -name = "lineage" +name = "giga" path = "src/main.rs" [dependencies] @@ -18,6 +18,8 @@ hazard-contract = { path = "../hazard-contract" } fact-mine-rust = { path = "../fact-mine" } anyhow = "1.0" flate2 = "1.1" +ratatui = "0.29" +crossterm = "0.28" askama = "0.12" axum = "0.7" clap = { version = "=4.4.18", features = ["derive"] } diff --git a/gems/lineage/README.md b/gems/gigasail/README.md similarity index 74% rename from gems/lineage/README.md rename to gems/gigasail/README.md index a023a024d..d18043513 100644 --- a/gems/lineage/README.md +++ b/gems/gigasail/README.md @@ -1,6 +1,6 @@ -# Lineage +# Gigasail -Lineage is a Rust history and evidence engine for reviewing code at +Gigasail is a Rust history and evidence engine for reviewing code at scale. It tracks logical code units across renames, moves, and refactors, then overlays verification evidence such as coverage, mutation results, systems hazards, and stack traces. @@ -25,17 +25,17 @@ If you want to contribute, see [CONTRIBUTING.md](CONTRIBUTING.md). - Optional coverage, mutation, hazard, lint, SARIF, or stack-trace artifacts For a fully populated local database from a repo checkout, use the import -wrapper. It builds the required Lineage/analyzer binaries, builds the -Lineage database, discovers supported coverage artifacts, runs bundled +wrapper. It builds the required Gigasail/analyzer binaries, builds the +Gigasail database, discovers supported coverage artifacts, runs bundled hazard providers, generates first-party SARIF, runs available Go/Rust/Ruby/Zig lints, ingests extra SARIF inputs, refreshes UI summaries, and can start the UI server: ```bash -gems/lineage/bin/lineage-import \ +gems/gigasail/bin/gigasail-import \ --repo . \ - --db lineage.db \ - --out-dir tmp/lineage-import \ + --db gigasail.db \ + --out-dir tmp/gigasail-import \ --fresh \ --serve \ --daemon \ @@ -46,33 +46,33 @@ gems/lineage/bin/lineage-import \ Useful iteration flags: ```bash -gems/lineage/bin/lineage-import --repo . --db tmp/lineage.db --fresh --max-commits 100 -gems/lineage/bin/lineage-import --repo . --db tmp/lineage.db --fresh --no-coverage --no-lints -gems/lineage/bin/lineage-import --repo . --db tmp/lineage.db --sarif-input tmp/vendor-sarif +gems/gigasail/bin/gigasail-import --repo . --db tmp/gigasail.db --fresh --max-commits 100 +gems/gigasail/bin/gigasail-import --repo . --db tmp/gigasail.db --fresh --no-coverage --no-lints +gems/gigasail/bin/gigasail-import --repo . --db tmp/gigasail.db --sarif-input tmp/vendor-sarif ``` -Build a Lineage database for this repository: +Build a Gigasail database for this repository: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- build \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- build \ --repo . \ - --db /tmp/lineage.db + --db /tmp/gigasail.db ``` To cap analysis while iterating: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- build \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- build \ --repo . \ - --db /tmp/lineage.db \ + --db /tmp/gigasail.db \ --max-commits 100 ``` Inspect the highest-risk logical units: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- summary \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- summary \ + --db /tmp/gigasail.db \ --top 20 \ --only src/ \ --only gems/ \ @@ -82,8 +82,8 @@ cargo run --manifest-path gems/lineage/Cargo.toml -- summary \ Serve the local UI: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- ui \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ui \ + --db /tmp/gigasail.db \ --repo . \ --overlay tmp/slopcop-constraints.json \ --port 8080 @@ -93,7 +93,7 @@ Build the embedded React/Monaco diff view after changing its Rust API contract or frontend source: ```bash -gems/lineage/tools/build_diff_ui.sh +gems/gigasail/tools/build_diff_ui.sh ``` ### Focused architecture view @@ -106,14 +106,14 @@ FACT_MINE_RUST_BINARY="$PWD/gems/fact-mine/target/release/fact-mine-rust" \ ruby -Igems/espalier/lib gems/espalier/exe/espalier \ --format architecture \ --output tmp/espalier-architecture.json \ - gems/espalier/lib gems/lineage/src + gems/espalier/lib gems/gigasail/src -cargo run --manifest-path gems/lineage/Cargo.toml -- ingest-architecture \ - --db lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ingest-architecture \ + --db gigasail.db \ --input tmp/espalier-architecture.json -cargo run --manifest-path gems/lineage/Cargo.toml -- ui \ - --db lineage.db --repo . --port 8080 +cargo run --manifest-path gems/gigasail/Cargo.toml -- ui \ + --db gigasail.db --repo . --port 8080 ``` Architecture actions then appear beside matched symbols in the source outline. @@ -121,12 +121,12 @@ The graph APIs are also available under `/api/architecture`. ## Outputs -Lineage can output a SQLite evidence database, text or JSON risk +Gigasail can output a SQLite evidence database, text or JSON risk summaries, a local source-review UI, and LSP diagnostics/CodeLens data for editor integrations. > [!NOTE] -> CLEAR uses Lineage as its experimental UI for reviewing +> CLEAR uses Gigasail as its experimental UI for reviewing > LLM-assisted code at scale. Decomplex, SlopCop, Boobytrap, Nil-kill, > and mutation evidence become much easier to interpret when they are > rendered next to the source lines they describe. @@ -137,9 +137,9 @@ The build command writes a portable SQLite database with logical code units and history events: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- build \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- build \ --repo . \ - --db /tmp/lineage.db + --db /tmp/gigasail.db ``` Core tables include: @@ -161,8 +161,8 @@ Core tables include: Inspect the unit-level signal: ```sh -cargo run --manifest-path gems/lineage/Cargo.toml -- summary \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- summary \ + --db /tmp/gigasail.db \ --top 20 \ --only src/ \ --only gems/ \ @@ -171,7 +171,7 @@ cargo run --manifest-path gems/lineage/Cargo.toml -- summary \ ## Supported Data Sources -Lineage treats every uploaded artifact as data for a specific commit. +Gigasail treats every uploaded artifact as data for a specific commit. Use `--commit "$(git rev-parse HEAD)"` for current-run artifacts, and use `--replace` when the uploaded artifact should replace previous rows from the same source and commit. @@ -180,7 +180,7 @@ from the same source and commit. | --- | --- | --- | | Git history | `build` | local Git repository | | Coverage | `ingest-coverage` | Codecov JSON, SimpleCov JSON, Cobertura XML, kcov Cobertura XML, SQL-COV JSON (`--format sqlcov`) | -| Test exposure | `ingest-test-exposure` | Lineage `test-exposure` JSON | +| Test exposure | `ingest-test-exposure` | Gigasail `test-exposure` JSON | | Mutation testing | `ingest-mutants` | Ruby `mutant-facts/v1` | | Systems hazards | `ingest-hazards` | Zig, Go, Rust, C, C++, C# hazard providers | | Stack traces | `ingest` | Sentry-style event JSON | @@ -189,9 +189,9 @@ from the same source and commit. Standalone `.sql` files are indexed as query logical units. A leading `-- query-id:` comment supplies the stable unit name, allowing SQL-COV branch coverage, SQL hazard SARIF, and SQL-COV plan-complexity observations to attach to -the same source view. Lineage only stores and presents those observations; all +the same source view. Gigasail only stores and presents those observations; all database/dialect analysis remains in SQL-COV. -| One-line repository import | `gems/lineage/bin/lineage-import` | Git history, coverage discovery, hazards, bundled first-party SARIF, Go/Rust/Ruby/Zig lint SARIF, extra SARIF | +| One-line repository import | `gems/gigasail/bin/gigasail-import` | Git history, coverage discovery, hazards, bundled first-party SARIF, Go/Rust/Ruby/Zig lint SARIF, extra SARIF | ### SARIF Findings @@ -202,16 +202,16 @@ upload a mixed artifact directory. Rows are keyed by same findings is idempotent. `--replace` deletes prior SARIF rows for the same `source` and `commit` before loading the new artifact set. -`gems/lineage/bin/lineage-import` generates and ingests the bundled +`gems/gigasail/bin/gigasail-import` generates and ingests the bundled first-party SARIF set automatically: Decomplex, SlopCop, Boobytrap, Nil-Kill, and Espalier. To generate that bundle without a full import, -run `tools/generate_generalized_gem_sarif.rb --repo . --out-dir tmp/lineage-sarif`. +run `tools/generate_generalized_gem_sarif.rb --repo . --out-dir tmp/gigasail-sarif`. Live plan analysis is opt-in because it requires an explicit test schema and database connection. The importer delegates it to SQL-COV and ingests the SARIF: ```sh -gems/lineage/bin/lineage-import \ +gems/gigasail/bin/gigasail-import \ --sql-queries=queries/ \ --sql-setup=test/schema.sql \ --sql-dialect=postgres \ @@ -224,8 +224,8 @@ a directory and use a source name that identifies the provider or CI lane: ```sh -cargo run --manifest-path gems/lineage/Cargo.toml -- ingest-sarif \ - --db lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ingest-sarif \ + --db gigasail.db \ --repo . \ --input tmp/vendor-sarif \ --source rubocop \ @@ -243,8 +243,8 @@ dark-arm rendering as transient UI overlays. `summary` ranks logical units by history and verification risk: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- summary \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- summary \ + --db /tmp/gigasail.db \ --top 20 \ --format json ``` @@ -257,8 +257,8 @@ tools, dashboards, and LLM review workflows. `ui` serves a local source and verification browser: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- ui \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ui \ + --db /tmp/gigasail.db \ --repo . \ --overlay tmp/slopcop-constraints.json \ --port 8080 @@ -279,8 +279,8 @@ curl http://127.0.0.1:8080/api/dashboard `lsp` runs a stdio language server for editor integrations: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- lsp \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- lsp \ + --db /tmp/gigasail.db \ --repo . \ --overlay tmp/slopcop-constraints.json ``` @@ -291,7 +291,7 @@ summaries, and a custom gutter-update notification for editor wrappers. ## Evidence Ingestion -Lineage is most useful after loading verification artifacts for the +Gigasail is most useful after loading verification artifacts for the current commit. ### Coverage @@ -299,8 +299,8 @@ current commit. Ingest line coverage: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- ingest-coverage \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ingest-coverage \ + --db /tmp/gigasail.db \ --repo . \ --format simplecov \ --commit "$(git rev-parse HEAD)" \ @@ -314,7 +314,7 @@ authoritative for that commit and should replace prior rows for the same source. > [!NOTE] -> For `cobertura` format, Lineage automatically parses `` tags to combine them with class filenames. This resolves path resolution ambiguity for common file names (such as `src/lib.rs` or `src/main.rs`) when ingesting coverage from monorepo sub-projects. +> For `cobertura` format, Gigasail automatically parses `` tags to combine them with class filenames. This resolves path resolution ambiguity for common file names (such as `src/lib.rs` or `src/main.rs`) when ingesting coverage from monorepo sub-projects. Recommended CLEAR lanes: @@ -336,11 +336,11 @@ Recommended CLEAR lanes: Ingest named test exposure facts: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- ingest-test-exposure \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ingest-test-exposure \ + --db /tmp/gigasail.db \ --repo . \ --commit "$(git rev-parse HEAD)" \ - --input gems/lineage/test/fixtures/test-exposure-clear.json + --input gems/gigasail/test/fixtures/test-exposure-clear.json ``` Each record maps a commit, logical unit, and test to optional line, @@ -349,11 +349,11 @@ branch, test type, and mutation status fields. ### Mutants Ingest `mutant-facts/v1` after running a converter under -`gems/lineage/tools/mutant-converters/`: +`gems/gigasail/tools/mutant-converters/`: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- ingest-mutants \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ingest-mutants \ + --db /tmp/gigasail.db \ --repo . \ --commit "$(git rev-parse HEAD)" \ --input /tmp/clear-ruby-mutants/mutant-facts.json \ @@ -361,7 +361,7 @@ cargo run --manifest-path gems/lineage/Cargo.toml -- ingest-mutants \ ``` The Ruby mutant converter and `zig-mutants` both emit the -`mutant-facts/v1` shape Lineage consumes. +`mutant-facts/v1` shape Gigasail consumes. Targeted ratchet mutants use narrower semantics. The transpile-test and fuzz mutant runners emit `test-exposure/v1` records for only the source @@ -379,8 +379,8 @@ ruby tools/fuzz/mutants/run.rb --all \ --out /tmp/clear-fuzz-mutants \ --exposure /tmp/clear-fuzz-mutants/test-exposure.json -cargo run --manifest-path gems/lineage/Cargo.toml -- ingest-test-exposure \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ingest-test-exposure \ + --db /tmp/gigasail.db \ --repo . \ --commit "$(git rev-parse HEAD)" \ --input /tmp/clear-fuzz-mutants/test-exposure.json @@ -390,8 +390,8 @@ After ingesting new coverage, SARIF, or test-exposure artifacts into a DB that has UI summaries, refresh the read model: ```sh -cargo run --manifest-path gems/lineage/Cargo.toml -- refresh-ui \ - --db /tmp/lineage.db +cargo run --manifest-path gems/gigasail/Cargo.toml -- refresh-ui \ + --db /tmp/gigasail.db ``` ### Hazards @@ -399,8 +399,8 @@ cargo run --manifest-path gems/lineage/Cargo.toml -- refresh-ui \ Ingest current provider hazards: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- ingest-hazards \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ingest-hazards \ + --db /tmp/gigasail.db \ --repo . \ --provider zig \ --commit "$(git rev-parse HEAD)" @@ -419,11 +419,11 @@ Ingest Sentry-style stack traces and anchor verified frames to logical units: ```bash -cargo run --manifest-path gems/lineage/Cargo.toml -- ingest \ - --db /tmp/lineage.db \ +cargo run --manifest-path gems/gigasail/Cargo.toml -- ingest \ + --db /tmp/gigasail.db \ --repo . \ --provider sentry \ - --input gems/lineage/test/fixtures/sentry-clear-event.json + --input gems/gigasail/test/fixtures/sentry-clear-event.json ``` Stack-trace ingestion is commit-scoped. Re-ingesting the same event is @@ -433,7 +433,7 @@ file. ### Runtime profiling (pprof) hotness Static Big-O says which functions can be expensive; a profile says which -ones are. Lineage ingests `profile-hotness/v1` and uses it to rank the +ones are. Gigasail ingests `profile-hotness/v1` and uses it to rank the Expensive Operations view (Big-O first, then measured share), badge critical functions with a flame icon in the file view, and annotate lines in the info popup. @@ -442,13 +442,13 @@ in the info popup. # capture with your language's profiler, e.g. Go: go tool pprof -top -lines cpu.pb.gz > pprof-top.txt # convert (also accepts stackprof JSON and perf script output): -ruby gems/lineage/tools/pprof_to_hotness.rb --pprof-top pprof-top.txt > hotness.json +ruby gems/gigasail/tools/pprof_to_hotness.rb --pprof-top pprof-top.txt > hotness.json # ingest: -lineage ingest-hotness --db lineage.db --repo . --input hotness.json +giga ingest-hotness --db gigasail.db --repo . --input hotness.json ``` For this repository, `ruby tools/profile_hotness.rb --target NAME --ingest ---db lineage.db` packages the whole flow per sub-project. For perf-based +--db gigasail.db` packages the whole flow per sub-project. For perf-based languages the binary must carry DWARF or frames arrive without file:line - build Rust with `cargo build --profile profiling` and do not strip Zig/C/C++ binaries. Frames without paths are resolved against the @@ -459,7 +459,7 @@ for per-language recipes, resolution tiers, and known gaps. ### MCP server -`lineage mcp --db lineage.db --repo .` exposes five read-only, +`giga mcp --db gigasail.db --repo .` exposes five read-only, workflow-shaped tools (file risk, unit context, verification gaps, change history, find-definition) over stdio MCP - not one tool per table. `--db` is optional: omitting it runs a DB-less mode serving live-disk structure @@ -469,7 +469,7 @@ uncommitted-changes and DB-less designs, and known gaps. ## Supported Languages Roadmap -Lineage uses Tree-sitter-backed logical-unit extraction for the core +Gigasail uses Tree-sitter-backed logical-unit extraction for the core languages it aims to track as a ground-truth risk ledger. For those languages, parse failures produce no units instead of falling back to regex boundaries. Heuristic extraction remains only for secondary @@ -489,8 +489,8 @@ experimental languages. ## Boundaries -The `lineage` binary stores, joins, and renders evidence. The -`lineage-import` wrapper can orchestrate bundled producers and import +The `gigasail` binary stores, joins, and renders evidence. The +`gigasail-import` wrapper can orchestrate bundled producers and import artifacts for a repository checkout. The core binary does not: - run tests; @@ -501,7 +501,7 @@ artifacts for a repository checkout. The core binary does not: - post GitHub comments or call the GitHub API; - replace the source tools that generate quality evidence. -It stores, joins, and renders evidence. A good Lineage view should make a +It stores, joins, and renders evidence. A good Gigasail view should make a human say: "this line is risky, and here is the history and verification evidence explaining why." diff --git a/gems/lineage/askama.toml b/gems/gigasail/askama.toml similarity index 100% rename from gems/lineage/askama.toml rename to gems/gigasail/askama.toml diff --git a/gems/lineage/bin/lineage-import b/gems/gigasail/bin/giga-import similarity index 100% rename from gems/lineage/bin/lineage-import rename to gems/gigasail/bin/giga-import diff --git a/gems/lineage/docs/agents/arch-view.md b/gems/gigasail/docs/agents/arch-view.md similarity index 96% rename from gems/lineage/docs/agents/arch-view.md rename to gems/gigasail/docs/agents/arch-view.md index 541871f28..29ec1c113 100644 --- a/gems/lineage/docs/agents/arch-view.md +++ b/gems/gigasail/docs/agents/arch-view.md @@ -8,7 +8,7 @@ from SARIF messages. ## Product Decision -Lineage should provide an architecture view centered on one class, module, +Gigasail should provide an architecture view centered on one class, module, function, or state member. It should not attempt to render the repository's complete function graph. @@ -30,7 +30,7 @@ architecturally difficult?" rather than merely show that many edges exist. - Explain a function through a bounded caller, callee, delegation, and state neighborhood. - Explain a state member through all known readers and writers. -- Join Espalier structure with Lineage complexity, hazards, history, coverage, +- Join Espalier structure with Gigasail complexity, hazards, history, coverage, mutation, and test exposure. - Keep every graph readable on large repositories through focus and progressive disclosure. @@ -76,7 +76,7 @@ highlighted. ### Direct route -Use a stable route based on a Lineage logical-unit ID, not a display name: +Use a stable route based on a Gigasail logical-unit ID, not a display name: ```text /architecture/unit/:logical_unit_id @@ -130,7 +130,7 @@ Show: - direct caller and callee counts; - state members read and written; - unresolved-call count; -- existing Lineage hazard indicator; +- existing Gigasail hazard indicator; - source link. Default order is descending architectural pressure. Other sorts are name, @@ -342,11 +342,11 @@ Espalier's existing `DependencyGraph` already represents owner/function nodes, internal calls, delegation, owner calls, external calls, edge weights, and cycles. It also attaches per-function `EFFECTS.reads` and `EFFECTS.writes`. The production contract must extend that graph with first-class state nodes and -read/write edges rather than forcing Lineage to infer them from labels. +read/write edges rather than forcing Gigasail to infer them from labels. -### Lineage +### Gigasail -Lineage owns: +Gigasail owns: - durable logical identity across commits; - joining graph facts to source, history, coverage, mutations, tests, and @@ -363,7 +363,7 @@ graph JSON artifact for structured ingestion. The current `owner#function-name` shape is insufficient for overloads, same-named nested functions, and moves. Every graph entity needs an analyzer -identity plus an optional matched Lineage logical-unit identity. +identity plus an optional matched Gigasail logical-unit identity. ```text owner_id = hash(language, normalized owner path/name, definition span) @@ -372,7 +372,7 @@ state_id = hash(language, path, owner_id, member name, declaration span) edge_id = hash(source_id, target_id, kind, source span, analyzer version) ``` -Lineage should reconcile functions to existing logical units during import and +Gigasail should reconcile functions to existing logical units during import and retain aliases when units move or rename. IDs must not rely on display names alone. @@ -434,7 +434,7 @@ Use a versioned JSON artifact. A compact conceptual form is: Every edge should retain one or more source evidence spans. A graph without citations is difficult to trust or debug. -## Lineage Storage +## Gigasail Storage Use normalized tables rather than storing the entire artifact as opaque JSON: @@ -504,7 +504,7 @@ how to regenerate it. ## Rendering Do not embed a complete Graphviz SVG and attempt to make it the application. -Use structured graph JSON and render the bounded neighborhood in Lineage. +Use structured graph JSON and render the bounded neighborhood in Gigasail. The first implementation can use accessible SVG with a deterministic layered layout: @@ -588,8 +588,8 @@ a bounded neighborhood. It never loads the repository graph into the browser. ### Phase 2: Import and API -- Add transactional Lineage tables and indexes. -- Reconcile analyzer functions with Lineage logical units. +- Add transactional Gigasail tables and indexes. +- Reconcile analyzer functions with Gigasail logical units. - Implement owner inventory, function neighborhood, state access, and search endpoints. - Add artifact freshness and language-quality metadata. @@ -619,7 +619,7 @@ a bounded neighborhood. It never loads the repository graph into the browser. - overloaded and same-named methods receive distinct IDs; - nested owners and functions resolve correctly; -- rename/move reconciliation retains Lineage history; +- rename/move reconciliation retains Gigasail history; - state access forms for every supported trial language; - self/this/instance-variable/static/member access; - unresolved dynamic calls retain uncertainty; @@ -664,7 +664,7 @@ The initial feature is complete when: - selecting state shows every known reader and writer in a complete table and bounded graph; - every visible edge links to source evidence; -- graph facts join to existing Lineage source, hazards, complexity, and test +- graph facts join to existing Gigasail source, hazards, complexity, and test data; - incomplete or stale analysis is visibly qualified; - a class with hundreds of functions remains usable without drawing hundreds @@ -674,7 +674,7 @@ The initial feature is complete when: ## Kill Criteria -Do not ship the graph as a primary Lineage feature if validation shows that: +Do not ship the graph as a primary Gigasail feature if validation shows that: - state read/write facts are too incomplete to distinguish no access from missing analysis; diff --git a/gems/lineage/docs/agents/call-resolution-mini-corpus.md b/gems/gigasail/docs/agents/call-resolution-mini-corpus.md similarity index 100% rename from gems/lineage/docs/agents/call-resolution-mini-corpus.md rename to gems/gigasail/docs/agents/call-resolution-mini-corpus.md diff --git a/gems/lineage/docs/agents/cli.md b/gems/gigasail/docs/agents/cli.md similarity index 74% rename from gems/lineage/docs/agents/cli.md rename to gems/gigasail/docs/agents/cli.md index cd6e46845..9b075c8fd 100644 --- a/gems/lineage/docs/agents/cli.md +++ b/gems/gigasail/docs/agents/cli.md @@ -1,29 +1,29 @@ -# Lineage CLI and Evidence Pipeline +# Gigasail CLI and Evidence Pipeline Status: Proposed design ## Summary -Lineage should provide a coherent command-line workflow for producing, +Gigasail should provide a coherent command-line workflow for producing, ingesting, and reviewing architectural and verification evidence: ```text -lineage analyse ─┐ - ├─> run manifest + artifacts ─> lineage ingest ─> lineage diff -lineage verify ──┘ +giga analyse ─┐ + ├─> run manifest + artifacts ─> giga ingest ─> giga diff +gigasail verify ──┘ ``` -The CLI is an evidence pipeline, not a build system. Lineage owns evidence +The CLI is an evidence pipeline, not a build system. Gigasail owns evidence identity, normalization, completeness, ingestion, and presentation. Existing build and test systems continue to own dependency graphs, compilation, incrementality, caching, sandboxing, and test execution. Bazel is a first-class optional executor. It is not a prerequisite for any -Lineage command. +Gigasail command. ## Goals -- Make `lineage diff` a useful architectural and risk-oriented alternative to +- Make `giga diff` a useful architectural and risk-oriented alternative to reading a raw `git diff` first. - Allow bundled static analysis to run without repository configuration. - Provide a reproducible configured path for tests, coverage, mutation, @@ -40,7 +40,7 @@ Lineage command. ## Non-goals -Lineage must not become responsible for: +Gigasail must not become responsible for: - Modeling source and generated-file dependency graphs. - Determining which compilation actions are invalidated by a source change. @@ -50,27 +50,27 @@ Lineage must not become responsible for: - Replacing Cargo, Go, Bazel, Gradle, Maven, npm, Make, CMake, or repository scripts. - Inferring every repository's complete test corpus without configuration. -- Deploying software. The convenience command is therefore `lineage ci`, not - `lineage cicd`. +- Deploying software. The convenience command is therefore `giga ci`, not + `gigasail cicd`. ## Command Model | Command | Configuration required | Bazel required | Primary effect | | --- | --- | --- | --- | -| `lineage diff` | No | No | Render a revision or working-tree architectural diff using available evidence. | -| `lineage analyse` | No for embedded providers; yes for repository commands | No | Run static analyzers and produce normalized findings. | -| `lineage diff --analyse` | No for embedded providers; yes for repository commands | No | Refresh static analysis before rendering the diff. | -| `lineage verify --profile NAME` | Yes | No | Run configured verification producers and write artifacts plus a run manifest. | -| `lineage ingest` | No | No | Validate and transactionally ingest explicit artifacts or a run manifest. | -| `lineage ci` | Yes | No | Run analyse, verify, ingest, and configured policy gates. | -| `lineage diff --full` | No | No | Render every available evidence category and disclose gaps. | +| `giga diff` | No | No | Render a revision or working-tree architectural diff using available evidence. | +| `giga analyse` | No for embedded providers; yes for repository commands | No | Run static analyzers and produce normalized findings. | +| `giga diff --analyse` | No for embedded providers; yes for repository commands | No | Refresh static analysis before rendering the diff. | +| `gigasail verify --profile NAME` | Yes | No | Run configured verification producers and write artifacts plus a run manifest. | +| `giga ingest` | No | No | Validate and transactionally ingest explicit artifacts or a run manifest. | +| `giga ci` | Yes | No | Run analyse, verify, ingest, and configured policy gates. | +| `giga diff --full` | No | No | Render every available evidence category and disclose gaps. | The documented spelling is `analyse`. An `analyze` alias may be provided for discoverability, but both spellings must invoke exactly the same implementation. -### `lineage diff` +### `giga diff` -`lineage diff` is read-only unless an explicit refresh flag is supplied. It +`giga diff` is read-only unless an explicit refresh flag is supplied. It must not unexpectedly run tests, mutation, fuzzing, or other expensive tools. The command should: @@ -88,14 +88,14 @@ The command should: Suggested forms: ```sh -lineage diff -lineage diff BASE HEAD -lineage diff --format text -lineage diff --format json -lineage diff --ui -lineage diff --analyse -lineage diff --full -lineage diff --full --require-profile full +giga diff +giga diff BASE HEAD +giga diff --format text +giga diff --format json +giga diff --ui +giga diff --analyse +giga diff --full +giga diff --full --require-profile full ``` `--analyse` runs only embedded, allowlisted static analysis by default. Use @@ -110,9 +110,9 @@ For automation that requires complete evidence, `--require-profile PROFILE` fails if that profile has not been ingested for the exact selected revision, tree, configuration, and corpus. -### `lineage analyse` +### `giga analyse` -`lineage analyse` runs embedded source-derived analysis that does not require a +`giga analyse` runs embedded source-derived analysis that does not require a project build or dynamic test execution. FactMine is currently the sole embedded provider; Decomplex, Espalier, NilKill, and SlopCop remain external artifact producers until they have constrained, first-class adapters. @@ -128,20 +128,20 @@ paths, set thresholds, or add external SARIF-producing analyzers, but command execution requires `--trust-current-config`. Analysis produces normalized artifacts and a run manifest. It may print the -merged finding list, but it does not implicitly mutate the Lineage database. -Users can request ingestion explicitly or use `lineage ci`. +merged finding list, but it does not implicitly mutate the Gigasail database. +Users can request ingestion explicitly or use `giga ci`. Suggested forms: ```sh -lineage analyse -lineage analyse --ingest -lineage analyse --profile security --trust-current-config +giga analyse +giga analyse --ingest +giga analyse --profile security --trust-current-config ``` -### `lineage verify` +### `gigasail verify` -`lineage verify` runs a repository-defined verification profile. It invokes +`gigasail verify` runs a repository-defined verification profile. It invokes existing tools and records their outputs; it does not model their internal build graph. @@ -156,24 +156,24 @@ Typical profiles are: Suggested forms: ```sh -lineage verify --profile quick -lineage verify --profile full -lineage verify --profile full --ingest +gigasail verify --profile quick +gigasail verify --profile full +gigasail verify --profile full --ingest ``` Every producer reports `complete`, `partial`, `failed`, `cancelled`, or `skipped`. A successful command alone does not prove that its artifact covers the entire repository or test corpus. -### `lineage ingest` +### `giga ingest` -Ingestion must remain independently useful. It must not require `lineage.yml`, -`lineage verify`, Bazel, or a Lineage-created CI run. +Ingestion must remain independently useful. It must not require `gigasail.yml`, +`gigasail verify`, Bazel, or a Gigasail-created CI run. Direct artifact ingestion remains supported: ```sh -lineage ingest \ +giga ingest \ --kind coverage \ --format cobertura \ --input coverage.xml \ @@ -189,19 +189,19 @@ transactional ingestion. The preferred complete form consumes a run manifest: ```sh -lineage ingest --run .lineage/runs/RUN_ID/manifest.json +giga ingest --run .gigasail/runs/RUN_ID/manifest.json ``` This permits ingestion from GitHub Actions, Buildkite, Jenkins, Bazel, Codecov, mutation services, security scanners, and organization-specific pipelines. -Lineage core remains responsible for verifying revisions, source content, +Gigasail core remains responsible for verifying revisions, source content, paths, scopes, and logical-unit identity before writing the database. Providers and external plugins never write trusted tables directly. -### `lineage ci` +### `giga ci` -`lineage ci` is a convenience composition rather than a separate execution +`giga ci` is a convenience composition rather than a separate execution engine: ```text @@ -211,27 +211,27 @@ analyse -> verify -> ingest -> policy evaluation Example: ```sh -lineage ci --profile full --require-complete +giga ci --profile full --require-complete ``` The equivalent explicit sequence is: ```sh -lineage analyse -lineage verify --profile full -lineage ingest --latest-run -lineage diff --full --require-profile full +giga analyse +gigasail verify --profile full +giga ingest --latest-run +giga diff --full --require-profile full ``` -Lineage does not perform deployment, so the command must not be named or grow +Gigasail does not perform deployment, so the command must not be named or grow into a general CI/CD deployment system. ## Evidence Completeness -Missing evidence must never prevent Lineage from showing facts it can support. +Missing evidence must never prevent Gigasail from showing facts it can support. It must also never be interpreted as negative evidence. -Example `lineage diff --full` output: +Example `giga diff --full` output: ```text Evidence completeness: 72% @@ -260,17 +260,17 @@ honestly. ## Configuration -The canonical authoring format is `lineage.yml` at the repository root. A -`lineage.json` representation may be accepted through the same typed schema, +The canonical authoring format is `gigasail.yml` at the repository root. A +`gigasail.json` representation may be accepted through the same typed schema, primarily for generated configuration. A repository containing both is an error; there must be no precedence ambiguity. -Lineage should publish a JSON Schema for validation, editor completion, and +Gigasail should publish a JSON Schema for validation, editor completion, and stable versioning. -The existing `.lineage/diff.toml` classification overrides should migrate into +The existing `.gigasail/diff.toml` classification overrides should migrate into this schema. A compatibility reader may remain for a bounded migration period, -but Lineage must not maintain two independent long-term configuration models. +but Gigasail must not maintain two independent long-term configuration models. Example: @@ -295,7 +295,7 @@ profiles: producers: static-analysis: - executor: lineage + executor: gigasail providers: [decomplex, espalier, nil-kill, slopcop] unit-tests: @@ -313,7 +313,7 @@ producers: targets: ["//..."] produces: - kind: bazel-bep - path: .lineage/artifacts/bep.json + path: .gigasail/artifacts/bep.json ``` The config describes evidence producers and their declared artifacts. It must @@ -325,7 +325,7 @@ Shell execution, if supported at all, must be explicit and visibly less safe. ## Executors -### Lineage executor +### Gigasail executor Runs bundled analyzers directly and records their versions, settings, source corpus, and outputs. @@ -339,7 +339,7 @@ custom project scripts. ### Bazel executor -Bazel is an optional high-quality integration. Lineage should invoke declared +Bazel is an optional high-quality integration. Gigasail should invoke declared targets and consume the Build Event Protocol for: - Expanded and configured targets. @@ -350,12 +350,12 @@ targets and consume the Build Event Protocol for: - Effective invocation and build configuration. Optional Bazel aspects may later produce dependency, source-ownership, lint, or -other metadata. Lineage must not require custom aspects for basic use and must +other metadata. Gigasail must not require custom aspects for basic use and must not reconstruct Bazel's action graph. ## Run Manifest -Both `analyse` and `verify` write a versioned `lineage-run/v1` manifest. At +Both `analyse` and `verify` write a versioned `gigasail-run/v1` manifest. At minimum it records: - Repository identity. @@ -376,17 +376,17 @@ their declared root. Ingestion verifies hashes before parsing. ## Working-tree Evidence Commit evidence cannot be presented as exact evidence for a modified working -tree. `lineage diff` may always show Git-derived and source-derived changes, but +tree. `giga diff` may always show Git-derived and source-derived changes, but dynamic evidence is exact only when its run manifest matches a deterministic dirty-tree fingerprint. -If a manifest matches `HEAD` but files are modified, Lineage marks affected +If a manifest matches `HEAD` but files are modified, Gigasail marks affected evidence stale or out of scope rather than silently attributing it to the working tree. ## Trust and Security -Verification configuration contains executable commands. A hosted Lineage +Verification configuration contains executable commands. A hosted Gigasail service must never execute commands newly introduced or changed by an untrusted pull request without approval. @@ -394,7 +394,7 @@ Required protections include: - Execute commands from a trusted base revision or separately approved repository configuration. -- Treat a change to `lineage.yml`, build scripts, or producer scripts as a +- Treat a change to `gigasail.yml`, build scripts, or producer scripts as a security-sensitive configuration change. - Permit revision-scoped classification metadata to affect presentation, but do not confuse that with authority to execute commands. @@ -419,29 +419,29 @@ Exact numeric exit codes should be stable and documented for CI consumers. ## Migration Strategy -1. Introduce the typed config schema and `lineage-run/v1` manifest. -2. Add the generic command and bundled-Lineage executors. +1. Introduce the typed config schema and `gigasail-run/v1` manifest. +2. Add the generic command and bundled-Gigasail executors. 3. Implement `analyse` and `verify` as artifact producers. 4. Extend `ingest` to consume run manifests while preserving every existing direct ingestion command. -5. Add text and JSON renderers over the existing `DiffPlan` for `lineage diff`. +5. Add text and JSON renderers over the existing `DiffPlan` for `giga diff`. 6. Add `--analyse`, `--full`, and `--require-profile` semantics. -7. Add `lineage ci` as a thin composition of existing commands. +7. Add `giga ci` as a thin composition of existing commands. 8. Add the Bazel executor and BEP adapter. 9. Convert `tools/import_repo.rb` into a compatibility wrapper around the new commands, then remove its duplicated orchestration. -10. Migrate `.lineage/diff.toml` classification into `lineage.yml`. +10. Migrate `.gigasail/diff.toml` classification into `gigasail.yml`. ## Acceptance Criteria -- `lineage diff` and `lineage analyse` work in an unconfigured supported +- `giga diff` and `giga analyse` work in an unconfigured supported repository without Bazel. - A configured non-Bazel repository can produce and ingest a complete evidence profile using its existing scripts. -- A Bazel repository can use BEP-backed verification without a parallel Lineage +- A Bazel repository can use BEP-backed verification without a parallel Gigasail build graph. - Direct artifact ingestion continues to work without configuration. -- `lineage diff --full` remains useful with partial evidence and labels every +- `giga diff --full` remains useful with partial evidence and labels every gap honestly. - `--require-profile full` fails when any required evidence is not exact and complete. @@ -453,7 +453,7 @@ Exact numeric exit codes should be stable and documented for CI consumers. ## Final Decision -Lineage will provide a declarative evidence pipeline through `lineage.yml`, but +Gigasail will provide a declarative evidence pipeline through `gigasail.yml`, but will not become a build system. Bazel is supported as an optional executor and rich evidence source. All commands remain independent of Bazel; ingestion remains open to external artifacts; and diffs remain useful even when the full diff --git a/gems/lineage/docs/agents/coverage-history.md b/gems/gigasail/docs/agents/coverage-history.md similarity index 87% rename from gems/lineage/docs/agents/coverage-history.md rename to gems/gigasail/docs/agents/coverage-history.md index ec5a9c2e3..d9b141fef 100644 --- a/gems/lineage/docs/agents/coverage-history.md +++ b/gems/gigasail/docs/agents/coverage-history.md @@ -1,6 +1,6 @@ # Coverage and Quality History: The "Delta" Model -This document outlines the design for ingesting and tracking coverage and mutation testing data over time within the `Lineage` engine. By anchoring quality metrics to the historical graph, the toolchain can answer the critical question: *"Is this fragile code getting safer or more dangerous?"* +This document outlines the design for ingesting and tracking coverage and mutation testing data over time within the `Gigasail` engine. By anchoring quality metrics to the historical graph, the toolchain can answer the critical question: *"Is this fragile code getting safer or more dangerous?"* ## 1. The Value of Historical Coverage @@ -11,7 +11,7 @@ Tracking this metric over time allows `Boobytrap` to distinguish between "Histor ## 2. The "Delta" Storage Model (Aggregate Quality) -Storing full line-by-line coverage bitmasks for every commit would cause the SQLite database to bloat to gigabytes. Instead, `Lineage` stores **Aggregate Logical Metadata**. +Storing full line-by-line coverage bitmasks for every commit would cause the SQLite database to bloat to gigabytes. Instead, `Gigasail` stores **Aggregate Logical Metadata**. The engine tracks the "Current Known State" of a Logical Unit and records Deltas over time. @@ -35,7 +35,7 @@ mutation-verified?" `Boobytrap` needs that second shape to avoid over-ranking code that was historically buggy but has since been covered by meaningful tests. -`Lineage` therefore also stores a first-class `test_exposure_events` +`Gigasail` therefore also stores a first-class `test_exposure_events` ledger. Each row represents one named test hitting one logical unit at a specific commit. Records may include: @@ -58,19 +58,19 @@ survived mutant. When mutation facts are present, they can strengthen the To ensure the integrity of the data and support flexible CI setups, ingestion is strictly decoupled into a three-pass model. The passes respect the lifecycle of data availability. ### Pass 1: The Backbone (Git/VCS) -- **Command:** `lineage build` +- **Command:** `giga build` - **Execution:** First step. Builds the `logical_units` table and the commit graph. All subsequent passes anchor to the IDs generated here. ### Pass 2: The Empirical Feed (Stack Traces) -- **Command:** `lineage ingest --provider sentry ...` +- **Command:** `giga ingest --provider sentry ...` - **Execution:** Async/Continuous. Ingests production events, maps them to commits and Logical IDs, and records `crash_events`. ### Pass 3: The Quality Feed (Coverage/Mutant) -- **Command:** `lineage ingest-coverage --format boobytrap ...` +- **Command:** `giga ingest-coverage --format boobytrap ...` - **Execution:** End of a CI run. Ingests `coverage.json` and `mutant.json` artifacts, mapping them to the specific commit and updating the Quality State of the associated Logical Units. ### Pass 4: The Named-Test Exposure Feed -- **Command:** `lineage ingest-test-exposure ...` +- **Command:** `giga ingest-test-exposure ...` - **Execution:** End of a test run. Ingests `test-exposure/v1` facts, maps each record to source at the commit, and records one event per logical-unit/test hit. This feed is valuable even without mutation @@ -129,4 +129,4 @@ CREATE TABLE test_exposure_events ( ## 5. Strategic Verdict -Tracking aggregate coverage and mutation testing over time is a **Must Build** feature. By providing a database for this data, `Lineage` creates a "Quality Ledger." It completes the "Quadrants of Risk" (Structure, History, Production, Protection), allowing LLMs and developers to confidently refactor previously dangerous code. +Tracking aggregate coverage and mutation testing over time is a **Must Build** feature. By providing a database for this data, `Gigasail` creates a "Quality Ledger." It completes the "Quadrants of Risk" (Structure, History, Production, Protection), allowing LLMs and developers to confidently refactor previously dangerous code. diff --git a/gems/lineage/docs/agents/cross-lang-support.md b/gems/gigasail/docs/agents/cross-lang-support.md similarity index 82% rename from gems/lineage/docs/agents/cross-lang-support.md rename to gems/gigasail/docs/agents/cross-lang-support.md index 9fa03da07..ccfab328e 100644 --- a/gems/lineage/docs/agents/cross-lang-support.md +++ b/gems/gigasail/docs/agents/cross-lang-support.md @@ -1,16 +1,16 @@ # Cross-Language Support Validation -This document tracks the first practical validation pass for building Lineage databases from non-CLEAR repositories and ingesting analyzer, lint, coverage, hazard, and runtime evidence. +This document tracks the first practical validation pass for building Gigasail databases from non-CLEAR repositories and ingesting analyzer, lint, coverage, hazard, and runtime evidence. -`gems/lineage/docs/agents/plugins.md` describes the plugin architecture and broad language targets. It does not prescribe exact repositories, so this pass used representative active OSS projects with enough real code to exercise the adapters. +`gems/gigasail/docs/agents/plugins.md` describes the plugin architecture and broad language targets. It does not prescribe exact repositories, so this pass used representative active OSS projects with enough real code to exercise the adapters. ## Goal -Create one `lineage.db` per target repository, ingest the best available evidence, start a Lineage UI server for each on `0.0.0.0`, and spot check that the UI can review the project with cross-language data. +Create one `gigasail.db` per target repository, ingest the best available evidence, start a Gigasail UI server for each on `0.0.0.0`, and spot check that the UI can review the project with cross-language data. ## Standard Import Command -Use the same import wrapper for every checkout. The wrapper builds Lineage and +Use the same import wrapper for every checkout. The wrapper builds Gigasail and bundled analyzers, indexes the whole repository, discovers supported coverage artifacts, ingests hazards, generates and ingests first-party SARIF (Decomplex, SlopCop, Boobytrap, Nil-Kill, Espalier), generates Go/Rust/Ruby/Zig @@ -18,10 +18,10 @@ lint SARIF where the repository has relevant code, ingests extra SARIF inputs, refreshes summaries, and can start the UI: ```bash -/home/yahn/litedb/gems/lineage/bin/lineage-import \ +/home/yahn/litedb/gems/gigasail/bin/gigasail-import \ --repo /path/to/repo \ - --db /path/to/repo/lineage.db \ - --out-dir /path/to/repo/tmp/lineage-import \ + --db /path/to/repo/gigasail.db \ + --out-dir /path/to/repo/tmp/gigasail-import \ --fresh \ --serve \ --daemon \ @@ -36,24 +36,24 @@ artifacts, repeat `--coverage path/to/artifact` or `--sarif-input path/to/dir`. | Language | Repository | Local Clone | Database | UI Port | Status | | --- | --- | --- | --- | --- | --- | -| Python | `https://github.com/Textualize/rich` | `/tmp/lineage-one-line-repos/rich` | `/tmp/lineage-one-line-repos/rich/lineage.db` | `18101` | Complete | -| TypeScript | `https://github.com/colinhacks/zod` | `/tmp/lineage-one-line-repos/zod` | `/tmp/lineage-one-line-repos/zod/lineage.db` | `18102` | Complete | -| JavaScript | `https://github.com/fastify/fastify` | `/tmp/fastify` | `/tmp/fastify/lineage.db` | `18111` | Added for analyzer validation | -| Go | `https://github.com/junegunn/fzf` | `/tmp/lineage-one-line-repos/fzf` | `/tmp/lineage-one-line-repos/fzf/lineage.db` | `18103` | Complete, partial Go coverage | -| Lua | `https://github.com/luarocks/luarocks` | `/tmp/lineage-one-line-repos/luarocks` | `/tmp/lineage-one-line-repos/luarocks/lineage.db` | `18104` | Complete, no coverage artifact | -| C | `https://github.com/libuv/libuv` | `/tmp/lineage-one-line-repos/libuv` | `/tmp/lineage-one-line-repos/libuv/lineage.db` | `18105` | Complete, no coverage artifact | -| C++ | `https://github.com/fmtlib/fmt` | `/tmp/lineage-one-line-repos/fmt` | `/tmp/lineage-one-line-repos/fmt/lineage.db` | `18106` | Complete, no coverage artifact | -| C# | `https://github.com/serilog/serilog` | `/tmp/lineage-one-line-repos/serilog` | `/tmp/lineage-one-line-repos/serilog/lineage.db` | `18107` | Complete, no coverage artifact | -| Java | `https://github.com/google/gson` | `/tmp/lineage-one-line-repos/gson` | `/tmp/lineage-one-line-repos/gson/lineage.db` | `18108` | Complete, no coverage artifact | -| Swift | `https://github.com/apple/swift-argument-parser` | `/tmp/lineage-one-line-repos/swift-argument-parser` | `/tmp/lineage-one-line-repos/swift-argument-parser/lineage.db` | `18109` | Complete, no coverage artifact | -| Kotlin | `https://github.com/square/okio` | `/tmp/lineage-one-line-repos/okio` | `/tmp/lineage-one-line-repos/okio/lineage.db` | `18110` | Complete, no coverage artifact | +| Python | `https://github.com/Textualize/rich` | `/tmp/gigasail-one-line-repos/rich` | `/tmp/gigasail-one-line-repos/rich/gigasail.db` | `18101` | Complete | +| TypeScript | `https://github.com/colinhacks/zod` | `/tmp/gigasail-one-line-repos/zod` | `/tmp/gigasail-one-line-repos/zod/gigasail.db` | `18102` | Complete | +| JavaScript | `https://github.com/fastify/fastify` | `/tmp/fastify` | `/tmp/fastify/gigasail.db` | `18111` | Added for analyzer validation | +| Go | `https://github.com/junegunn/fzf` | `/tmp/gigasail-one-line-repos/fzf` | `/tmp/gigasail-one-line-repos/fzf/gigasail.db` | `18103` | Complete, partial Go coverage | +| Lua | `https://github.com/luarocks/luarocks` | `/tmp/gigasail-one-line-repos/luarocks` | `/tmp/gigasail-one-line-repos/luarocks/gigasail.db` | `18104` | Complete, no coverage artifact | +| C | `https://github.com/libuv/libuv` | `/tmp/gigasail-one-line-repos/libuv` | `/tmp/gigasail-one-line-repos/libuv/gigasail.db` | `18105` | Complete, no coverage artifact | +| C++ | `https://github.com/fmtlib/fmt` | `/tmp/gigasail-one-line-repos/fmt` | `/tmp/gigasail-one-line-repos/fmt/gigasail.db` | `18106` | Complete, no coverage artifact | +| C# | `https://github.com/serilog/serilog` | `/tmp/gigasail-one-line-repos/serilog` | `/tmp/gigasail-one-line-repos/serilog/gigasail.db` | `18107` | Complete, no coverage artifact | +| Java | `https://github.com/google/gson` | `/tmp/gigasail-one-line-repos/gson` | `/tmp/gigasail-one-line-repos/gson/gigasail.db` | `18108` | Complete, no coverage artifact | +| Swift | `https://github.com/apple/swift-argument-parser` | `/tmp/gigasail-one-line-repos/swift-argument-parser` | `/tmp/gigasail-one-line-repos/swift-argument-parser/gigasail.db` | `18109` | Complete, no coverage artifact | +| Kotlin | `https://github.com/square/okio` | `/tmp/gigasail-one-line-repos/okio` | `/tmp/gigasail-one-line-repos/okio/gigasail.db` | `18110` | Complete, no coverage artifact | All UI servers were restarted with detached sessions and smoke checked through `curl` on ports `18101` through `18110`. ## Mini-Corpus: Bounded Manual-Review Validation The validation matrix above answers a different question from analyzer quality: -can Lineage ingest a large, realistic repository? It cannot cheaply establish +can Gigasail ingest a large, realistic repository? It cannot cheaply establish whether a high-ranked finding is true, whether an important function was missed, or which adapter is responsible when either happens. Large projects also combine too many unrelated language features to make a regression @@ -178,14 +178,14 @@ language, and turn every repeatable blind spot into a regression. Each repository received as much of this evidence as the current tools could produce without repository-specific hacks: -- `lineage build`: Git history, logical units, churn, and ownership. +- `giga build`: Git history, logical units, churn, and ownership. - Decomplex SARIF: structural complexity findings. - SlopCop SARIF: coverage gaps and constraint findings. - Boobytrap SARIF: bug-risk findings derived from churn, complexity, and coverage. - Nil-kill SARIF: optionality, union, hidden enum, and primitive pressure findings where the language adapter supports them. - Espalier SARIF: architectural pressure findings where the language adapter supports them. - Lint SARIF: native lint output converted or emitted as SARIF where the repository already had a reasonable local toolchain. -- Coverage: native coverage output ingested through Lineage-supported formats when the toolchain was available. +- Coverage: native coverage output ingested through Gigasail-supported formats when the toolchain was available. - Runtime traces: Sentry-style stack trace ingestion for Python smoke coverage. - Hazards: Go concurrency hazards for `fzf`. @@ -216,10 +216,10 @@ CI/test artifact is passed with `--coverage`. - Added Swift member access and `switch_entry` support. - Added Kotlin `when_expression` and `when_entry` support. - Added grammar candidate support for packages that ship `tree_sitter_*_binding.node`, needed by `tree-sitter-kotlin`. -- Added Go concurrency hazard detection through SlopCop/Lineage. -- Fixed Lineage source extraction and coverage ingestion issues found during TypeScript/Go validation. +- Added Go concurrency hazard detection through SlopCop/Gigasail. +- Fixed Gigasail source extraction and coverage ingestion issues found during TypeScript/Go validation. - Fixed Nil-kill static-only normalization so non-Ruby languages do not accidentally depend on stale runtime traces. -- Replaced Lineage regex-first logical-unit extraction for Ruby, Python, JavaScript/TypeScript, Go, Rust, Zig, C/C++, and C# with Tree-sitter-backed extraction. The regex heuristic path is now only for secondary experimental languages. +- Replaced Gigasail regex-first logical-unit extraction for Ruby, Python, JavaScript/TypeScript, Go, Rust, Zig, C/C++, and C# with Tree-sitter-backed extraction. The regex heuristic path is now only for secondary experimental languages. ## Environment Gaps @@ -228,4 +228,4 @@ CI/test artifact is passed with `--coverage`. - C#, Java, Swift, and Kotlin native build/lint/coverage were limited by missing `dotnet`, Java, Swift, and Kotlin toolchains in this environment. - TypeScript and Go runtime tracing are still out of scope for this pass. -These are environment/toolchain gaps, not Lineage ingestion blockers. The DBs and UIs exist for all requested languages. +These are environment/toolchain gaps, not Gigasail ingestion blockers. The DBs and UIs exist for all requested languages. diff --git a/gems/lineage/docs/agents/diff-view.md b/gems/gigasail/docs/agents/diff-view.md similarity index 97% rename from gems/lineage/docs/agents/diff-view.md rename to gems/gigasail/docs/agents/diff-view.md index 785ce20dc..25add25d3 100644 --- a/gems/lineage/docs/agents/diff-view.md +++ b/gems/gigasail/docs/agents/diff-view.md @@ -2,7 +2,7 @@ ## Status -Implemented through delivery slice 6. This is a Lineage UI feature, not a +Implemented through delivery slice 6. This is a Gigasail UI feature, not a replacement for GitHub's Files Changed view. It explains the review risk of a revision pair using the same line-level coverage, mutation, hazard, and SARIF evidence already shown in the source view. Assertion observations (slice 7) @@ -11,7 +11,7 @@ and migration of the existing source, dashboard, and architecture routes ## Product decision -Lineage will provide a revision-pinned diff view that answers two questions +Gigasail will provide a revision-pinned diff view that answers two questions before showing code: 1. What meaningful production and test code was added, by language and by @@ -24,7 +24,7 @@ separate raw presentation remains available for reviewers who need a normal patch in source order. The diff view will be the first canonical screen in a new React + Monaco -frontend. The long-term Lineage UI should move to that frontend, but the +frontend. The long-term Gigasail UI should move to that frontend, but the existing Askama source and dashboard screens will migrate incrementally after the diff view is complete. Rewriting every current screen before delivering the diff would create a long, high-risk gap without improving its evidence @@ -36,7 +36,7 @@ evidence gap, not an uncovered line. ## Goals -- Show the normal Lineage source experience in a diff: coverage and mutation +- Show the normal Gigasail source experience in a diff: coverage and mutation state, hazards, all SARIF findings, dark-arm overlays, source links, and finding detail. - Rank changed production files by added unverified semantic code, added @@ -53,7 +53,7 @@ evidence gap, not an uncovered line. semantic grouping, score, or evidence. - Preserve a one-click standard, source-ordered diff for residual lines and for reviewers who prefer the conventional patch. -- Work across every language for which Lineage has a Tree-sitter parser, while +- Work across every language for which Gigasail has a Tree-sitter parser, while being explicit when semantic classification or visibility is unavailable. ## Non-goals @@ -225,7 +225,7 @@ the private aggregate. `U`, `P`, `DC`, and `H1` are always shown beside the score; no hidden severity multipliers are allowed. Ties sort by `H1`, then `U`, then added meaningful lines, then path/name for deterministic output. -`DC` is a portable AST decision-point delta, not a claim that Lineage has +`DC` is a portable AST decision-point delta, not a claim that Gigasail has proven a full Big-O bound. It counts the language adapter's control-decision nodes for the construct at each revision. A new function is compared with the language baseline complexity of one. This independent metric avoids depending @@ -304,9 +304,9 @@ raw diff. ### Configuration catalog -Add a declarative `ConfigCatalog` owned by Lineage, with repository overrides. +Add a declarative `ConfigCatalog` owned by Gigasail, with repository overrides. It classifies a path before attempting to parse its contents. The initial -catalog must cover every language with a Lineage Tree-sitter adapter, plus +catalog must cover every language with a Gigasail Tree-sitter adapter, plus repository/CI configuration: | Ecosystem / role | Configuration and manifest candidates | Lock / generated candidates | @@ -331,8 +331,8 @@ performed per path and nearest manifest root, not only at repository root. Repository configuration can add custom manifests, change a category, or disable an overly broad rule. -The shipped override file is revision-scoped: Lineage reads -`.lineage/diff.toml` from the selected immutable head revision. It supports +The shipped override file is revision-scoped: Gigasail reads +`.gigasail/diff.toml` from the selected immutable head revision. It supports auditable exact-path and directory-prefix source-role overrides; overrides win over catalog and convention classification: @@ -410,7 +410,7 @@ to rendering a diff. Before implementing the catalog, run a dependency/configuration discovery spike with these deliverables: -1. Enumerate all current Lineage-supported languages from the parser registry +1. Enumerate all current Gigasail-supported languages from the parser registry and map real validation-corpus repositories to their manifests, lockfiles, CI files, documentation, and generated paths. 2. Compare maintained parser libraries or official parsers for each structured @@ -469,7 +469,7 @@ additions, verification slice bar, new tier-1 hazard count, all-SARIF count, and an evidence freshness indicator. ```text -1. gems/lineage/src/ui/diff.rs risk 31.5 +1. gems/gigasail/src/ui/diff.rs risk 31.5 production · Rust · +28 code · +4 comments 12 uncovered + 3 partial + complexity +2 + 2 new tier-1 hazards [SARIF 6] [coverage exact] [mutation exact] @@ -620,7 +620,7 @@ Paths use the same repository-relative validation as the source controller. Symbols are parsed at both revisions. Matching proceeds in this order: -1. Lineage logical-unit identity when a revision-stable unit mapping exists; +1. Gigasail logical-unit identity when a revision-stable unit mapping exists; 2. rename-aware file identity plus declaration kind/qualified name; 3. bounded structural fingerprint of the declaration header and AST shape. @@ -690,7 +690,7 @@ Askama templates, CSS checkbox state, and a growing global JavaScript file would turn the UI into an implicit frontend framework without the testing or type safety of one. -Create a strict TypeScript React application at `gems/lineage/ui/` now. React +Create a strict TypeScript React application at `gems/gigasail/ui/` now. React is the application shell and semantic review surface; Monaco is the code and raw-diff renderer. Do not use Monaco to lay out the risk-ranked page itself: React owns summary cards, file ordering, collapsed groups, controls, and @@ -698,7 +698,7 @@ accessibility; an expanded group mounts a Monaco `DiffEditor` for its code. This separation prevents a large editable-editor abstraction from swallowing the review model. -The destination is a full React/Monaco Lineage UI. The migration is a +The destination is a full React/Monaco Gigasail UI. The migration is a strangler, not a big-bang rewrite: 1. Ship `/diff` as React/Monaco with no duplicated Askama implementation. @@ -719,7 +719,7 @@ The project is a real, independently testable frontend package, not TypeScript sprinkled into `src/ui/assets/`: ```text -gems/lineage/ui/ +gems/gigasail/ui/ package.json pnpm-lock.yaml tsconfig.json @@ -845,7 +845,7 @@ claims. Required tests include: ## Delivery slices -1. Create `gems/lineage/ui` with strict TypeScript, React, Vite, Monaco, the +1. Create `gems/gigasail/ui` with strict TypeScript, React, Vite, Monaco, the generated Rust API contract, and embedded-asset build tooling. Ship a small route smoke test before any complex UI is added. 2. Add revision-pinned diff parsing, source-role classification, typed plan @@ -909,4 +909,4 @@ claims. Required tests include: - Both Monaco diff layouts show the same exact SARIF and verification evidence, and the raw view remains available from the same revision-pinned API. - The implementation is covered by adversarial multi-language fixtures and - does not require a Node runtime in the shipped Lineage binary. + does not require a Node runtime in the shipped Gigasail binary. diff --git a/gems/lineage/docs/agents/features.md b/gems/gigasail/docs/agents/features.md similarity index 94% rename from gems/lineage/docs/agents/features.md rename to gems/gigasail/docs/agents/features.md index 2956004b8..375c7d3e9 100644 --- a/gems/lineage/docs/agents/features.md +++ b/gems/gigasail/docs/agents/features.md @@ -9,7 +9,7 @@ * Create a warning / caution banner if coverage or mutant or any important data is ever stale or out of sink. B. The "Fix Effectiveness" Metric - Lineage knows when a unit was "fixed" and when it "crashed." + Gigasail knows when a unit was "fixed" and when it "crashed." * The Gap: It doesn't explicitly link the two to measure "Fix Regressions." * High-Value Fix: Add a reopened_count to the UnitSummary. * Logic: How many crash_events occurred on a line after a FIX event for that same line? diff --git a/gems/lineage/docs/agents/gem-ui.md b/gems/gigasail/docs/agents/gem-ui.md similarity index 84% rename from gems/lineage/docs/agents/gem-ui.md rename to gems/gigasail/docs/agents/gem-ui.md index eca4cc8bf..357c6f7b0 100644 --- a/gems/lineage/docs/agents/gem-ui.md +++ b/gems/gigasail/docs/agents/gem-ui.md @@ -1,8 +1,8 @@ -# Lineage UI: SARIF-Aware Refactoring Cockpit +# Gigasail UI: SARIF-Aware Refactoring Cockpit -This document defines how the Lineage UI should aggregate first-party gem +This document defines how the Gigasail UI should aggregate first-party gem findings and later ecosystem analysis artifacts. The goal is not to make every -tool depend on Lineage. The goal is to make Lineage the durable place where +tool depend on Gigasail. The goal is to make Gigasail the durable place where findings from many tools are normalized, attached to source, and displayed with history, coverage, hazards, and test evidence. @@ -10,7 +10,7 @@ history, coverage, hazards, and test evidence. - Treat SARIF as the shared interchange format for first-party and third-party analysis results. -- Persist SARIF findings in the Lineage SQLite database so UI, LSP, and future +- Persist SARIF findings in the Gigasail SQLite database so UI, LSP, and future risk ranking use the same source of truth. - Keep the existing `--overlay` UI/LSP option as a lightweight preview/debug mode for local artifacts. @@ -24,7 +24,7 @@ history, coverage, hazards, and test evidence. ## Current State -Lineage already accepts repeated `--overlay` paths for the UI and LSP. The +Gigasail already accepts repeated `--overlay` paths for the UI and LSP. The overlay loader can read SARIF 2.1.0 and JSON-like dark-arm payloads, but it is intentionally transient: the artifacts are parsed at server startup, attached to line annotations in memory, and not recorded in SQLite. @@ -40,15 +40,15 @@ That is useful for spot checks, but it is not enough for the full product: ## Target Model -Lineage has two SARIF intake modes. +Gigasail has two SARIF intake modes. ### 1. Ephemeral Overlay Mode Command shape: ```sh -lineage ui --db lineage.db --repo . --overlay tmp/slopcop.sarif --overlay tmp/decomplex.sarif -lineage lsp --db lineage.db --repo . --overlay tmp/slopcop.sarif +giga ui --db gigasail.db --repo . --overlay tmp/slopcop.sarif --overlay tmp/decomplex.sarif +giga lsp --db gigasail.db --repo . --overlay tmp/slopcop.sarif ``` Use this for local experiments and debugging. It should remain fast and @@ -59,10 +59,10 @@ forgiving. It does not update the database. Command shape: ```sh -lineage ingest-sarif \ - --db lineage.db \ +giga ingest-sarif \ + --db gigasail.db \ --repo . \ - --input tmp/lineage-sarif \ + --input tmp/gigasail-sarif \ --source first-party \ --commit "$(git rev-parse HEAD)" \ --replace @@ -75,7 +75,7 @@ inserting the new run, making CI reruns idempotent. ## Normalized Storage Contract -Lineage stores two levels of data. +Gigasail stores two levels of data. ### `sarif_artifacts` @@ -105,18 +105,18 @@ Required fields: - `category`: best-effort category from SARIF properties or rule id. - `is_dark_arm`: true when the result represents a dark branch arm. - `unit_id`: nullable link to the current logical unit containing the line. -- `fingerprint`: SARIF partial fingerprint or Lineage-computed natural key. +- `fingerprint`: SARIF partial fingerprint or Gigasail-computed natural key. - `properties_json`, `raw_json`. This model is intentionally generic. First-party gems may put richer structured -data in `properties`; Lineage stores it without needing custom columns for every +data in `properties`; Gigasail stores it without needing custom columns for every detector. ## First-Party Source Roles ### Decomplex -Decomplex emits structural complexity and similarity findings as SARIF. Lineage +Decomplex emits structural complexity and similarity findings as SARIF. Gigasail should ingest it directly. UI display belongs in the Structural or Audit tab, and line popups should show the rule, level, and message. @@ -124,25 +124,25 @@ line popups should show the rule, level, and message. SlopCop currently acts as a near-term aggregator for Boobytrap and Decomplex coverage-risk signals. That is acceptable for now because it owns dark-arm -classification and PR annotations. Lineage should ingest SlopCop SARIF directly +classification and PR annotations. Gigasail should ingest SlopCop SARIF directly and preserve `dark_arm` properties so exact spans can render in the source viewer. -Long term, Lineage should become the top-level aggregator and SlopCop should be +Long term, Gigasail should become the top-level aggregator and SlopCop should be one source among many. That migration should not block current ingestion. ### Nil-Kill For this phase, ingest only Nil-Kill static analysis SARIF. Do not ingest full runtime trace bundles into SARIF tables. Runtime traces remain under Nil-Kill -evidence or Lineage test-exposure/coverage tables. +evidence or Gigasail test-exposure/coverage tables. Nil-Kill static SARIF can populate the Evidence tab and line popups with type-system or nullability findings. ### Espalier -Espalier emits architecture SARIF. Lineage should ingest it directly and render +Espalier emits architecture SARIF. Gigasail should ingest it directly and render findings in an Architecture tab or generic line detail panel until the dedicated architecture panel exists. @@ -152,7 +152,7 @@ CI and local scripts should be able to write first-party artifacts to one directory: ```text -tmp/lineage-sarif/ +tmp/gigasail-sarif/ decomplex.sarif slopcop.sarif nil-kill-static.sarif @@ -162,7 +162,7 @@ tmp/lineage-sarif/ The same directory convention should work later for external SARIF: ```text -tmp/lineage-sarif/ecosystem/ +tmp/gigasail-sarif/ecosystem/ ruff.sarif eslint.sarif clippy.sarif @@ -198,7 +198,7 @@ severity, provider, and category. Near-term tabs: -- Coverage and hazards: Lineage, Boobytrap, SlopCop. +- Coverage and hazards: Gigasail, Boobytrap, SlopCop. - Structural: Decomplex. - Evidence: Nil-Kill static findings. - Architecture: Espalier. @@ -235,12 +235,12 @@ Persistent SARIF ingestion must be safe to run repeatedly in CI. - Do not build custom linter/smell/flay adapters. - Do not re-score every SARIF provider into Boobytrap risk. -- Do not move all SlopCop aggregation into Lineage yet. +- Do not move all SlopCop aggregation into Gigasail yet. - Do not store Nil-Kill runtime trace event streams as SARIF. ## Acceptance Criteria -- `lineage ingest-sarif` accepts a file or directory of SARIF artifacts. +- `giga ingest-sarif` accepts a file or directory of SARIF artifacts. - Decomplex, SlopCop, Nil-Kill static analysis, and Espalier SARIF can be ingested for the current commit. - Re-running ingest with `--replace` does not double-count findings. diff --git a/gems/lineage/docs/agents/hazard-tracking.md b/gems/gigasail/docs/agents/hazard-tracking.md similarity index 77% rename from gems/lineage/docs/agents/hazard-tracking.md rename to gems/gigasail/docs/agents/hazard-tracking.md index cd58604c4..f0bb16fe1 100644 --- a/gems/lineage/docs/agents/hazard-tracking.md +++ b/gems/gigasail/docs/agents/hazard-tracking.md @@ -1,11 +1,11 @@ # Hazard Tracking: Persistent Safety Constraints -This document outlines the design for tracking "Safety Hazards" (Atomics, Locks, Manual Memory) within the `Lineage` engine. By storing hazard tags at the logical-unit level, the toolchain ensures that safety requirements follow the code through renames and refactors. +This document outlines the design for tracking "Safety Hazards" (Atomics, Locks, Manual Memory) within the `Gigasail` engine. By storing hazard tags at the logical-unit level, the toolchain ensures that safety requirements follow the code through renames and refactors. -## 1. Why Store Hazards in Lineage? +## 1. Why Store Hazards in Gigasail? -- **Rename Stability:** If a function containing an atomic hazard is moved from `io.zig` to `transport.zig`, Lineage ensures the hazard tag is preserved. Static lists or simple AST scans lose this historical context. -- **Temporal Lifecycle:** Lineage tracks the birth and death of hazards. A function may be a "Memory Hazard" in v1 (raw pointers) but become "Safe" in v2 (refactored to abstractions). +- **Rename Stability:** If a function containing an atomic hazard is moved from `io.zig` to `transport.zig`, Gigasail ensures the hazard tag is preserved. Static lists or simple AST scans lose this historical context. +- **Temporal Lifecycle:** Gigasail tracks the birth and death of hazards. A function may be a "Memory Hazard" in v1 (raw pointers) but become "Safe" in v2 (refactored to abstractions). - **Verification Anchor:** By persisting hazards in SQLite, `SlopCop` can instantly query for "Verification Gaps" without re-scanning the entire repository AST. ## 2. Storage Model: The Hazard Ledger @@ -28,7 +28,7 @@ CREATE INDEX idx_hazards_unit_id ON unit_hazards(unit_id); ### Recommendation: Stick to Tree-sitter / Specialized Tools While CodeQL is powerful for deep semantic analysis, it is **overkill** for "Hazard Tagging." Identifying that a function contains an `atomic.load` or a `Mutex` is a surgical syntactic task. -- **The Path:** Use the existing **Zig-backend tool** (and expand it via Tree-sitter for other languages) to identify "Dangerous Primitives" during the `lineage build` pass. +- **The Path:** Use the existing **Zig-backend tool** (and expand it via Tree-sitter for other languages) to identify "Dangerous Primitives" during the `giga build` pass. - **Why:** This is 100x faster than building a CodeQL database and much easier for contributors to extend. Precision is high because these primitives are explicitly named in the grammar. ## 4. GitHub Integration: The "Virtual Gutter" diff --git a/gems/lineage/docs/agents/lang-support-quality.md b/gems/gigasail/docs/agents/lang-support-quality.md similarity index 92% rename from gems/lineage/docs/agents/lang-support-quality.md rename to gems/gigasail/docs/agents/lang-support-quality.md index 0bf035584..0b68c097c 100644 --- a/gems/lineage/docs/agents/lang-support-quality.md +++ b/gems/gigasail/docs/agents/lang-support-quality.md @@ -1,10 +1,10 @@ # Multi-Language Support Quality Pass -This pass spot checked the validation DBs created for Python, TypeScript, Go, Lua, C, C++, C#, Java, Swift, and Kotlin. The goal was not to prove feature parity with Ruby, but to verify that Lineage can ingest and display useful SARIF/coverage/risk evidence for each language, and to fix clear cross-language false positives found during review. +This pass spot checked the validation DBs created for Python, TypeScript, Go, Lua, C, C++, C#, Java, Swift, and Kotlin. The goal was not to prove feature parity with Ruby, but to verify that Gigasail can ingest and display useful SARIF/coverage/risk evidence for each language, and to fix clear cross-language false positives found during review. ## Quality Checklist -- Lineage DB exists and UI serves the repository. +- Gigasail DB exists and UI serves the repository. - SARIF artifacts ingest into `sarif_findings` with stable paths and line anchors. - Decomplex findings include enough detector-specific context to be actionable. - Nil-kill static pressure findings do not flag obviously typed or non-null constructs as loose contracts. @@ -47,7 +47,7 @@ All UI servers responded with HTTP 200 on ports `8081` through `8090` after SARI | Swift | Argument Parser | 8089 | 1,938 | 6 | 1,129 | 0 | 0 | | Kotlin | Okio | 8090 | 3,357 | 6 | 2,243 | 0 | 0 | -Swift and Kotlin SARIF reingest skipped two non-SARIF JSON evidence files in each `tmp/lineage-sarif` directory. That is expected because the ingest command accepts directories and ignores JSON files that are not SARIF documents. +Swift and Kotlin SARIF reingest skipped two non-SARIF JSON evidence files in each `tmp/gigasail-sarif` directory. That is expected because the ingest command accepts directories and ignores JSON files that are not SARIF documents. ## Nil-kill Static Evidence Spot Check @@ -59,7 +59,7 @@ Static evidence was generated through `NilKill::StaticEvidence.build` with Tree- | Python | Rich | 16.773s | 213 | 1,792 | 496 | 68 | 211 | 470 | Python | | TypeScript | Zod | 36.036s | 405 | 1,143 | 113 | 15 | 94 | 12 | JavaScript, TypeScript | | Lua | LuaRocks | 11.602s | 172 | 1,008 | 20 | 17 | 12 | 2 | C, C++, Lua | -| Rust | `gems/lineage` | 14.192s | 19 | 772 | 701 | 701 | 121 | 0 | JavaScript, Ruby, Rust | +| Rust | `gems/gigasail` | 14.192s | 19 | 772 | 701 | 701 | 121 | 0 | JavaScript, Ruby, Rust | | Zig | `zig/` | 39.656s | 279 | 2,907 | 2,289 | 2,228 | 1,422 | 178 | C++, Zig | | C | libuv | 31.700s | 368 | 3,249 | 1,201 | 961 | 590 | 0 | C, JavaScript, Python | | C++ | fmt | 37.257s | 77 | 3,291 | 322 | 306 | 112 | 12 | C, C++, JavaScript, Python | @@ -83,7 +83,7 @@ Spot checks of the generated JSON confirmed anchored facts for representative re Status: good. -The strongest path is covered: Lineage DB, Decomplex, Nil-kill, Espalier, SlopCop, Boobytrap, native lint, coverage, quality events, and one runtime stack-trace smoke event all ingest. Rich is the best multi-language validation target after CLEAR Ruby because it has meaningful Python type annotations and coverage. +The strongest path is covered: Gigasail DB, Decomplex, Nil-kill, Espalier, SlopCop, Boobytrap, native lint, coverage, quality events, and one runtime stack-trace smoke event all ingest. Rich is the best multi-language validation target after CLEAR Ruby because it has meaningful Python type annotations and coverage. Spot checks: @@ -92,7 +92,7 @@ Spot checks: - SlopCop and Boobytrap findings are anchored to real coverage/churn data. - Native lint SARIF from Black is visible and path-anchored. -Remaining caveat: test/example files are included in the validation DB. That is useful for ingestion coverage, but production review should use source-role filtering in Lineage. +Remaining caveat: test/example files are included in the validation DB. That is useful for ingestion coverage, but production review should use source-role filtering in Gigasail. ### TypeScript / Zod @@ -112,7 +112,7 @@ Remaining caveat: broken-protocol and Boobytrap rows in test suites are noisy. T Status: good. -Go has the best non-Ruby systems-language story in this pass. Lineage ingests coverage, SlopCop coverage gaps, Boobytrap risk, Decomplex, Nil-kill static facts, and Go concurrency hazard SARIF. +Go has the best non-Ruby systems-language story in this pass. Gigasail ingests coverage, SlopCop coverage gaps, Boobytrap risk, Decomplex, Nil-kill static facts, and Go concurrency hazard SARIF. Spot checks: @@ -126,7 +126,7 @@ Remaining caveat: Go hazard support is currently concurrency-focused. Other safe Status: usable static ingestion, experimental analysis quality. -Lineage DB and SARIF ingestion work. Decomplex produces useful Lua findings after generated Teal prelude suppression. Nil-kill and Espalier are sparse, which matches the current maturity of Lua ownership/type extraction. +Gigasail DB and SARIF ingestion work. Decomplex produces useful Lua findings after generated Teal prelude suppression. Nil-kill and Espalier are sparse, which matches the current maturity of Lua ownership/type extraction. Spot checks: @@ -140,7 +140,7 @@ Remaining caveat: Lua needs better function ownership and module/type convention Status: strong SARIF ingestion, experimental analysis quality. -Lineage handles the large libuv DB and ingests Decomplex, SlopCop, Boobytrap, Nil-kill, Espalier, and syntax-lint SARIF. Decomplex results are plentiful and anchored. +Gigasail handles the large libuv DB and ingests Decomplex, SlopCop, Boobytrap, Nil-kill, Espalier, and syntax-lint SARIF. Decomplex results are plentiful and anchored. Spot checks: @@ -154,7 +154,7 @@ Remaining caveat: C has no coverage here, and C header/platform conditionals cre Status: strong SARIF ingestion, experimental analysis quality. -Lineage ingests fmt SARIF and the UI handles template-heavy headers. Decomplex and Nil-kill produce anchored findings; Espalier has limited but nonzero ownership extraction. +Gigasail ingests fmt SARIF and the UI handles template-heavy headers. Decomplex and Nil-kill produce anchored findings; Espalier has limited but nonzero ownership extraction. Spot checks: @@ -196,7 +196,7 @@ Remaining caveat: no Java coverage or native lint was available in this environm Status: usable static ingestion, experimental analysis quality. -Lineage DB and SARIF ingestion work. Decomplex and Espalier produce anchored Swift findings; Nil-kill static evidence ingests. SlopCop is empty because no coverage was generated. +Gigasail DB and SARIF ingestion work. Decomplex and Espalier produce anchored Swift findings; Nil-kill static evidence ingests. SlopCop is empty because no coverage was generated. Spot checks: @@ -296,7 +296,7 @@ Espalier is useful where class/function ownership extraction is mature. It is sp ## Recommended Next Work -- Add source-role filtering in Lineage views and ranking so `src`/production findings can be reviewed separately from tests, examples, vendored code, and generated code. +- Add source-role filtering in Gigasail views and ranking so `src`/production findings can be reviewed separately from tests, examples, vendored code, and generated code. - Add explicit generated/vendor detection to the shared source filter for common language artifacts. - Improve C/C++ native build-aware lint/coverage collection; static parser output alone is not enough for high-confidence systems-language review. - Add coverage ingestion recipes for Lua, C#, Java, Swift, and Kotlin validation repos. @@ -305,7 +305,7 @@ Espalier is useful where class/function ownership extraction is mature. It is sp ## Second Validation Round (2026-07-21): Mini-Corpus Audit and Fixes Following the first pass above, a second round audited Espalier/Decomplex -output against the `gems/lineage/docs/agents/cross-lang-support.md` +output against the `gems/gigasail/docs/agents/cross-lang-support.md` mini-corpus repositories (already on disk, real production code, not synthetic fixtures) across all eight of those languages plus a systemic Decomplex issue. Every language produced at least one real, verifiable bug diff --git a/gems/lineage/docs/agents/lsp.md b/gems/gigasail/docs/agents/lsp.md similarity index 62% rename from gems/lineage/docs/agents/lsp.md rename to gems/gigasail/docs/agents/lsp.md index ede56b6b0..1064f0b29 100644 --- a/gems/lineage/docs/agents/lsp.md +++ b/gems/gigasail/docs/agents/lsp.md @@ -1,14 +1,14 @@ -# Lineage LSP: Real-Time Risk Context in the Editor +# Gigasail LSP: Real-Time Risk Context in the Editor -This document outlines the design for the `Lineage` Language Server Protocol (LSP) implementation. The goal is to surface deep historical and operational risk (churn, bugs, missing sanitizer coverage) directly in the developer’s editor via gutters, hovers, and diagnostics. +This document outlines the design for the `Gigasail` Language Server Protocol (LSP) implementation. The goal is to surface deep historical and operational risk (churn, bugs, missing sanitizer coverage) directly in the developer’s editor via gutters, hovers, and diagnostics. ## 1. The Strategy: "Write with History" -To be effective, risk awareness cannot be relegated to a CI step or a separate dashboard. It must be visible at the moment the code is being changed. By implementing an LSP, `Lineage` becomes a continuous background "Safety Copilot" for VS Code, Neovim, Emacs, and IntelliJ. +To be effective, risk awareness cannot be relegated to a CI step or a separate dashboard. It must be visible at the moment the code is being changed. By implementing an LSP, `Gigasail` becomes a continuous background "Safety Copilot" for VS Code, Neovim, Emacs, and IntelliJ. ## 2. LSP Feature Implementation -The `lineage` Rust crate will implement a fast, non-blocking LSP using the `tower-lsp` ecosystem. +The `gigasail` Rust crate will implement a fast, non-blocking LSP using the `tower-lsp` ecosystem. ### A. Diagnostics (`textDocument/publishDiagnostics`) - **What:** Surfaces "Integrity Gaps" (e.g., Unverified Atomics from `SlopCop`, High-Risk Churn from `Boobytrap`). @@ -31,38 +31,38 @@ The `lineage` Rust crate will implement a fast, non-blocking LSP using the `towe The LSP specification does not yet natively support injecting visual icons into the line-number gutter. To achieve the "Red Bolt" (Unverified Atomic) or "Green Shield" (Hard-Gated) experience: -- **VS Code Extension (TypeScript Wrapper):** We will provide a thin extension that launches the Rust binary and listens for custom LSP notifications (`lineage/gutterUpdate`). It uses VS Code’s `DecorationOptions` API to draw the glyphs. +- **VS Code Extension (TypeScript Wrapper):** We will provide a thin extension that launches the Rust binary and listens for custom LSP notifications (`gigasail/gutterUpdate`). It uses VS Code’s `DecorationOptions` API to draw the glyphs. - **Neovim (Lua Wrapper):** A simple Lua plugin that maps the same custom notifications to Neovim `signs` in the sign column. ## 4. Architecture: The Universal Agent -The `lineage` binary will support three execution modes to ensure maximum code reuse: -1. `lineage build` / `lineage ingest` (CLI data pipelines). -2. `lineage ui` (Local Axum-based web dashboard). -3. `lineage lsp` (Background process communicating via `stdio`). +The `gigasail` binary will support three execution modes to ensure maximum code reuse: +1. `giga build` / `giga ingest` (CLI data pipelines). +2. `giga ui` (Local Axum-based web dashboard). +3. `giga lsp` (Background process communicating via `stdio`). ## 5. Implementation Roadmap - **Phase 1: LSP Scaffold.** Implement `tower-lsp` and bind to the `Storage` SQLite queries. - **Phase 2: Standard Features.** Implement Hover and Diagnostics using existing `LogicalUnit` facts. - **Phase 3: CodeLens.** Surface aggregate risk scores above functions. -- **Phase 4: Editor Wrappers.** Build the VS Code and Neovim plugins to render the custom `lineage/gutterUpdate` messages. +- **Phase 4: Editor Wrappers.** Build the VS Code and Neovim plugins to render the custom `gigasail/gutterUpdate` messages. ## 6. MVP Implementation Status -The Rust crate now exposes `lineage lsp --repo . --db lineage.db` as a stdio LSP server. It deliberately reuses the same Lineage annotation query path as the HTML UI so editor gutters and the browser view do not drift. +The Rust crate now exposes `giga lsp --repo . --db gigasail.db` as a stdio LSP server. It deliberately reuses the same Gigasail annotation query path as the HTML UI so editor gutters and the browser view do not drift. Implemented: - `textDocument/publishDiagnostics` for uncovered dark arms and open systems hazards. - `textDocument/hover` with logical-unit risk, bugfix/change counts, test evidence, line hits, hazards, and dark-arm details. - `textDocument/codeLens` with unit-level risk/test summaries above tracked units. -- Custom `lineage/gutterUpdate` notifications containing covered-line, mutant-tested, hazard, and dark-arm gutter items. +- Custom `gigasail/gutterUpdate` notifications containing covered-line, mutant-tested, hazard, and dark-arm gutter items. Not yet implemented: -- VS Code extension wrapper that maps `lineage/gutterUpdate` to `DecorationOptions`. -- Neovim Lua wrapper that maps `lineage/gutterUpdate` to signs/extmarks. +- VS Code extension wrapper that maps `gigasail/gutterUpdate` to `DecorationOptions`. +- Neovim Lua wrapper that maps `gigasail/gutterUpdate` to signs/extmarks. - Pull diagnostics via `textDocument/diagnostic`; the MVP publishes diagnostics on open/change/save because that works broadly across current clients. ## 7. Strategic Impact -The LSP bridges the gap between the "Architect" (who reads the markdown reports) and the "Developer" (who is writing the code). By embedding the `Lineage` signal directly into the editor, the toolchain becomes a daily dependency that actively prevents regressions before they are committed. +The LSP bridges the gap between the "Architect" (who reads the markdown reports) and the "Developer" (who is writing the code). By embedding the `Gigasail` signal directly into the editor, the toolchain becomes a daily dependency that actively prevents regressions before they are committed. diff --git a/gems/lineage/docs/agents/mcp.md b/gems/gigasail/docs/agents/mcp.md similarity index 86% rename from gems/lineage/docs/agents/mcp.md rename to gems/gigasail/docs/agents/mcp.md index ada1a669c..86d2ed46a 100644 --- a/gems/lineage/docs/agents/mcp.md +++ b/gems/gigasail/docs/agents/mcp.md @@ -1,15 +1,15 @@ # MCP server -`lineage mcp` exposes `lineage.db` - and, for a bounded set of static facts, +`giga mcp` exposes `gigasail.db` - and, for a bounded set of static facts, live disk content - to LLM coding agents over the Model Context Protocol. Runs as a Rust subcommand (`src/ui/mcp.rs`) over the official [`rmcp`][rmcp] -SDK, alongside `lineage lsp` and `lineage ui`. +SDK, alongside `giga lsp` and `giga ui`. [rmcp]: https://crates.io/crates/rmcp ## Why 5 tools, not 17 tables -`lineage.db` has 17 tables. A tool-per-table MCP surface would mean an agent +`gigasail.db` has 17 tables. A tool-per-table MCP surface would mean an agent choosing among 17+ near-identical CRUD tools on every turn, which measurably degrades tool-selection accuracy. Instead, each tool answers one workflow question a coding agent asks before or during an edit, composing whichever @@ -17,11 +17,11 @@ tables that question needs: | Tool | Question it answers | Tables / source it reads | |---|---|---| -| `lineage_file_risk` | Should I be careful in this file/directory? | `logical_units`, `events`, `unit_hazards` | -| `lineage_unit_context` | Give me everything about this function before I touch it | `logical_units`, `events`, `unit_hazards`, `unit_hotness`, `sarif_findings` - or, live disk + in-process hazard scan (see below) | -| `lineage_verification_gaps` | Is this trustworthy, specifically why not? | `unit_hazards`, `current_sarif_findings` - or, live scan | -| `lineage_change_history` | How fragile has this area been? | `events`, `crash_events` | -| `lineage_find_definition` | Where is this defined? | `logical_units`, `events`, `engine_state` | +| `giga_file_risk` | Should I be careful in this file/directory? | `logical_units`, `events`, `unit_hazards` | +| `giga_unit_context` | Give me everything about this function before I touch it | `logical_units`, `events`, `unit_hazards`, `unit_hotness`, `sarif_findings` - or, live disk + in-process hazard scan (see below) | +| `giga_verification_gaps` | Is this trustworthy, specifically why not? | `unit_hazards`, `current_sarif_findings` - or, live scan | +| `giga_change_history` | How fragile has this area been? | `events`, `crash_events` | +| `giga_find_definition` | Where is this defined? | `logical_units`, `events`, `engine_state` | Query logic is reused, not reimplemented: three tools call the exact typed `Storage` methods the UI/LSP already use @@ -36,11 +36,11 @@ small direct query for a shape with no existing UI/LSP equivalent ## Running it ```bash -lineage mcp --db lineage.db --repo . +giga mcp --db gigasail.db --repo . ``` Point an MCP-capable client's stdio server config at that command. See -`gems/lineage/test/mcp_server_test.rb` for a worked example driving it over +`gems/gigasail/test/mcp_server_test.rb` for a worked example driving it over the real protocol, including the uncommitted-changes and DB-less cases below. @@ -60,16 +60,16 @@ modes on purpose: definition). Good for glanceable awareness while editing. - **MCP**: active, on-demand, agent-invoked. Good for deliberate investigation before an edit, including cross-file questions - (`lineage_change_history`, directory-scoped `lineage_file_risk`) that have + (`giga_change_history`, directory-scoped `giga_file_risk`) that have no natural per-line LSP representation. ## Uncommitted and added-but-not-committed changes -**The question:** given a `lineage.db` already built from committed +**The question:** given a `gigasail.db` already built from committed history, what's the most effective way to serve accurate results for a file with uncommitted edits or a new, not-yet-committed file? -**Does Lineage already do this? No - not as a general mechanism.** Two +**Does Gigasail already do this? No - not as a general mechanism.** Two narrow, pre-existing seams touch the problem, and neither solves it: - `read_source` (`src/ui/ui.rs`) already reads live disk content when no @@ -90,14 +90,14 @@ working-tree or index capability, and `LineageEngine::run_inner` requires a real `VcsProvider::list_commits()` walk - there is no pseudo-commit or working-tree injection path into the incremental engine. -**What was implemented:** `lineage_unit_context` and -`lineage_verification_gaps` now detect a dirty file via `git2`'s working-tree +**What was implemented:** `giga_unit_context` and +`giga_verification_gaps` now detect a dirty file via `git2`'s working-tree status (`Repository::status_file`, checking `WT_NEW`/`INDEX_NEW` for added-but-not-committed and `WT_MODIFIED`/`INDEX_MODIFIED` for uncommitted edits to a tracked file - not `GitProvider`, which stays deliberately committed-history-only; this is a new, narrowly-scoped use of `git2` directly in `mcp.rs`). When the target file is dirty, the response gains a -`dirty` field and, for the languages Lineage already hazard-scans +`dirty` field and, for the languages Gigasail already hazard-scans in-process, a separate `live_hazards` field: ```json @@ -113,13 +113,13 @@ in-process, a separate `live_hazards` field: in, so a caller can always see both what the database currently believes and what's actually on disk right now, and reconcile deliberately - consistent with this session's "no silent truncation/substitution" pattern -elsewhere in Lineage's tooling. +elsewhere in Gigasail's tooling. **Why this is cheap:** `hazard.rs`'s hazard scanner (`hazard::scan_rust_sites`, `scan_go_sites`, `scan_zig_sites`, `scan_c_sites`, `scan_cpp_sites`, `scan_csharp_sites`) already runs entirely in-process - tree-sitter parse + `.scm` query match against an in-memory string, no -subprocess, no filesystem writes. `lineage ingest-hazards` already calls +subprocess, no filesystem writes. `giga ingest-hazards` already calls these same functions against corpus files; the MCP server just points them at a single file's live disk content instead. Reusing them directly (made `pub(crate)` for this) means the live-rescan path is the *same* hazard @@ -136,10 +136,10 @@ degraded: exactly what the last build recorded, and the response does not pretend otherwise. - **Dynamic-language hazards (Ruby/Python/JS/TS/Java/Kotlin/Swift/Lua/PHP) - have no in-process scanner in Lineage's own binary** - those hazard + have no in-process scanner in Gigasail's own binary** - those hazard queries only exist in `fact-mine`'s `.scm` files and are invoked via `ingest-hazards`'s corresponding provider running against a full corpus - walk, not a single-file call Lineage can make itself. Live-rescanning + walk, not a single-file call Gigasail can make itself. Live-rescanning these would need a `fact-mine-rust` subprocess call (see DB-less mode below for the cost of that path) - not implemented for the dirty-file case, since it would add subprocess latency to every `unit_context` call @@ -170,13 +170,13 @@ not spot-checked. ## DB-less mode -**The question:** can MCP be useful with *no* `lineage.db` at all - on +**The question:** can MCP be useful with *no* `gigasail.db` at all - on demand fact-mining per request, cached and invalidated? -`--db` is optional. Without it, `lineage mcp --repo .` starts in DB-less +`--db` is optional. Without it, `giga mcp --repo .` starts in DB-less mode: -- `lineage_unit_context` and `lineage_verification_gaps` degrade to +- `giga_unit_context` and `giga_verification_gaps` degrade to structure-plus-live-hazards: unit boundaries come from `HeuristicExtractor::extract_units` (`src/db/extract.rs`) - already fully git-decoupled, operating on an in-memory `BlobFile { path, contents }`, @@ -186,11 +186,11 @@ mode: mutation, or hotness data exists without a database, and the response says so via its `note` field rather than returning empty arrays that look like "verified clean." -- `lineage_file_risk`, `lineage_change_history`, and - `lineage_find_definition` are fundamentally database-shaped questions +- `giga_file_risk`, `giga_change_history`, and + `giga_find_definition` are fundamentally database-shaped questions (aggregate risk across a corpus, commit history, rename-stable identity across renames) with no live-recomputation equivalent. They fail with a - clear `isError` message ("requires a lineage.db; server was started + clear `isError` message ("requires a gigasail.db; server was started without --db") rather than crashing or returning misleading partial data. **The cost tiering that shapes what's feasible here** (measured this @@ -217,7 +217,7 @@ implemented - there is nothing to cache until a tool needs tier two): container/CI filesystems that don't preserve it; content hashing is the same invalidation primitive `annotate_sarif_freshness` already uses (byte-compare against blob content) rather than a new one. -- Cache location: `/.lineage-mcp-cache/.json`, one file per +- Cache location: `/.gigasail-mcp-cache/.json`, one file per distinct `(fact-mine flags, file content)` pair (the flags matter because `syntax-facts` supports scoped extraction; a full-mode cache entry cannot serve a narrower request cheaply without re-filtering, so it is keyed @@ -242,9 +242,9 @@ implemented - there is nothing to cache until a tool needs tier two): - **No `lineage_architecture_neighborhood` tool.** The architecture graph (`architecture_*` tables) needs an Espalier ingestion run, which is Ruby- focused; there was no architecture data to validate this tool against for - Lineage's own (Rust) codebase, so it was cut from the MVP rather than + Gigasail's own (Rust) codebase, so it was cut from the MVP rather than shipped unvalidated. -- **`lineage_verification_gaps` on a directory prefix returns raw active- +- **`giga_verification_gaps` on a directory prefix returns raw active- hazard counts, not the verified/unverified evidence join** a single-file lookup gets via `apply_hazards.sql`. Exact-file lookups get full fidelity; directory-prefix lookups trade fidelity for coverage. Noted in the tool's @@ -260,24 +260,24 @@ implemented - there is nothing to cache until a tool needs tier two): fact-mine output) is designed but not implemented** (see "DB-less mode" above) - no tool currently needs it. - **Skill guidance for *when* to call these tools does not exist yet** - - this MVP is the server; the calling convention (call `lineage_unit_context` - before editing unfamiliar code, `lineage_verification_gaps` before + this MVP is the server; the calling convention (call `giga_unit_context` + before editing unfamiliar code, `giga_verification_gaps` before trusting a coverage number, etc.) needs to live in a SKILL.md, not here. ## Findings from dogfooding -Validated against a real `lineage.db` built for Lineage's own repository - +Validated against a real `gigasail.db` built for Gigasail's own repository - 300 commits of real git history, real `cargo llvm-cov` coverage, and a real `ingest-hazards --provider rust` scan - not synthetic fixtures. Building that corpus is itself a finding: 300 commits took ~30s, but a full coverage run took over a minute and produced 2.1GB of `llvm-cov-target` build cache. "Point the MCP server at your repo" is not a zero-setup -story; populating a genuinely useful `lineage.db` needs the same +story; populating a genuinely useful `gigasail.db` needs the same build/coverage/hazard pipeline CI already runs, scheduled or cached, not run ad hoc per investigation. **The tool is real, not a toy - it caught something true in code written -minutes earlier.** `lineage_verification_gaps` on `src/ui/lsp.rs` flagged +minutes earlier.** `giga_verification_gaps` on `src/ui/lsp.rs` flagged the `documents: Arc>>` field added for this session's go-to-definition fix as `rust_loom_concurrency`, evidence `concurrency`, currently unaddressed - a real, non-obvious signal, not a @@ -285,21 +285,21 @@ hallucination or a stale finding, produced by a plain tool call with no manual review. **One call surfaced a real prioritization signal with zero custom -analysis.** `lineage_file_risk("gems/lineage/src/ui/")` showed the HTTP +analysis.** `giga_file_risk("gems/gigasail/src/ui/")` showed the HTTP controllers (`architecture.rs`, `index.rs`, `source.rs`: 8.6-20.8% coverage) sitting far below the core logic they call into (`ui.rs`, `lsp.rs`: 72.8-86.8%) - a genuine "review this next" candidate a human would otherwise have to notice by eyeballing multiple files. -**Rename-stable identity - Lineage's actual core value proposition - -survives the MCP layer intact.** `lineage_unit_context` on a moved +**Rename-stable identity - Gigasail's actual core value proposition - +survives the MCP layer intact.** `giga_unit_context` on a moved function (`apply_espalier_effect_spans`) correctly reported one continuous history (`CHANGE` + `MOVE`) and the unit's current post-move span, not two disconnected identities. This wasn't a given; it would have been easy for a hand-rolled MVP query to silently break that guarantee. **Dogfooding found and fixed a real usability gap in the original Ruby -MVP.** Both `lineage_unit_context` and `lineage_verification_gaps` +MVP.** Both `giga_unit_context` and `giga_verification_gaps` originally dropped the hazard's actual source line (`unit_hazards.source`, exposed as `snippet`) even though the reused query already carried it - every hazard result forced a redundant file read just to see what was @@ -313,7 +313,7 @@ LSP client, no editor in the loop at all - useful specifically for an agent working through file tools alone, which is the majority of current coding-agent deployments. -**Known limitation surfaced, then fixed.** `lineage_file_risk`'s +**Known limitation surfaced, then fixed.** `giga_file_risk`'s `avg_line_coverage`/`avg_mutant_coverage` were unweighted averages across a path's units, so a 3-line getter and a 200-line function counted equally. Didn't matter for the finding above (8-20% vs 72-86% is stark either way), @@ -378,7 +378,7 @@ protocol/design change. **Adding a new dependency (`rmcp`) required freeing disk first.** The dev VM was at 99% disk (1.6G free) when this work started, mostly gitignored -Rust build cache (`gems/lineage/target`, 3.4-4.2G, safely removable via +Rust build cache (`gems/gigasail/target`, 3.4-4.2G, safely removable via `cargo clean` - confirmed gitignored before deleting) plus several gigabytes of other sessions' scratch output under `/tmp` and this repo's own `tmp/` (left untouched - not confirmed safe to delete, unlike the diff --git a/gems/lineage/docs/agents/plugins.md b/gems/gigasail/docs/agents/plugins.md similarity index 87% rename from gems/lineage/docs/agents/plugins.md rename to gems/gigasail/docs/agents/plugins.md index 48fa00104..0cbc10dd7 100644 --- a/gems/lineage/docs/agents/plugins.md +++ b/gems/gigasail/docs/agents/plugins.md @@ -1,10 +1,10 @@ -# Lineage Plugin System Findings +# Gigasail Plugin System Findings ## Verdict Build a plugin system, but keep the first version deliberately boring: plugins should be external adapters that parse provider-specific inputs -and emit a stable Lineage ingest envelope. Lineage core should still own +and emit a stable Gigasail ingest envelope. Gigasail core should still own commit validation, source verification, line-to-logical-unit mapping, transactions, and database writes. @@ -12,14 +12,14 @@ Do not start with in-process Lua plugins or dynamically loaded Rust plugins. That is overkill right now. Dynamic Rust plugins create ABI, versioning, build, and safety problems; embedded Lua adds another runtime and makes database writes harder to audit. The useful boundary is -not "run arbitrary code inside Lineage"; it is "let arbitrary tools -normalize side-inputs into a contract Lineage can verify." +not "run arbitrary code inside Gigasail"; it is "let arbitrary tools +normalize side-inputs into a contract Gigasail can verify." The right architecture is: 1. Built-in Rust adapters for first-party/common providers. 2. External executable plugins for everything else. -3. A stable JSON ingest envelope between the plugin and Lineage. +3. A stable JSON ingest envelope between the plugin and Gigasail. 4. A generic `plugin_events` table for provider-specific payloads, plus promotion into first-class tables when a provider becomes common. @@ -43,12 +43,12 @@ need to map into: - optional provider-specific details Stack traces are another version of the same problem. The provider -parses a format, but Lineage must verify the commit and source lines +parses a format, but Gigasail must verify the commit and source lines before trusting it. So yes, a plugin system is worth it. The overkill part would be giving plugins direct database authority or loading arbitrary code into the -Lineage process. +Gigasail process. ## Ownership Boundary @@ -61,7 +61,7 @@ Plugins should own: - classifying provider-specific meaning such as `unit`, `integration`, `fuzz`, `transpile`, `runtime`, or `mutant` -Lineage core should own: +Gigasail core should own: - verifying the commit exists in `metadata` - reading source at that commit @@ -81,15 +81,15 @@ verification. Use an external process interface: ```sh -lineage ingest-plugin \ - --db lineage.db \ +giga ingest-plugin \ + --db gigasail.db \ --repo . \ - --plugin ./tools/lineage-mutant-plugin \ + --plugin ./tools/gigasail-mutant-plugin \ --input mutant-results.json \ --commit "$GITHUB_SHA" ``` -Lineage invokes the plugin with a small JSON request on stdin: +Gigasail invokes the plugin with a small JSON request on stdin: ```json { @@ -258,12 +258,12 @@ specific providers: - one-off migration/backfill scripts External plugins can be written in Rust, Lua, Ruby, Python, JavaScript, -or anything else. Lineage should not care as long as stdout is valid +or anything else. Gigasail should not care as long as stdout is valid JSON. ## Lua and Rust Assessment -Lua embedded in Lineage is not worth it for the MVP. It makes sense only +Lua embedded in Gigasail is not worth it for the MVP. It makes sense only if we need lightweight user-defined transformations after the ingest envelope is stable. @@ -277,7 +277,7 @@ external JSON contract has proven insufficient. ## Minimal Implementation Plan -1. Add `lineage ingest-plugin --plugin CMD --input PATH`. +1. Add `giga ingest-plugin --plugin CMD --input PATH`. 2. Define `lineage_plugin_api: 1` request/response JSON. 3. Add `plugin_events`. 4. Route `quality_metric` records into `quality_events` plus @@ -292,18 +292,18 @@ external JSON contract has proven insufficient. ## Recommendation Do the plugin system, but keep it as a normalized ingest adapter layer. -Do not give plugins direct database writes yet. This will let Lineage add +Do not give plugins direct database writes yet. This will let Gigasail add Mutant, richer Codecov/GitHub artifact classification, Sentry-like providers, and language-specific quality tools without turning the core engine into a pile of provider-specific parsers. ## Future Language Test Matrix -To verify the generalization of the toolchain (Lineage, Boobytrap, SlopCop, Decomplex, Nil-Kill, Espalier), the following repositories are identified as "Gold Standard" test targets for tomorrow’s fire drill and future language support verification. These repos are in the 10k–25k LOC range with high-alpha logic and rigorous test suites. +To verify the generalization of the toolchain (Gigasail, Boobytrap, SlopCop, Decomplex, Nil-Kill, Espalier), the following repositories are identified as "Gold Standard" test targets for tomorrow’s fire drill and future language support verification. These repos are in the 10k–25k LOC range with high-alpha logic and rigorous test suites. | Language | Repository | Approx. LOC | Test Target Focus | | :--- | :--- | :--- | :--- | -| **C** | **[libuv](https://github.com/libuv/libuv)** | ~25,000 | **Lineage:** Rename stability and deep temporal risk tracking. | +| **C** | **[libuv](https://github.com/libuv/libuv)** | ~25,000 | **Gigasail:** Rename stability and deep temporal risk tracking. | | **C++** | **[Google Test](https://github.com/google/googletest)** | ~20,000 | **SlopCop:** TSan/Loom gap detection in self-hosted test logic. | | **C#** | **[Polly](https://github.com/App-vNext/Polly)** | ~15,000 | **VOPR:** Resiliency and retry-loop simulation coverage. | | **Java** | **[Gson](https://github.com/google/gson)** | ~15,000 | **Nil-kill:** Complex reflection and nullability edge cases. | @@ -312,7 +312,7 @@ To verify the generalization of the toolchain (Lineage, Boobytrap, SlopCop, Deco | **Lua** | **[Lapis](https://github.com/leafo/lapis)** | ~15,000 | **Universal Syntax:** Testing Tree-sitter normalization boundaries. | ### Fire Drill Protocol -1. **Lineage Build:** Run `lineage build` to verify performance and logical identity stability. +1. **Gigasail Build:** Run `giga build` to verify performance and logical identity stability. 2. **Decomplex Audit:** Run `decomplex report` to verify "Decision Pressure" and "Root Cause" accuracy. 3. **SlopCop Check:** Verify "Constraint-Aware Coverage" (e.g., Go race-detector/Zig Loom gaps). 4. **Nil-Kill Inference:** Run Nil-Kill to verify SMT solver consistency across language-specific type systems. diff --git a/gems/lineage/docs/agents/profiling-data-integration.md b/gems/gigasail/docs/agents/profiling-data-integration.md similarity index 93% rename from gems/lineage/docs/agents/profiling-data-integration.md rename to gems/gigasail/docs/agents/profiling-data-integration.md index 664c6219e..5980e2a72 100644 --- a/gems/lineage/docs/agents/profiling-data-integration.md +++ b/gems/gigasail/docs/agents/profiling-data-integration.md @@ -1,15 +1,15 @@ # Profiling-data integration (profile-hotness/v1) -How runtime profiles become path-attributed hotness in `lineage.db`, per +How runtime profiles become path-attributed hotness in `gigasail.db`, per language, and what is known not to work. ## Pipeline ``` -profiler capture -> tools/pprof_to_hotness.rb -> lineage ingest-hotness -> UI +profiler capture -> tools/pprof_to_hotness.rb -> giga ingest-hotness -> UI ``` -`ruby tools/profile_hotness.rb --target NAME [--ingest --db lineage.db]` +`ruby tools/profile_hotness.rb --target NAME [--ingest --db gigasail.db]` packages capture + convert + ingest per sub-project of this repository; `--list` shows targets. @@ -45,7 +45,7 @@ tier across sources. `--path-prefix` drops harness/vendor frames. Profiler frames without a usable path are resolved by `ingest-hotness` against the logical-unit inventory already in the database (no parsing - -run `lineage build` first). Tiers, recorded in `unit_hotness.resolution`: +run `giga build` first). Tiers, recorded in `unit_hotness.resolution`: 1. `exact` / `declared` - the profile's own repo-relative path. 2. `basename` - DWARF basename corroborated against a unique project path diff --git a/gems/lineage/docs/agents/scm_migration.md b/gems/gigasail/docs/agents/scm_migration.md similarity index 86% rename from gems/lineage/docs/agents/scm_migration.md rename to gems/gigasail/docs/agents/scm_migration.md index 059008b1b..beaf341ed 100644 --- a/gems/lineage/docs/agents/scm_migration.md +++ b/gems/gigasail/docs/agents/scm_migration.md @@ -1,6 +1,6 @@ # Epic: Migrate to Declarative Tree-Sitter Query Files (.scm) -This epic covers migrating Lineage's language-specific AST parsing and hazard-scanning heuristics to declarative Tree-Sitter query (`.scm`) files. This removes the complex, fragile, and hard-to-maintain language-specific Rust logic in [extract.rs](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs) and [hazard.rs](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs). +This epic covers migrating Gigasail's language-specific AST parsing and hazard-scanning heuristics to declarative Tree-Sitter query (`.scm`) files. This removes the complex, fragile, and hard-to-maintain language-specific Rust logic in [extract.rs](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs) and [hazard.rs](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs). --- @@ -19,7 +19,7 @@ Captures match `@hazard.`, which maps directly to the hazard event * `@hazard.go_race_goroutine` * `@hazard.rust_unsafe_block` * `@hazard.zig_unsafe_memory` -* (and all other hazards defined in [hazard.rs](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs)). +* (and all other hazards defined in [hazard.rs](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs)). --- @@ -156,6 +156,6 @@ mod tests { ## 4. Implementation Steps 1. **Define Embedded Assets / Direct Paths**: Embed `.scm` query assets into the binary or establish a configuration path (e.g. `queries/`). -2. **Rewrite [extract.rs](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs)**: Re-route `tree_sitter_candidates` to call the new agnostic query runner. -3. **Rewrite [hazard.rs](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs)**: Map the hazard scanning functions to the language-agnostic hazard query runner. -4. **Validate Tests & Coverage**: Ensure all existing tests in `gems/lineage/` pass and check that Rust's test coverage in `src/db/` remains above 95%. +2. **Rewrite [extract.rs](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs)**: Re-route `tree_sitter_candidates` to call the new agnostic query runner. +3. **Rewrite [hazard.rs](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs)**: Map the hazard scanning functions to the language-agnostic hazard query runner. +4. **Validate Tests & Coverage**: Ensure all existing tests in `gems/gigasail/` pass and check that Rust's test coverage in `src/db/` remains above 95%. diff --git a/gems/lineage/docs/agents/sql.md b/gems/gigasail/docs/agents/sql.md similarity index 93% rename from gems/lineage/docs/agents/sql.md rename to gems/gigasail/docs/agents/sql.md index 412b64c7a..a5410e789 100644 --- a/gems/lineage/docs/agents/sql.md +++ b/gems/gigasail/docs/agents/sql.md @@ -2,7 +2,7 @@ ## Status -Proposed architecture. This document does not require moving Lineage's current +Proposed architecture. This document does not require moving Gigasail's current inline SQL immediately. New and materially changed queries should follow this layout, and existing queries can migrate incrementally. @@ -32,7 +32,7 @@ of complete query files. Values remain bound parameters. ## Proposed Layout ```text -gems/lineage/sql/ +gems/gigasail/sql/ schema/ 001_core.sql 002_architecture.sql @@ -73,7 +73,7 @@ Each query should begin with machine-readable comments: ``` The metadata may later move to a sidecar manifest, but the query ID must remain -stable. Lineage events, hazards, plans, and tests should refer to the ID rather +stable. Gigasail events, hazards, plans, and tests should refer to the ID rather than a Rust function name. ## Independent Query Tests @@ -120,7 +120,7 @@ have a column-contract test. ### 3. Repository workflow tests -Exercise query results through the public Lineage API and UI. These tests cover +Exercise query results through the public Gigasail API and UI. These tests cover scope, artifact freshness, logical-unit reconciliation, pagination, and HTML or JSON presentation. They should not be the first place where NULL or JOIN semantics are tested. @@ -215,7 +215,7 @@ duplicate matching right rows when cardinality is not proven one-to-one Test cases declare which fixture rows and expected outcomes they cover. The SQL test runner records query ID, hazard ID, fixture witness IDs, and assertion -results. Lineage can then distinguish: +results. Gigasail can then distinguish: - hazard not exercised; - SQL statement executed but NULL witness absent; @@ -266,7 +266,7 @@ The same SQL corpus can exercise the sibling tools without blurring ownership: | Espalier | Project table/view/procedure dependencies, query-to-table effects, ownership boundaries, and architecture pressure. | | SlopCop | Report actionable SQL hazards and policy violations from FactMine facts. | | Boobytrap | Capture runtime query identity, observed parameter/null/cardinality shapes, latency, errors, and production witnesses without recording sensitive values. | -| Lineage | Join query identity to history, tests, hazards, runtime evidence, mutations, ownership, and artifact freshness; present review queues and source navigation. | +| Gigasail | Join query identity to history, tests, hazards, runtime evidence, mutations, ownership, and artifact freshness; present review queues and source navigation. | The corpus should contain: @@ -279,14 +279,14 @@ The corpus should contain: - expected Espalier dependency edges; - SQL test cases and mutations; - sanitized Boobytrap observation fixtures; -- Lineage import/API/UI expectations. +- Gigasail import/API/UI expectations. Each example needs a stable corpus ID so results from every tool can be joined without parsing messages. ## Dialects -Start with SQLite because Lineage already embeds it and can run fixtures without +Start with SQLite because Gigasail already embeds it and can run fixtures without external services. Keep the public fact schema dialect-neutral, but never assume all SQL semantics are identical. @@ -296,14 +296,14 @@ must declare its dialect, required extensions, and minimum engine capabilities. ## Migration Plan -1. Move the new architecture queries into `gems/lineage/sql/queries` without +1. Move the new architecture queries into `gems/gigasail/sql/queries` without changing behavior. 2. Add query IDs, parameter/result contracts, and direct fixture tests. 3. Move other high-risk multi-join and aggregation queries incrementally. 4. Add the NULL/join/cardinality fixture matrix. 5. Add a FactMine SQL fact schema and oracle corpus. 6. Implement conservative hazard rules with explicit confidence. -7. Record semantic witnesses and connect them to Lineage test exposure. +7. Record semantic witnesses and connect them to Gigasail test exposure. 8. Add constrained SQL mutation testing. 9. Expand to runtime observations and additional dialect engines. diff --git a/gems/lineage/docs/agents/stack-trace-support.md b/gems/gigasail/docs/agents/stack-trace-support.md similarity index 86% rename from gems/lineage/docs/agents/stack-trace-support.md rename to gems/gigasail/docs/agents/stack-trace-support.md index fd033f641..8c51fa2bf 100644 --- a/gems/lineage/docs/agents/stack-trace-support.md +++ b/gems/gigasail/docs/agents/stack-trace-support.md @@ -1,6 +1,6 @@ # Universal Stack Trace Support: Verification-Anchored Ingestion -This document outlines the design for ingesting external crash data (e.g., Sentry stack traces) into the `Lineage` engine. The system is designed to anchor runtime errors to specific AST units (Logical IDs) using a pluggable, two-layered adapter architecture. +This document outlines the design for ingesting external crash data (e.g., Sentry stack traces) into the `Gigasail` engine. The system is designed to anchor runtime errors to specific AST units (Logical IDs) using a pluggable, two-layered adapter architecture. ## 1. The Goal: Historical Verification @@ -53,4 +53,4 @@ CREATE TABLE crash_events ( ## 6. Strategic Impact -Adding stack trace support transforms `Lineage` from a Git parser into a **Real-World Risk Oracle**. It allows the toolchain to bridge the gap between "What the code looks like" (Structural) and "How it behaves in production" (Empirical). +Adding stack trace support transforms `Gigasail` from a Git parser into a **Real-World Risk Oracle**. It allows the toolchain to bridge the gap between "What the code looks like" (Structural) and "How it behaves in production" (Empirical). diff --git a/gems/lineage/docs/agents/tag_queries.md b/gems/gigasail/docs/agents/tag_queries.md similarity index 69% rename from gems/lineage/docs/agents/tag_queries.md rename to gems/gigasail/docs/agents/tag_queries.md index eed770b71..734f692c7 100644 --- a/gems/lineage/docs/agents/tag_queries.md +++ b/gems/gigasail/docs/agents/tag_queries.md @@ -1,13 +1,13 @@ # Refactoring Language-Specific Extraction with Tree-Sitter Tag Queries -This document outlines how the language-specific logical unit extraction and hazard scanning within `gems/lineage` can be refactored into a language-agnostic query engine using Tree-Sitter declarative query files (`.scm`). +This document outlines how the language-specific logical unit extraction and hazard scanning within `gems/gigasail` can be refactored into a language-agnostic query engine using Tree-Sitter declarative query files (`.scm`). --- ## Language-Agnostic Engine Architecture ### Is it language-agnostic by default? -- **The Core Rust Engine**: Yes. The Rust code in [extract.rs](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs) and [hazard.rs](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs) becomes entirely language-agnostic. It will only handle file loading, tree-sitter parsing, query execution, and database mapping. +- **The Core Rust Engine**: Yes. The Rust code in [extract.rs](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs) and [hazard.rs](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs) becomes entirely language-agnostic. It will only handle file loading, tree-sitter parsing, query execution, and database mapping. - **The Query Assets**: No. We must author and maintain **one query file (`.scm`) per language** (e.g., `queries/python/tags.scm`, `queries/go/tags.scm`). This is standard for Tree-Sitter integrations (used by GitHub, Sourcegraph, and Neovim) because AST node structures differ across languages. ```mermaid @@ -24,26 +24,26 @@ graph TD ## Current Language-Specific Code Locations ### 1. Logical Unit Extraction -In [extract.rs](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs), logical units are extracted by traversing the AST and matching on concrete node kinds in language-specific functions: -- [ruby_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L389) -- [python_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L423) -- [javascript_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L452) -- [typescript_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L471) -- [go_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L494) -- [c_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L521) -- [cpp_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L533) -- [csharp_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L554) -- [rust_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L586) -- [zig_candidate_for_node](file:///home/yahn/litedb/gems/lineage/src/db/extract.rs#L610) +In [extract.rs](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs), logical units are extracted by traversing the AST and matching on concrete node kinds in language-specific functions: +- [ruby_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L389) +- [python_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L423) +- [javascript_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L452) +- [typescript_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L471) +- [go_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L494) +- [c_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L521) +- [cpp_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L533) +- [csharp_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L554) +- [rust_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L586) +- [zig_candidate_for_node](file:///home/yahn/litedb/gems/gigasail/src/db/extract.rs#L610) ### 2. Hazard Scanning -In [hazard.rs](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs), hazards are detected using line-level substring or regex searches on file contents: -- [scan_zig_sites](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs#L347) -- [scan_go_sites](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs#L406) -- [scan_rust_sites](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs#L434) -- [scan_c_sites](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs#L468) -- [scan_cpp_sites](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs#L499) -- [scan_csharp_sites](file:///home/yahn/litedb/gems/lineage/src/db/hazard.rs#L530) +In [hazard.rs](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs), hazards are detected using line-level substring or regex searches on file contents: +- [scan_zig_sites](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs#L347) +- [scan_go_sites](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs#L406) +- [scan_rust_sites](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs#L434) +- [scan_c_sites](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs#L468) +- [scan_cpp_sites](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs#L499) +- [scan_csharp_sites](file:///home/yahn/litedb/gems/gigasail/src/db/hazard.rs#L530) --- diff --git a/gems/lineage/docs/agents/ui.md b/gems/gigasail/docs/agents/ui.md similarity index 70% rename from gems/lineage/docs/agents/ui.md rename to gems/gigasail/docs/agents/ui.md index a686423c4..44cc4d3dd 100644 --- a/gems/lineage/docs/agents/ui.md +++ b/gems/gigasail/docs/agents/ui.md @@ -1,18 +1,18 @@ -# Lineage UI: Local-First Observability Portal +# Gigasail UI: Local-First Observability Portal -This document outlines the design for the `Lineage UI`, a lightweight, local-first web interface for visualizing historical risk, verification gaps, and logical-unit lineage. The UI is served directly from the `lineage` Rust binary. +This document outlines the design for the `Gigasail UI`, a lightweight, local-first web interface for visualizing historical risk, verification gaps, and logical-unit gigasail. The UI is served directly from the `gigasail` Rust binary. ## 1. Product Philosophy: "High-Alpha Safety" -The goal of the UI is to transform the "Ground Truth" stored in the `lineage.db` into a visceral, actionable experience for developers and LLMs. It moves risk from a JSON log to a visual "Heatmap" embedded directly in the source code context. +The goal of the UI is to transform the "Ground Truth" stored in the `gigasail.db` into a visceral, actionable experience for developers and LLMs. It moves risk from a JSON log to a visual "Heatmap" embedded directly in the source code context. ## 2. Architecture: Single-Binary Delivery To ensure zero-config installation and high performance, the UI follows a "Local-First" architecture. -- **Backend (Rust/Axum):** A high-performance web server embedded in the `lineage` crate. It provides JSON endpoints for file navigation and risk-querying. +- **Backend (Rust/Axum):** A high-performance web server embedded in the `gigasail` crate. It provides JSON endpoints for file navigation and risk-querying. - **Frontend (React/Monaco):** A modern, high-density dashboard. The core view uses the **Monaco Editor** (VS Code engine) to render source code with custom gutter decorations. -- **Asset Embedding:** The compiled React frontend is embedded into the Rust binary using `rust-embed`, allowing the entire portal to be served via `lineage ui --port 8080`. +- **Asset Embedding:** The compiled React frontend is embedded into the Rust binary using `rust-embed`, allowing the entire portal to be served via `giga ui --port 8080`. ## 3. Core Features @@ -45,10 +45,10 @@ A repository-wide treemap visualizing the "Integrity Gap": ## 5. Implementation Roadmap -- **Phase 1: API (150 LoC):** Implement Axum routes for `/files`, `/source/:path`, and `/lineage/:path`. +- **Phase 1: API (150 LoC):** Implement Axum routes for `/files`, `/source/:path`, and `/gigasail/:path`. - **Phase 2: Monaco Wrapper (300 LoC):** Build the React component for the code view with decoration support. -- **Phase 3: Integration (100 LoC):** Join `lineage.db` queries to the API and embed assets. +- **Phase 3: Integration (100 LoC):** Join `gigasail.db` queries to the API and embed assets. ## 6. Strategic Narrative -The Lineage UI is the "Front Window" of the suite. It is the tool you show on the v0.1 launch landing page to prove that your "Deep History" and "Systems Integrity" claims are not just theoretical—they are visible, navigable, and ready for the real world. +The Gigasail UI is the "Front Window" of the suite. It is the tool you show on the v0.1 launch landing page to prove that your "Deep History" and "Systems Integrity" claims are not just theoretical—they are visible, navigable, and ready for the real world. diff --git a/gems/lineage/docs/agents/zig-production-sources.txt b/gems/gigasail/docs/agents/zig-production-sources.txt similarity index 100% rename from gems/lineage/docs/agents/zig-production-sources.txt rename to gems/gigasail/docs/agents/zig-production-sources.txt diff --git a/gems/lineage/docs/agents/zig-semantic-index-spike.md b/gems/gigasail/docs/agents/zig-semantic-index-spike.md similarity index 100% rename from gems/lineage/docs/agents/zig-semantic-index-spike.md rename to gems/gigasail/docs/agents/zig-semantic-index-spike.md diff --git a/gems/lineage/docs/repo-notes/README.md b/gems/gigasail/docs/repo-notes/README.md similarity index 100% rename from gems/lineage/docs/repo-notes/README.md rename to gems/gigasail/docs/repo-notes/README.md diff --git a/gems/lineage/docs/repo-notes/ants.md b/gems/gigasail/docs/repo-notes/ants.md similarity index 100% rename from gems/lineage/docs/repo-notes/ants.md rename to gems/gigasail/docs/repo-notes/ants.md diff --git a/gems/lineage/docs/repo-notes/cjson.md b/gems/gigasail/docs/repo-notes/cjson.md similarity index 100% rename from gems/lineage/docs/repo-notes/cjson.md rename to gems/gigasail/docs/repo-notes/cjson.md diff --git a/gems/lineage/docs/repo-notes/commons-cli.md b/gems/gigasail/docs/repo-notes/commons-cli.md similarity index 100% rename from gems/lineage/docs/repo-notes/commons-cli.md rename to gems/gigasail/docs/repo-notes/commons-cli.md diff --git a/gems/lineage/docs/repo-notes/costura.md b/gems/gigasail/docs/repo-notes/costura.md similarity index 100% rename from gems/lineage/docs/repo-notes/costura.md rename to gems/gigasail/docs/repo-notes/costura.md diff --git a/gems/lineage/docs/repo-notes/eventpp.md b/gems/gigasail/docs/repo-notes/eventpp.md similarity index 100% rename from gems/lineage/docs/repo-notes/eventpp.md rename to gems/gigasail/docs/repo-notes/eventpp.md diff --git a/gems/lineage/docs/repo-notes/fast-json-stringify.md b/gems/gigasail/docs/repo-notes/fast-json-stringify.md similarity index 100% rename from gems/lineage/docs/repo-notes/fast-json-stringify.md rename to gems/gigasail/docs/repo-notes/fast-json-stringify.md diff --git a/gems/lineage/docs/repo-notes/go-immutable-radix.md b/gems/gigasail/docs/repo-notes/go-immutable-radix.md similarity index 100% rename from gems/lineage/docs/repo-notes/go-immutable-radix.md rename to gems/gigasail/docs/repo-notes/go-immutable-radix.md diff --git a/gems/lineage/docs/repo-notes/javapoet.md b/gems/gigasail/docs/repo-notes/javapoet.md similarity index 100% rename from gems/lineage/docs/repo-notes/javapoet.md rename to gems/gigasail/docs/repo-notes/javapoet.md diff --git a/gems/lineage/docs/repo-notes/jwt.md b/gems/gigasail/docs/repo-notes/jwt.md similarity index 100% rename from gems/lineage/docs/repo-notes/jwt.md rename to gems/gigasail/docs/repo-notes/jwt.md diff --git a/gems/lineage/docs/repo-notes/mapstructure.md b/gems/gigasail/docs/repo-notes/mapstructure.md similarity index 100% rename from gems/lineage/docs/repo-notes/mapstructure.md rename to gems/gigasail/docs/repo-notes/mapstructure.md diff --git a/gems/lineage/docs/repo-notes/mistune.md b/gems/gigasail/docs/repo-notes/mistune.md similarity index 100% rename from gems/lineage/docs/repo-notes/mistune.md rename to gems/gigasail/docs/repo-notes/mistune.md diff --git a/gems/lineage/docs/repo-notes/mockhttp.md b/gems/gigasail/docs/repo-notes/mockhttp.md similarity index 100% rename from gems/lineage/docs/repo-notes/mockhttp.md rename to gems/gigasail/docs/repo-notes/mockhttp.md diff --git a/gems/lineage/docs/repo-notes/mpc.md b/gems/gigasail/docs/repo-notes/mpc.md similarity index 100% rename from gems/lineage/docs/repo-notes/mpc.md rename to gems/gigasail/docs/repo-notes/mpc.md diff --git a/gems/lineage/docs/repo-notes/pino.md b/gems/gigasail/docs/repo-notes/pino.md similarity index 100% rename from gems/lineage/docs/repo-notes/pino.md rename to gems/gigasail/docs/repo-notes/pino.md diff --git a/gems/lineage/docs/repo-notes/plog.md b/gems/gigasail/docs/repo-notes/plog.md similarity index 100% rename from gems/lineage/docs/repo-notes/plog.md rename to gems/gigasail/docs/repo-notes/plog.md diff --git a/gems/lineage/docs/repo-notes/pluggy.md b/gems/gigasail/docs/repo-notes/pluggy.md similarity index 100% rename from gems/lineage/docs/repo-notes/pluggy.md rename to gems/gigasail/docs/repo-notes/pluggy.md diff --git a/gems/lineage/docs/repo-notes/proxy.md b/gems/gigasail/docs/repo-notes/proxy.md similarity index 100% rename from gems/lineage/docs/repo-notes/proxy.md rename to gems/gigasail/docs/repo-notes/proxy.md diff --git a/gems/lineage/docs/repo-notes/pydantic-settings.md b/gems/gigasail/docs/repo-notes/pydantic-settings.md similarity index 100% rename from gems/lineage/docs/repo-notes/pydantic-settings.md rename to gems/gigasail/docs/repo-notes/pydantic-settings.md diff --git a/gems/lineage/docs/repo-notes/requests.md b/gems/gigasail/docs/repo-notes/requests.md similarity index 100% rename from gems/lineage/docs/repo-notes/requests.md rename to gems/gigasail/docs/repo-notes/requests.md diff --git a/gems/lineage/docs/repo-notes/rtree.md b/gems/gigasail/docs/repo-notes/rtree.md similarity index 100% rename from gems/lineage/docs/repo-notes/rtree.md rename to gems/gigasail/docs/repo-notes/rtree.md diff --git a/gems/lineage/docs/repo-notes/smart-enum.md b/gems/gigasail/docs/repo-notes/smart-enum.md similarity index 100% rename from gems/lineage/docs/repo-notes/smart-enum.md rename to gems/gigasail/docs/repo-notes/smart-enum.md diff --git a/gems/lineage/docs/repo-notes/summary.md b/gems/gigasail/docs/repo-notes/summary.md similarity index 100% rename from gems/lineage/docs/repo-notes/summary.md rename to gems/gigasail/docs/repo-notes/summary.md diff --git a/gems/lineage/docs/repo-notes/tsup.md b/gems/gigasail/docs/repo-notes/tsup.md similarity index 100% rename from gems/lineage/docs/repo-notes/tsup.md rename to gems/gigasail/docs/repo-notes/tsup.md diff --git a/gems/lineage/docs/repo-notes/tsyringe.md b/gems/gigasail/docs/repo-notes/tsyringe.md similarity index 100% rename from gems/lineage/docs/repo-notes/tsyringe.md rename to gems/gigasail/docs/repo-notes/tsyringe.md diff --git a/gems/lineage/docs/repo-notes/wrk.md b/gems/gigasail/docs/repo-notes/wrk.md similarity index 100% rename from gems/lineage/docs/repo-notes/wrk.md rename to gems/gigasail/docs/repo-notes/wrk.md diff --git a/gems/lineage/looker/lineage.lkml b/gems/gigasail/looker/lineage.lkml similarity index 100% rename from gems/lineage/looker/lineage.lkml rename to gems/gigasail/looker/lineage.lkml diff --git a/gems/lineage/sql/README.md b/gems/gigasail/sql/README.md similarity index 90% rename from gems/lineage/sql/README.md rename to gems/gigasail/sql/README.md index 9f84d6aa4..4d7eac1cd 100644 --- a/gems/lineage/sql/README.md +++ b/gems/gigasail/sql/README.md @@ -1,11 +1,11 @@ -# Lineage SQL +# Gigasail SQL Production queries are stored as standalone files and embedded into Rust with `include_str!`. Architecture queries live under `architecture/`; 42 core storage statements live under `storage/`; and 29 dashboard/source read-model queries live under `ui/runtime/`. -Lineage prepares the storage and UI corpus against its real SQLite schema. +Gigasail prepares the storage and UI corpus against its real SQLite schema. SQL-COV parses and analyzes the executable corpus independently, while the focused architecture fixture also executes queries for statement and expression coverage. Schema and PRAGMA scripts remain standalone but are not diff --git a/gems/lineage/sql/architecture/artifact_health.sql b/gems/gigasail/sql/architecture/artifact_health.sql similarity index 100% rename from gems/lineage/sql/architecture/artifact_health.sql rename to gems/gigasail/sql/architecture/artifact_health.sql diff --git a/gems/lineage/sql/architecture/delete_snapshot.sql b/gems/gigasail/sql/architecture/delete_snapshot.sql similarity index 100% rename from gems/lineage/sql/architecture/delete_snapshot.sql rename to gems/gigasail/sql/architecture/delete_snapshot.sql diff --git a/gems/lineage/sql/architecture/insert_artifact.sql b/gems/gigasail/sql/architecture/insert_artifact.sql similarity index 100% rename from gems/lineage/sql/architecture/insert_artifact.sql rename to gems/gigasail/sql/architecture/insert_artifact.sql diff --git a/gems/lineage/sql/architecture/insert_edge.sql b/gems/gigasail/sql/architecture/insert_edge.sql similarity index 100% rename from gems/lineage/sql/architecture/insert_edge.sql rename to gems/gigasail/sql/architecture/insert_edge.sql diff --git a/gems/lineage/sql/architecture/insert_edge_span.sql b/gems/gigasail/sql/architecture/insert_edge_span.sql similarity index 100% rename from gems/lineage/sql/architecture/insert_edge_span.sql rename to gems/gigasail/sql/architecture/insert_edge_span.sql diff --git a/gems/lineage/sql/architecture/insert_node.sql b/gems/gigasail/sql/architecture/insert_node.sql similarity index 100% rename from gems/lineage/sql/architecture/insert_node.sql rename to gems/gigasail/sql/architecture/insert_node.sql diff --git a/gems/lineage/sql/architecture/insert_pressure.sql b/gems/gigasail/sql/architecture/insert_pressure.sql similarity index 100% rename from gems/lineage/sql/architecture/insert_pressure.sql rename to gems/gigasail/sql/architecture/insert_pressure.sql diff --git a/gems/lineage/sql/architecture/latest_artifact.sql b/gems/gigasail/sql/architecture/latest_artifact.sql similarity index 100% rename from gems/lineage/sql/architecture/latest_artifact.sql rename to gems/gigasail/sql/architecture/latest_artifact.sql diff --git a/gems/lineage/sql/architecture/load_edges.sql b/gems/gigasail/sql/architecture/load_edges.sql similarity index 100% rename from gems/lineage/sql/architecture/load_edges.sql rename to gems/gigasail/sql/architecture/load_edges.sql diff --git a/gems/lineage/sql/architecture/load_node.sql b/gems/gigasail/sql/architecture/load_node.sql similarity index 100% rename from gems/lineage/sql/architecture/load_node.sql rename to gems/gigasail/sql/architecture/load_node.sql diff --git a/gems/lineage/sql/architecture/owner_inventory.sql b/gems/gigasail/sql/architecture/owner_inventory.sql similarity index 100% rename from gems/lineage/sql/architecture/owner_inventory.sql rename to gems/gigasail/sql/architecture/owner_inventory.sql diff --git a/gems/lineage/sql/architecture/reconcile_logical_unit.sql b/gems/gigasail/sql/architecture/reconcile_logical_unit.sql similarity index 100% rename from gems/lineage/sql/architecture/reconcile_logical_unit.sql rename to gems/gigasail/sql/architecture/reconcile_logical_unit.sql diff --git a/gems/lineage/sql/architecture/search.sql b/gems/gigasail/sql/architecture/search.sql similarity index 100% rename from gems/lineage/sql/architecture/search.sql rename to gems/gigasail/sql/architecture/search.sql diff --git a/gems/lineage/sql/storage/apply_decayed_risk.sql b/gems/gigasail/sql/storage/apply_decayed_risk.sql similarity index 100% rename from gems/lineage/sql/storage/apply_decayed_risk.sql rename to gems/gigasail/sql/storage/apply_decayed_risk.sql diff --git a/gems/lineage/sql/storage/backfill_mutation_kind.sql b/gems/gigasail/sql/storage/backfill_mutation_kind.sql similarity index 100% rename from gems/lineage/sql/storage/backfill_mutation_kind.sql rename to gems/gigasail/sql/storage/backfill_mutation_kind.sql diff --git a/gems/lineage/sql/storage/configure_connection.sql b/gems/gigasail/sql/storage/configure_connection.sql similarity index 100% rename from gems/lineage/sql/storage/configure_connection.sql rename to gems/gigasail/sql/storage/configure_connection.sql diff --git a/gems/lineage/sql/storage/current_unit_spans.sql b/gems/gigasail/sql/storage/current_unit_spans.sql similarity index 100% rename from gems/lineage/sql/storage/current_unit_spans.sql rename to gems/gigasail/sql/storage/current_unit_spans.sql diff --git a/gems/lineage/sql/storage/current_unit_spans_for_path.sql b/gems/gigasail/sql/storage/current_unit_spans_for_path.sql similarity index 100% rename from gems/lineage/sql/storage/current_unit_spans_for_path.sql rename to gems/gigasail/sql/storage/current_unit_spans_for_path.sql diff --git a/gems/lineage/sql/storage/delete_coverage_for_commit.sql b/gems/gigasail/sql/storage/delete_coverage_for_commit.sql similarity index 100% rename from gems/lineage/sql/storage/delete_coverage_for_commit.sql rename to gems/gigasail/sql/storage/delete_coverage_for_commit.sql diff --git a/gems/lineage/sql/storage/delete_test_exposure_for_commit_test.sql b/gems/gigasail/sql/storage/delete_test_exposure_for_commit_test.sql similarity index 100% rename from gems/lineage/sql/storage/delete_test_exposure_for_commit_test.sql rename to gems/gigasail/sql/storage/delete_test_exposure_for_commit_test.sql diff --git a/gems/lineage/sql/storage/delete_test_exposure_for_commit_test_2.sql b/gems/gigasail/sql/storage/delete_test_exposure_for_commit_test_2.sql similarity index 100% rename from gems/lineage/sql/storage/delete_test_exposure_for_commit_test_2.sql rename to gems/gigasail/sql/storage/delete_test_exposure_for_commit_test_2.sql diff --git a/gems/lineage/sql/storage/ensure_natural_key_indexes.sql b/gems/gigasail/sql/storage/ensure_natural_key_indexes.sql similarity index 100% rename from gems/lineage/sql/storage/ensure_natural_key_indexes.sql rename to gems/gigasail/sql/storage/ensure_natural_key_indexes.sql diff --git a/gems/lineage/sql/storage/existing_quality_event.sql b/gems/gigasail/sql/storage/existing_quality_event.sql similarity index 100% rename from gems/lineage/sql/storage/existing_quality_event.sql rename to gems/gigasail/sql/storage/existing_quality_event.sql diff --git a/gems/lineage/sql/storage/find_definitions.sql b/gems/gigasail/sql/storage/find_definitions.sql similarity index 100% rename from gems/lineage/sql/storage/find_definitions.sql rename to gems/gigasail/sql/storage/find_definitions.sql diff --git a/gems/lineage/sql/storage/init_schema.sql b/gems/gigasail/sql/storage/init_schema.sql similarity index 100% rename from gems/lineage/sql/storage/init_schema.sql rename to gems/gigasail/sql/storage/init_schema.sql diff --git a/gems/lineage/sql/storage/insert_crash_event.sql b/gems/gigasail/sql/storage/insert_crash_event.sql similarity index 100% rename from gems/lineage/sql/storage/insert_crash_event.sql rename to gems/gigasail/sql/storage/insert_crash_event.sql diff --git a/gems/lineage/sql/storage/insert_crash_event_2.sql b/gems/gigasail/sql/storage/insert_crash_event_2.sql similarity index 100% rename from gems/lineage/sql/storage/insert_crash_event_2.sql rename to gems/gigasail/sql/storage/insert_crash_event_2.sql diff --git a/gems/lineage/sql/storage/insert_event.sql b/gems/gigasail/sql/storage/insert_event.sql similarity index 100% rename from gems/lineage/sql/storage/insert_event.sql rename to gems/gigasail/sql/storage/insert_event.sql diff --git a/gems/lineage/sql/storage/insert_hazard_event.sql b/gems/gigasail/sql/storage/insert_hazard_event.sql similarity index 100% rename from gems/lineage/sql/storage/insert_hazard_event.sql rename to gems/gigasail/sql/storage/insert_hazard_event.sql diff --git a/gems/lineage/sql/storage/insert_metadata.sql b/gems/gigasail/sql/storage/insert_metadata.sql similarity index 100% rename from gems/lineage/sql/storage/insert_metadata.sql rename to gems/gigasail/sql/storage/insert_metadata.sql diff --git a/gems/lineage/sql/storage/insert_sarif_artifact.sql b/gems/gigasail/sql/storage/insert_sarif_artifact.sql similarity index 100% rename from gems/lineage/sql/storage/insert_sarif_artifact.sql rename to gems/gigasail/sql/storage/insert_sarif_artifact.sql diff --git a/gems/lineage/sql/storage/insert_sarif_artifact_2.sql b/gems/gigasail/sql/storage/insert_sarif_artifact_2.sql similarity index 100% rename from gems/lineage/sql/storage/insert_sarif_artifact_2.sql rename to gems/gigasail/sql/storage/insert_sarif_artifact_2.sql diff --git a/gems/lineage/sql/storage/insert_sarif_finding.sql b/gems/gigasail/sql/storage/insert_sarif_finding.sql similarity index 100% rename from gems/lineage/sql/storage/insert_sarif_finding.sql rename to gems/gigasail/sql/storage/insert_sarif_finding.sql diff --git a/gems/lineage/sql/storage/insert_test_exposure_event.sql b/gems/gigasail/sql/storage/insert_test_exposure_event.sql similarity index 100% rename from gems/lineage/sql/storage/insert_test_exposure_event.sql rename to gems/gigasail/sql/storage/insert_test_exposure_event.sql diff --git a/gems/lineage/sql/storage/insert_unit_hotness.sql b/gems/gigasail/sql/storage/insert_unit_hotness.sql similarity index 100% rename from gems/lineage/sql/storage/insert_unit_hotness.sql rename to gems/gigasail/sql/storage/insert_unit_hotness.sql diff --git a/gems/lineage/sql/storage/record_coverage_line_with_details.sql b/gems/gigasail/sql/storage/record_coverage_line_with_details.sql similarity index 100% rename from gems/lineage/sql/storage/record_coverage_line_with_details.sql rename to gems/gigasail/sql/storage/record_coverage_line_with_details.sql diff --git a/gems/lineage/sql/storage/record_quality_metric.sql b/gems/gigasail/sql/storage/record_quality_metric.sql similarity index 100% rename from gems/lineage/sql/storage/record_quality_metric.sql rename to gems/gigasail/sql/storage/record_quality_metric.sql diff --git a/gems/lineage/sql/storage/record_quality_metric_2.sql b/gems/gigasail/sql/storage/record_quality_metric_2.sql similarity index 100% rename from gems/lineage/sql/storage/record_quality_metric_2.sql rename to gems/gigasail/sql/storage/record_quality_metric_2.sql diff --git a/gems/lineage/sql/storage/refresh_current_quality_metrics.sql b/gems/gigasail/sql/storage/refresh_current_quality_metrics.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_current_quality_metrics.sql rename to gems/gigasail/sql/storage/refresh_current_quality_metrics.sql diff --git a/gems/lineage/sql/storage/refresh_current_quality_metrics_2.sql b/gems/gigasail/sql/storage/refresh_current_quality_metrics_2.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_current_quality_metrics_2.sql rename to gems/gigasail/sql/storage/refresh_current_quality_metrics_2.sql diff --git a/gems/lineage/sql/storage/refresh_current_sarif_findings_view.sql b/gems/gigasail/sql/storage/refresh_current_sarif_findings_view.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_current_sarif_findings_view.sql rename to gems/gigasail/sql/storage/refresh_current_sarif_findings_view.sql diff --git a/gems/lineage/sql/storage/refresh_test_exposure_summary.sql b/gems/gigasail/sql/storage/refresh_test_exposure_summary.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_test_exposure_summary.sql rename to gems/gigasail/sql/storage/refresh_test_exposure_summary.sql diff --git a/gems/lineage/sql/storage/refresh_test_exposure_summary_2.sql b/gems/gigasail/sql/storage/refresh_test_exposure_summary_2.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_test_exposure_summary_2.sql rename to gems/gigasail/sql/storage/refresh_test_exposure_summary_2.sql diff --git a/gems/lineage/sql/storage/refresh_test_exposure_summary_3.sql b/gems/gigasail/sql/storage/refresh_test_exposure_summary_3.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_test_exposure_summary_3.sql rename to gems/gigasail/sql/storage/refresh_test_exposure_summary_3.sql diff --git a/gems/lineage/sql/storage/refresh_test_exposure_summary_4.sql b/gems/gigasail/sql/storage/refresh_test_exposure_summary_4.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_test_exposure_summary_4.sql rename to gems/gigasail/sql/storage/refresh_test_exposure_summary_4.sql diff --git a/gems/lineage/sql/storage/refresh_test_exposure_summary_5.sql b/gems/gigasail/sql/storage/refresh_test_exposure_summary_5.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_test_exposure_summary_5.sql rename to gems/gigasail/sql/storage/refresh_test_exposure_summary_5.sql diff --git a/gems/lineage/sql/storage/refresh_test_exposure_summary_6.sql b/gems/gigasail/sql/storage/refresh_test_exposure_summary_6.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_test_exposure_summary_6.sql rename to gems/gigasail/sql/storage/refresh_test_exposure_summary_6.sql diff --git a/gems/lineage/sql/storage/refresh_ui_summaries.sql b/gems/gigasail/sql/storage/refresh_ui_summaries.sql similarity index 100% rename from gems/lineage/sql/storage/refresh_ui_summaries.sql rename to gems/gigasail/sql/storage/refresh_ui_summaries.sql diff --git a/gems/lineage/sql/storage/resolve_current_path.sql b/gems/gigasail/sql/storage/resolve_current_path.sql similarity index 100% rename from gems/lineage/sql/storage/resolve_current_path.sql rename to gems/gigasail/sql/storage/resolve_current_path.sql diff --git a/gems/lineage/sql/storage/resolve_current_path_2.sql b/gems/gigasail/sql/storage/resolve_current_path_2.sql similarity index 100% rename from gems/lineage/sql/storage/resolve_current_path_2.sql rename to gems/gigasail/sql/storage/resolve_current_path_2.sql diff --git a/gems/lineage/sql/storage/resolve_unit_id.sql b/gems/gigasail/sql/storage/resolve_unit_id.sql similarity index 100% rename from gems/lineage/sql/storage/resolve_unit_id.sql rename to gems/gigasail/sql/storage/resolve_unit_id.sql diff --git a/gems/lineage/sql/storage/sarif_finding_counts_by_file.sql b/gems/gigasail/sql/storage/sarif_finding_counts_by_file.sql similarity index 100% rename from gems/lineage/sql/storage/sarif_finding_counts_by_file.sql rename to gems/gigasail/sql/storage/sarif_finding_counts_by_file.sql diff --git a/gems/lineage/sql/storage/sarif_findings_for_path.sql b/gems/gigasail/sql/storage/sarif_findings_for_path.sql similarity index 100% rename from gems/lineage/sql/storage/sarif_findings_for_path.sql rename to gems/gigasail/sql/storage/sarif_findings_for_path.sql diff --git a/gems/lineage/sql/storage/sarif_lifecycle_summary.sql b/gems/gigasail/sql/storage/sarif_lifecycle_summary.sql similarity index 100% rename from gems/lineage/sql/storage/sarif_lifecycle_summary.sql rename to gems/gigasail/sql/storage/sarif_lifecycle_summary.sql diff --git a/gems/lineage/sql/storage/unit_ids_for_current_path.sql b/gems/gigasail/sql/storage/unit_ids_for_current_path.sql similarity index 100% rename from gems/lineage/sql/storage/unit_ids_for_current_path.sql rename to gems/gigasail/sql/storage/unit_ids_for_current_path.sql diff --git a/gems/lineage/sql/storage/upsert_logical_unit.sql b/gems/gigasail/sql/storage/upsert_logical_unit.sql similarity index 100% rename from gems/lineage/sql/storage/upsert_logical_unit.sql rename to gems/gigasail/sql/storage/upsert_logical_unit.sql diff --git a/gems/lineage/sql/ui/architecture_owner_by_name.sql b/gems/gigasail/sql/ui/architecture_owner_by_name.sql similarity index 100% rename from gems/lineage/sql/ui/architecture_owner_by_name.sql rename to gems/gigasail/sql/ui/architecture_owner_by_name.sql diff --git a/gems/lineage/sql/ui/architecture_symbols_for_path.sql b/gems/gigasail/sql/ui/architecture_symbols_for_path.sql similarity index 100% rename from gems/lineage/sql/ui/architecture_symbols_for_path.sql rename to gems/gigasail/sql/ui/architecture_symbols_for_path.sql diff --git a/gems/lineage/sql/ui/runtime/analyzer_health.sql b/gems/gigasail/sql/ui/runtime/analyzer_health.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/analyzer_health.sql rename to gems/gigasail/sql/ui/runtime/analyzer_health.sql diff --git a/gems/lineage/sql/ui/runtime/analyzer_health_2.sql b/gems/gigasail/sql/ui/runtime/analyzer_health_2.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/analyzer_health_2.sql rename to gems/gigasail/sql/ui/runtime/analyzer_health_2.sql diff --git a/gems/lineage/sql/ui/runtime/analyzer_health_3.sql b/gems/gigasail/sql/ui/runtime/analyzer_health_3.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/analyzer_health_3.sql rename to gems/gigasail/sql/ui/runtime/analyzer_health_3.sql diff --git a/gems/lineage/sql/ui/runtime/apply_crash_history.sql b/gems/gigasail/sql/ui/runtime/apply_crash_history.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/apply_crash_history.sql rename to gems/gigasail/sql/ui/runtime/apply_crash_history.sql diff --git a/gems/lineage/sql/ui/runtime/apply_hazards.sql b/gems/gigasail/sql/ui/runtime/apply_hazards.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/apply_hazards.sql rename to gems/gigasail/sql/ui/runtime/apply_hazards.sql diff --git a/gems/lineage/sql/ui/runtime/apply_hotness.sql b/gems/gigasail/sql/ui/runtime/apply_hotness.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/apply_hotness.sql rename to gems/gigasail/sql/ui/runtime/apply_hotness.sql diff --git a/gems/lineage/sql/ui/runtime/apply_line_coverage.sql b/gems/gigasail/sql/ui/runtime/apply_line_coverage.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/apply_line_coverage.sql rename to gems/gigasail/sql/ui/runtime/apply_line_coverage.sql diff --git a/gems/lineage/sql/ui/runtime/apply_semantic_churn.sql b/gems/gigasail/sql/ui/runtime/apply_semantic_churn.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/apply_semantic_churn.sql rename to gems/gigasail/sql/ui/runtime/apply_semantic_churn.sql diff --git a/gems/lineage/sql/ui/runtime/apply_test_exposure.sql b/gems/gigasail/sql/ui/runtime/apply_test_exposure.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/apply_test_exposure.sql rename to gems/gigasail/sql/ui/runtime/apply_test_exposure.sql diff --git a/gems/lineage/sql/ui/runtime/apply_unit_quality.sql b/gems/gigasail/sql/ui/runtime/apply_unit_quality.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/apply_unit_quality.sql rename to gems/gigasail/sql/ui/runtime/apply_unit_quality.sql diff --git a/gems/lineage/sql/ui/runtime/dashboard_coverage_line_counts.sql b/gems/gigasail/sql/ui/runtime/dashboard_coverage_line_counts.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/dashboard_coverage_line_counts.sql rename to gems/gigasail/sql/ui/runtime/dashboard_coverage_line_counts.sql diff --git a/gems/lineage/sql/ui/runtime/dashboard_hazard_counts.sql b/gems/gigasail/sql/ui/runtime/dashboard_hazard_counts.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/dashboard_hazard_counts.sql rename to gems/gigasail/sql/ui/runtime/dashboard_hazard_counts.sql diff --git a/gems/lineage/sql/ui/runtime/dashboard_line_counts.sql b/gems/gigasail/sql/ui/runtime/dashboard_line_counts.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/dashboard_line_counts.sql rename to gems/gigasail/sql/ui/runtime/dashboard_line_counts.sql diff --git a/gems/lineage/sql/ui/runtime/decay_bounds.sql b/gems/gigasail/sql/ui/runtime/decay_bounds.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/decay_bounds.sql rename to gems/gigasail/sql/ui/runtime/decay_bounds.sql diff --git a/gems/lineage/sql/ui/runtime/file_index_with_scope.sql b/gems/gigasail/sql/ui/runtime/file_index_with_scope.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/file_index_with_scope.sql rename to gems/gigasail/sql/ui/runtime/file_index_with_scope.sql diff --git a/gems/lineage/sql/ui/runtime/file_versions.sql b/gems/gigasail/sql/ui/runtime/file_versions.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/file_versions.sql rename to gems/gigasail/sql/ui/runtime/file_versions.sql diff --git a/gems/lineage/sql/ui/runtime/fix_decay_bounds.sql b/gems/gigasail/sql/ui/runtime/fix_decay_bounds.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/fix_decay_bounds.sql rename to gems/gigasail/sql/ui/runtime/fix_decay_bounds.sql diff --git a/gems/lineage/sql/ui/runtime/has_multicommit_quality_history.sql b/gems/gigasail/sql/ui/runtime/has_multicommit_quality_history.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/has_multicommit_quality_history.sql rename to gems/gigasail/sql/ui/runtime/has_multicommit_quality_history.sql diff --git a/gems/lineage/sql/ui/runtime/line_coverage_by_file.sql b/gems/gigasail/sql/ui/runtime/line_coverage_by_file.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/line_coverage_by_file.sql rename to gems/gigasail/sql/ui/runtime/line_coverage_by_file.sql diff --git a/gems/lineage/sql/ui/runtime/persisted_source_symbols.sql b/gems/gigasail/sql/ui/runtime/persisted_source_symbols.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/persisted_source_symbols.sql rename to gems/gigasail/sql/ui/runtime/persisted_source_symbols.sql diff --git a/gems/lineage/sql/ui/runtime/read_model_file_index_with_scope.sql b/gems/gigasail/sql/ui/runtime/read_model_file_index_with_scope.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/read_model_file_index_with_scope.sql rename to gems/gigasail/sql/ui/runtime/read_model_file_index_with_scope.sql diff --git a/gems/lineage/sql/ui/runtime/review_next_items.sql b/gems/gigasail/sql/ui/runtime/review_next_items.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/review_next_items.sql rename to gems/gigasail/sql/ui/runtime/review_next_items.sql diff --git a/gems/lineage/sql/ui/runtime/sarif_dark_arm_counts_by_file.sql b/gems/gigasail/sql/ui/runtime/sarif_dark_arm_counts_by_file.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/sarif_dark_arm_counts_by_file.sql rename to gems/gigasail/sql/ui/runtime/sarif_dark_arm_counts_by_file.sql diff --git a/gems/lineage/sql/ui/runtime/top_architecture_risks.sql b/gems/gigasail/sql/ui/runtime/top_architecture_risks.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/top_architecture_risks.sql rename to gems/gigasail/sql/ui/runtime/top_architecture_risks.sql diff --git a/gems/lineage/sql/ui/runtime/top_complexity_functions.sql b/gems/gigasail/sql/ui/runtime/top_complexity_functions.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/top_complexity_functions.sql rename to gems/gigasail/sql/ui/runtime/top_complexity_functions.sql diff --git a/gems/lineage/sql/ui/runtime/top_hotness.sql b/gems/gigasail/sql/ui/runtime/top_hotness.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/top_hotness.sql rename to gems/gigasail/sql/ui/runtime/top_hotness.sql diff --git a/gems/lineage/sql/ui/runtime/unit_signal_counts.sql b/gems/gigasail/sql/ui/runtime/unit_signal_counts.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/unit_signal_counts.sql rename to gems/gigasail/sql/ui/runtime/unit_signal_counts.sql diff --git a/gems/lineage/sql/ui/runtime/unit_signal_counts_2.sql b/gems/gigasail/sql/ui/runtime/unit_signal_counts_2.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/unit_signal_counts_2.sql rename to gems/gigasail/sql/ui/runtime/unit_signal_counts_2.sql diff --git a/gems/lineage/sql/ui/runtime/unit_test_profiles.sql b/gems/gigasail/sql/ui/runtime/unit_test_profiles.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/unit_test_profiles.sql rename to gems/gigasail/sql/ui/runtime/unit_test_profiles.sql diff --git a/gems/lineage/sql/ui/runtime/warning_units.sql b/gems/gigasail/sql/ui/runtime/warning_units.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/warning_units.sql rename to gems/gigasail/sql/ui/runtime/warning_units.sql diff --git a/gems/lineage/sql/ui/runtime/warning_units_2.sql b/gems/gigasail/sql/ui/runtime/warning_units_2.sql similarity index 100% rename from gems/lineage/sql/ui/runtime/warning_units_2.sql rename to gems/gigasail/sql/ui/runtime/warning_units_2.sql diff --git a/gems/lineage/src/application/analyse.rs b/gems/gigasail/src/application/analyse.rs similarity index 96% rename from gems/lineage/src/application/analyse.rs rename to gems/gigasail/src/application/analyse.rs index 40acb5e39..59e2349cd 100644 --- a/gems/lineage/src/application/analyse.rs +++ b/gems/gigasail/src/application/analyse.rs @@ -125,7 +125,7 @@ pub fn build_analysis_overlay( /// Returns only embedded, allowlisted analysis unless the caller explicitly /// authorizes execution of checkout configuration. This distinction matters: -/// a repository's `lineage.yml` is arbitrary code when it contains command +/// a repository's `gigasail.yml` is arbitrary code when it contains command /// producers, while the built-in provider is linked into this binary. pub fn analysis_config( repo: &Path, @@ -140,12 +140,12 @@ pub fn analysis_config( return builtin_analysis_config(); } anyhow::bail!( - "analysis profile {profile:?} is not built in and no lineage.yml was found" + "analysis profile {profile:?} is not built in and no gigasail.yml was found" ); } let config = load_config(repo)?; if !config.profiles.contains_key(profile) { - anyhow::bail!("unknown Lineage analysis profile {profile:?}"); + anyhow::bail!("unknown Gigasail analysis profile {profile:?}"); } return Ok(config); } @@ -165,7 +165,7 @@ fn builtin_analysis_config() -> Result { let producers = BTreeMap::from([( "fact-mine".to_string(), EvidenceProducer { - executor: ProducerExecutor::Lineage, + executor: ProducerExecutor::Gigasail, argv: vec!["fact-mine-native".to_string()], working_directory: None, timeout_seconds: 60, @@ -174,7 +174,7 @@ fn builtin_analysis_config() -> Result { produces: vec![crate::pipeline::ProducedArtifact { kind: ArtifactKind::Sarif, format: "sarif".to_string(), - path: PathBuf::from(".lineage/artifacts/fact-mine.sarif"), + path: PathBuf::from(".gigasail/artifacts/fact-mine.sarif"), scope: Some("static".to_string()), complete: false, evidence_scope: None, diff --git a/gems/lineage/src/application/ci.rs b/gems/gigasail/src/application/ci.rs similarity index 92% rename from gems/lineage/src/application/ci.rs rename to gems/gigasail/src/application/ci.rs index e6ce18639..f9525ee3b 100644 --- a/gems/lineage/src/application/ci.rs +++ b/gems/gigasail/src/application/ci.rs @@ -95,23 +95,23 @@ pub fn load_ci_config( let revision = match requested_revision { Some(revision) => git.resolve_commit(revision)?, None => git.resolve_commit("HEAD^").with_context(|| { - "lineage ci requires --config-revision or --trust-current-config when HEAD has no reviewed parent" + "gigasail ci requires --config-revision or --trust-current-config when HEAD has no reviewed parent" })?, }; let yaml = git.file_contents_at_commit(&revision, crate::pipeline::CONFIG_FILE_NAME)?; let json = git.file_contents_at_commit(&revision, crate::pipeline::CONFIG_JSON_FILE_NAME)?; match (yaml, json) { (Some(_), Some(_)) => anyhow::bail!( - "trusted configuration revision {revision} contains both lineage.yml and lineage.json" + "trusted configuration revision {revision} contains both gigasail.yml and gigasail.json" ), (Some(contents), None) => load_config_contents(&contents, Some("yml")).with_context(|| { - format!("parse trusted lineage.yml from configuration revision {revision}") + format!("parse trusted gigasail.yml from configuration revision {revision}") }), (None, Some(contents)) => load_config_contents(&contents, Some("json")).with_context(|| { - format!("parse trusted lineage.json from configuration revision {revision}") + format!("parse trusted gigasail.json from configuration revision {revision}") }), (None, None) => anyhow::bail!( - "trusted configuration revision {revision} contains no lineage.yml; use --trust-current-config only after review" + "trusted configuration revision {revision} contains no gigasail.yml; use --trust-current-config only after review" ), } } @@ -142,7 +142,7 @@ impl PublicationState { "ingested" => Ok(Self::Ingested), "ready_to_publish" => Ok(Self::ReadyToPublish), "published" => Ok(Self::Published), - other => anyhow::bail!("invalid Lineage publication state {other:?}"), + other => anyhow::bail!("invalid Gigasail publication state {other:?}"), } } } @@ -176,7 +176,7 @@ pub fn write_publication_state(run_directory: &Path, state: PublicationState) -> } result.with_context(|| { format!( - "write Lineage publication state in {}", + "write Gigasail publication state in {}", run_directory.display() ) }) @@ -215,7 +215,7 @@ pub fn record_run_state(db: &Path, manifest_path: &Path, state: &str) -> Result< pub fn publication_state(run_directory: &Path) -> Result { let path = run_directory.join(PUBLICATION_STATE_FILE); let contents = fs::read_to_string(&path) - .with_context(|| format!("read Lineage publication state {}", path.display()))?; + .with_context(|| format!("read Gigasail publication state {}", path.display()))?; PublicationState::parse(&contents) } @@ -262,17 +262,17 @@ pub fn reconcile_pending_publications( let name = run .file_name() .and_then(|name| name.to_str()) - .context("pending Lineage run has no name")?; + .context("pending Gigasail run has no name")?; let failed = runs.join(format!("failed-{}", name.trim_start_matches("pending-"))); fs::rename(&run, &failed).with_context(|| { - format!("quarantine incomplete Lineage run {}", run.display()) + format!("quarantine incomplete Gigasail run {}", run.display()) })?; continue; } Err(error) => { return Err(error).with_context(|| { format!( - "recoverable Lineage run {} has no publication state", + "recoverable Gigasail run {} has no publication state", run.display() ) }) @@ -281,7 +281,7 @@ pub fn reconcile_pending_publications( match state { PublicationState::Ingesting => { if is_published { - anyhow::bail!("published Lineage run {} is still ingesting", run.display()); + anyhow::bail!("published Gigasail run {} is still ingesting", run.display()); } crate::application::ingest::ingest_run_manifest( db, @@ -305,7 +305,7 @@ pub fn reconcile_pending_publications( } PublicationState::Ingested => { if is_published { - anyhow::bail!("published Lineage run {} is only ingested", run.display()); + anyhow::bail!("published Gigasail run {} is only ingested", run.display()); } Storage::open(db)?.refresh_ui_summaries()?; write_publication_state(&run, PublicationState::ReadyToPublish)?; @@ -337,7 +337,7 @@ pub fn reconcile_pending_publications( PublicationState::Published => { if !is_published { anyhow::bail!( - "pending Lineage run {} is incorrectly marked published", + "pending Gigasail run {} is incorrectly marked published", run.display() ); } @@ -358,7 +358,7 @@ pub fn ensure_profile_declares_complete_artifacts( let profile = config .profiles .get(profile_name) - .with_context(|| format!("unknown Lineage profile {profile_name:?}"))?; + .with_context(|| format!("unknown Gigasail profile {profile_name:?}"))?; let declared = profile .producers .iter() diff --git a/gems/lineage/src/application/diff.rs b/gems/gigasail/src/application/diff.rs similarity index 98% rename from gems/lineage/src/application/diff.rs rename to gems/gigasail/src/application/diff.rs index b0bd299ee..d60151e4f 100644 --- a/gems/lineage/src/application/diff.rs +++ b/gems/gigasail/src/application/diff.rs @@ -106,7 +106,7 @@ fn configured_evidence_report( let config_path = repo.join(crate::pipeline::CONFIG_FILE_NAME); let json_path = repo.join(crate::pipeline::CONFIG_JSON_FILE_NAME); if !config_path.exists() && !json_path.exists() { - return Ok("Configured evidence: unconfigured (no lineage.yml)\n".into()); + return Ok("Configured evidence: unconfigured (no gigasail.yml)\n".into()); } let config = load_config(repo)?; let profile_name = request @@ -119,7 +119,7 @@ fn configured_evidence_report( let profile = config .profiles .get(profile_name) - .context("selected Lineage profile is missing")?; + .context("selected Gigasail profile is missing")?; let manifest_path = latest_run_directory(repo, &config).join("manifest.json"); let manifest = manifest_path .exists() @@ -183,7 +183,7 @@ fn ensure_required_profile( } let manifest_path = latest_run_directory(repo, &config).join("manifest.json"); let manifest = load_run_manifest(&manifest_path).with_context(|| { - format!("--require-profile {profile_name:?} needs a successful latest Lineage run") + format!("--require-profile {profile_name:?} needs a successful latest Gigasail run") })?; validate_run_artifacts( manifest_path @@ -260,7 +260,7 @@ pub fn resolve_diff_run_scope( .context("latest run has no directory")?, &manifest, ) - .context("latest Lineage run contains a modified or corrupt artifact")?; + .context("latest Gigasail run contains a modified or corrupt artifact")?; let head = provider.resolve_commit(request.head.as_deref().unwrap_or("HEAD"))?; if manifest.status != RunStatus::Succeeded || manifest.revision != head diff --git a/gems/lineage/src/application/ingest.rs b/gems/gigasail/src/application/ingest.rs similarity index 99% rename from gems/lineage/src/application/ingest.rs rename to gems/gigasail/src/application/ingest.rs index cdb907903..c4621f4e8 100644 --- a/gems/lineage/src/application/ingest.rs +++ b/gems/gigasail/src/application/ingest.rs @@ -70,7 +70,7 @@ fn ingest_validated_run_manifest( let extractor = HeuristicExtractor::default(); let normalizer = RepoPathNormalizer::new(repo); let sarif_directory = std::env::temp_dir().join(format!( - "lineage-sarif-{}-{}", + "gigasail-sarif-{}-{}", std::process::id(), std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) diff --git a/gems/lineage/src/application/mod.rs b/gems/gigasail/src/application/mod.rs similarity index 74% rename from gems/lineage/src/application/mod.rs rename to gems/gigasail/src/application/mod.rs index c8df058f7..81309b452 100644 --- a/gems/lineage/src/application/mod.rs +++ b/gems/gigasail/src/application/mod.rs @@ -1,4 +1,4 @@ -//! Application services used by Lineage's CLI, UI, and future API clients. +//! Application services used by Gigasail's CLI, UI, and future API clients. //! //! These modules own policy and state transitions. Command-line code should //! only translate flags to requests and render the returned results. diff --git a/gems/lineage/src/application/revision.rs b/gems/gigasail/src/application/revision.rs similarity index 87% rename from gems/lineage/src/application/revision.rs rename to gems/gigasail/src/application/revision.rs index dd933e726..8222dbe23 100644 --- a/gems/lineage/src/application/revision.rs +++ b/gems/gigasail/src/application/revision.rs @@ -17,7 +17,7 @@ pub fn repository_path(repo: &Path, path: &Path) -> PathBuf { /// Command producers may consume sibling projects, lockfiles, or workspace /// tooling outside a selected monorepo subdirectory. Until they execute in an /// isolated worktree, their provenance is sound only when the entire Git -/// worktree is clean. Embedded Lineage providers can retain narrower checks. +/// worktree is clean. Embedded Gigasail providers can retain narrower checks. pub fn ensure_profile_clean_worktree( repo: &Path, config: &crate::LineageConfig, @@ -27,7 +27,7 @@ pub fn ensure_profile_clean_worktree( let profile = config .profiles .get(profile_name) - .with_context(|| format!("unknown Lineage profile {profile_name:?}"))?; + .with_context(|| format!("unknown Gigasail profile {profile_name:?}"))?; let requires_full_worktree = profile.producers.iter().any(|name| { config .producers @@ -62,24 +62,24 @@ fn ensure_clean_worktree_with_scope( .args(["rev-parse", "--show-toplevel"]) .current_dir(repo) .output() - .context("resolve Git repository root for lineage ci")?; + .context("resolve Git repository root for gigasail ci")?; if !repository_root.status.success() { - anyhow::bail!("could not resolve Git repository root for lineage ci"); + anyhow::bail!("could not resolve Git repository root for gigasail ci"); } let repository_root = PathBuf::from(String::from_utf8(repository_root.stdout)?.trim()); let repository_prefix = repo .canonicalize() - .context("canonicalize Lineage repository path")? + .context("canonicalize Gigasail repository path")? .strip_prefix(&repository_root) - .context("Lineage repository is outside its Git worktree")? + .context("Gigasail repository is outside its Git worktree")? .to_path_buf(); let output = Command::new("git") .args(["status", "--porcelain=v1", "-z", "--untracked-files=all"]) .current_dir(repo) .output() - .context("inspect Git worktree before lineage ci")?; + .context("inspect Git worktree before gigasail ci")?; if !output.status.success() { - anyhow::bail!("could not inspect Git worktree before lineage ci"); + anyhow::bail!("could not inspect Git worktree before gigasail ci"); } let artifact_prefix = repository_prefix .join(artifact_directory) @@ -111,7 +111,7 @@ fn ensure_clean_worktree_with_scope( .is_some_and(|sidecars| sidecars.iter().any(|sidecar| sidecar == path)) }); if let Some(path) = dirty { - anyhow::bail!("lineage ci requires a clean worktree (found {path})"); + anyhow::bail!("gigasail ci requires a clean worktree (found {path})"); } Ok(()) } @@ -142,12 +142,12 @@ pub fn porcelain_v1_dirty_paths(output: &[u8]) -> Result> { Ok(paths) } -/// Ensures the selected immutable revision and its lineage predecessors have +/// Ensures the selected immutable revision and its gigasail predecessors have /// been indexed before evidence is associated with that revision. pub fn ensure_revision_snapshot(db: &Path, repo: &Path, revision: &str) -> Result<()> { if let Some(parent) = db.parent().filter(|path| !path.as_os_str().is_empty()) { fs::create_dir_all(parent) - .with_context(|| format!("create Lineage database directory {}", parent.display()))?; + .with_context(|| format!("create Gigasail database directory {}", parent.display()))?; } if Storage::open(db)?.commit_exists(revision)? { return Ok(()); diff --git a/gems/lineage/src/bin/generate_diff_api.rs b/gems/gigasail/src/bin/generate_diff_api.rs similarity index 98% rename from gems/lineage/src/bin/generate_diff_api.rs rename to gems/gigasail/src/bin/generate_diff_api.rs index 6decf11c0..f1790b8ea 100644 --- a/gems/lineage/src/bin/generate_diff_api.rs +++ b/gems/gigasail/src/bin/generate_diff_api.rs @@ -1,4 +1,4 @@ -use lineage::diff::{ +use gigasail::diff::{ AddedLines, ChangeInventory, ConfigFile, DependencyChange, DependencyEntry, DependencyStatus, DiffFile, DiffGroup, DiffPlan, DiffScope, EvidenceAvailability, EvidenceScopeFingerprint, EvidenceState, FileChangeKind, LanguageSummary, LineAnnotation, LineVerification, diff --git a/gems/lineage/src/db/architecture.rs b/gems/gigasail/src/db/architecture.rs similarity index 99% rename from gems/lineage/src/db/architecture.rs rename to gems/gigasail/src/db/architecture.rs index ce2d8eecb..1cdb86cc0 100644 --- a/gems/lineage/src/db/architecture.rs +++ b/gems/gigasail/src/db/architecture.rs @@ -523,7 +523,7 @@ fn load_nodes_for_owner(storage: &Storage, artifact_id: i64, owner_id: &str) -> value["pressure"] = json!({"score": row.get::<_, Option>(14)?.unwrap_or(0.0), "band": row.get::<_, Option>(15)?.unwrap_or_else(|| "ordinary".into()), "explanation": parse_json(row.get::<_, Option>(16)?.unwrap_or_else(|| "{}".into()))}); value["incoming"] = json!(row.get::<_, i64>(17)?); value["outgoing"] = json!(row.get::<_, i64>(18)?); - value["lineage"] = json!({"hazards": row.get::<_, i64>(19)?, "changes": row.get::<_, i64>(20)?, + value["gigasail"] = json!({"hazards": row.get::<_, i64>(19)?, "changes": row.get::<_, i64>(20)?, "fixes": row.get::<_, i64>(21)?, "distinct_tests": row.get::<_, i64>(22)?, "line_coverage": row.get::<_, f64>(23)?, "mutant_coverage": row.get::<_, f64>(24)?}); Ok(value) diff --git a/gems/lineage/src/db/engine.rs b/gems/gigasail/src/db/engine.rs similarity index 99% rename from gems/lineage/src/db/engine.rs rename to gems/gigasail/src/db/engine.rs index df5cb2900..dbd1a85b1 100644 --- a/gems/lineage/src/db/engine.rs +++ b/gems/gigasail/src/db/engine.rs @@ -59,7 +59,7 @@ where /// Indexes the first-parent history through one immutable revision. This /// deliberately includes the revision's predecessors: logical-unit IDs - /// and rename lineage depend on their historical state. + /// and rename gigasail depend on their historical state. pub fn run_through_revision(&mut self, revision: &str) -> Result { self.storage.begin_transaction()?; match self.run_inner(None, Some(revision)) { @@ -629,7 +629,7 @@ mod tests { } let dir = tempfile::tempdir().unwrap(); - let db = dir.path().join("lineage.db"); + let db = dir.path().join("gigasail.db"); let provider = MemoryProvider { commits, files }; let storage = Storage::open(&db).unwrap(); let mut engine = LineageEngine::new( @@ -1105,7 +1105,7 @@ mod tests { ); let dir = tempfile::tempdir().unwrap(); - let db_path = dir.path().join("lineage.db"); + let db_path = dir.path().join("gigasail.db"); // Run 1: process c1 { diff --git a/gems/lineage/src/db/extract.rs b/gems/gigasail/src/db/extract.rs similarity index 99% rename from gems/lineage/src/db/extract.rs rename to gems/gigasail/src/db/extract.rs index 42ea8573a..b8eeb3feb 100644 --- a/gems/lineage/src/db/extract.rs +++ b/gems/gigasail/src/db/extract.rs @@ -10,7 +10,7 @@ pub const DEFAULT_CODE_EXTENSIONS: &[&str] = &[ ]; const DEFAULT_IGNORED_COMPONENTS: &[&str] = &[ ".git", - ".lineage", + ".gigasail", ".zig-cache", ".clear-cache", ".clear-transpile-cache", @@ -946,7 +946,7 @@ mod tests { #[test] fn extracts_standalone_sql_query_as_a_logical_unit() { let file = BlobFile { - path: "gems/lineage/sql/demo.sql".into(), + path: "gems/gigasail/sql/demo.sql".into(), contents: "-- query-id: demo.lookup.v1\nSELECT value FROM demo WHERE value <> 0;\n" .into(), }; @@ -1032,7 +1032,7 @@ export const safeParse: (value: unknown) => Result = (value) => { #[test] fn extracts_rust_symbols_with_tree_sitter() { let file = BlobFile { - path: "gems/lineage/src/demo.rs".into(), + path: "gems/gigasail/src/demo.rs".into(), contents: r#" pub mod storage { pub struct Store { @@ -1227,10 +1227,10 @@ export class Worker { assert!(filter.supports_path("src/Main.java")); assert!(filter.supports_path("Sources/App.swift")); assert!(filter.supports_path("src/main.kt")); - assert!(filter.supports_path("gems/lineage/src/ui.rs")); + assert!(filter.supports_path("gems/gigasail/src/ui.rs")); assert!(filter.supports_path("script/tool.lua")); assert!(!filter.supports_path("benchmarks/x/bench.profile/transpiled.zig")); - assert!(!filter.supports_path("gems/lineage/target/debug/build.rs")); + assert!(!filter.supports_path("gems/gigasail/target/debug/build.rs")); assert!(!filter.supports_path("gems/nil-kill/vendor/example.rb")); assert!(!filter.supports_path("README.md")); assert!(!filter.supports_path("gems/x/x.gemspec")); @@ -1262,7 +1262,7 @@ export class Worker { assert!(is_production_source_path( "gems/decomplex/lib/decomplex/report.rb" )); - assert!(is_production_source_path("gems/lineage/src/ui.rs")); + assert!(is_production_source_path("gems/gigasail/src/ui.rs")); assert!(is_production_source_path("zig/lib/atomic.zig")); } diff --git a/gems/lineage/src/db/git.rs b/gems/gigasail/src/db/git.rs similarity index 99% rename from gems/lineage/src/db/git.rs rename to gems/gigasail/src/db/git.rs index fda86d547..29e03924b 100644 --- a/gems/lineage/src/db/git.rs +++ b/gems/gigasail/src/db/git.rs @@ -134,7 +134,7 @@ impl GitProvider { base, head, renames, - self.file_contents_in_worktree(".lineage/diff.toml")?, + self.file_contents_in_worktree(".gigasail/diff.toml")?, ) } else { let head_oid = self.resolve_commit(head_revision)?; @@ -147,7 +147,7 @@ impl GitProvider { base, head, renames, - self.file_contents_at_commit(&head_oid, ".lineage/diff.toml")?, + self.file_contents_at_commit(&head_oid, ".gigasail/diff.toml")?, ) }; let overrides = classification_overrides(override_contents.as_deref()); @@ -1079,7 +1079,7 @@ mod tests { &[ ("spec/value_spec.rb", "describe :value do\n value\nend\n"), ( - ".lineage/diff.toml", + ".gigasail/diff.toml", "[[overrides]]\nprefix = \"spec/\"\nrole = \"production\"\n", ), ], @@ -1112,7 +1112,7 @@ mod tests { "describe :value do\n value\nend\n", ), ( - "crate/.lineage/diff.toml", + "crate/.gigasail/diff.toml", "[[overrides]]\nprefix = \"spec/\"\nrole = \"production\"\n", ), ], @@ -1128,7 +1128,7 @@ mod tests { } #[test] - fn test_lineage_engine_with_git_provider() -> Result<()> { + fn test_gigasail_engine_with_git_provider() -> Result<()> { let dir = tempdir()?; let repo = Repository::init(dir.path())?; diff --git a/gems/lineage/src/db/hazard.rs b/gems/gigasail/src/db/hazard.rs similarity index 98% rename from gems/lineage/src/db/hazard.rs rename to gems/gigasail/src/db/hazard.rs index f72641d89..40359e7ff 100644 --- a/gems/lineage/src/db/hazard.rs +++ b/gems/gigasail/src/db/hazard.rs @@ -399,7 +399,7 @@ fn excluded_zig_file(path: &str) -> bool { ) } -// Both scanners consume the same contract resolver. The old Lineage copy +// Both scanners consume the same contract resolver. The old Gigasail copy // classified hazard names independently and could turn `unsafe_block` into a // race because it contains the substring "lock". const GO_HAZARDS: &str = hazard_contract::GO_HAZARDS; @@ -753,7 +753,7 @@ pub(crate) fn scan_cpp_sites(path: &str, contents: &str) -> Vec { ) } -// C# reflection flow is owned by FactMine. Lineage keeps the same narrow site +// C# reflection flow is owned by FactMine. Gigasail keeps the same narrow site // shape for storage/UI consumers, but does not replay a second type/alias // analysis here. pub(crate) fn scan_csharp_sites(path: &str, contents: &str) -> Vec { @@ -932,7 +932,7 @@ mod tests { } #[test] - fn lineage_csharp_reflection_scan_uses_canonical_factmine_facts() { + fn gigasail_csharp_reflection_scan_uses_canonical_factmine_facts() { let source = r#" class Demo { void Run() { @@ -943,8 +943,8 @@ mod tests { } } "#; - let lineage_sites = scan_csharp_sites("Demo.cs", source); - let reflection: Vec<_> = lineage_sites + let gigasail_sites = scan_csharp_sites("Demo.cs", source); + let reflection: Vec<_> = gigasail_sites .iter() .filter(|site| site.hazard_type == "csharp_metaprogramming") .collect(); @@ -1418,17 +1418,17 @@ mod tests { .join("src/db/hazards") .join(name), ) - .unwrap_or_else(|_| panic!("lineage generated query {name} is missing")); + .unwrap_or_else(|_| panic!("gigasail generated query {name} is missing")); assert_eq!( vendored_text, generated_copy, - "lineage generated {name} drifted from hazard-contract" + "gigasail generated {name} drifted from hazard-contract" ); let original = fs::read_to_string(originals_dir.join(name)) .unwrap_or_else(|_| panic!("fact-mine original {name} is missing")); assert_eq!( vendored_text, original, "{name} has drifted from fact-mine's original - re-copy it from \ - gems/fact-mine/src/syntax/{name} into gems/lineage/src/db/hazards/{name}" + gems/fact-mine/src/syntax/{name} into gems/gigasail/src/db/hazards/{name}" ); } } diff --git a/gems/lineage/src/db/hazards/c_hazards.scm b/gems/gigasail/src/db/hazards/c_hazards.scm similarity index 100% rename from gems/lineage/src/db/hazards/c_hazards.scm rename to gems/gigasail/src/db/hazards/c_hazards.scm diff --git a/gems/lineage/src/db/hazards/cpp_hazards.scm b/gems/gigasail/src/db/hazards/cpp_hazards.scm similarity index 100% rename from gems/lineage/src/db/hazards/cpp_hazards.scm rename to gems/gigasail/src/db/hazards/cpp_hazards.scm diff --git a/gems/lineage/src/db/hazards/csharp_hazards.scm b/gems/gigasail/src/db/hazards/csharp_hazards.scm similarity index 100% rename from gems/lineage/src/db/hazards/csharp_hazards.scm rename to gems/gigasail/src/db/hazards/csharp_hazards.scm diff --git a/gems/lineage/src/db/hazards/go_hazards.scm b/gems/gigasail/src/db/hazards/go_hazards.scm similarity index 100% rename from gems/lineage/src/db/hazards/go_hazards.scm rename to gems/gigasail/src/db/hazards/go_hazards.scm diff --git a/gems/lineage/src/db/hazards/rust_hazards.scm b/gems/gigasail/src/db/hazards/rust_hazards.scm similarity index 100% rename from gems/lineage/src/db/hazards/rust_hazards.scm rename to gems/gigasail/src/db/hazards/rust_hazards.scm diff --git a/gems/lineage/src/db/hazards/zig_hazards.scm b/gems/gigasail/src/db/hazards/zig_hazards.scm similarity index 100% rename from gems/lineage/src/db/hazards/zig_hazards.scm rename to gems/gigasail/src/db/hazards/zig_hazards.scm diff --git a/gems/lineage/src/db/hotness.rs b/gems/gigasail/src/db/hotness.rs similarity index 99% rename from gems/lineage/src/db/hotness.rs rename to gems/gigasail/src/db/hotness.rs index bbdf80b87..b0dcaea08 100644 --- a/gems/lineage/src/db/hotness.rs +++ b/gems/gigasail/src/db/hotness.rs @@ -325,7 +325,7 @@ mod tests { use tempfile::tempdir; fn open_storage(dir: &std::path::Path) -> Storage { - Storage::open(&dir.join("lineage.db")).unwrap() + Storage::open(&dir.join("gigasail.db")).unwrap() } fn payload(entries: &str) -> String { diff --git a/gems/lineage/src/db/model.rs b/gems/gigasail/src/db/model.rs similarity index 100% rename from gems/lineage/src/db/model.rs rename to gems/gigasail/src/db/model.rs diff --git a/gems/lineage/src/db/mutant.rs b/gems/gigasail/src/db/mutant.rs similarity index 99% rename from gems/lineage/src/db/mutant.rs rename to gems/gigasail/src/db/mutant.rs index e657fcf14..370c891fb 100644 --- a/gems/lineage/src/db/mutant.rs +++ b/gems/gigasail/src/db/mutant.rs @@ -97,7 +97,7 @@ where E: BoundaryExtractor, { if !storage.commit_exists(commit_hash)? { - anyhow::bail!("commit {commit_hash} is not present in lineage metadata"); + anyhow::bail!("commit {commit_hash} is not present in gigasail metadata"); } if let Some(scope) = &options.evidence_scope { if scope.revision != commit_hash { @@ -694,7 +694,7 @@ mod tests { fn parses_mutant_facts() { let payload = json!({ "schema": "mutant-facts/v1", - "source": "gems/lineage/tools/mutant-converters/ruby_mutant.rb", + "source": "gems/gigasail/tools/mutant-converters/ruby_mutant.rb", "language": "ruby", "mutation_kind": "ruby-mutant", "subjects": [{ @@ -714,7 +714,7 @@ mod tests { assert_eq!(facts[0].method, "Worker#run"); assert_eq!( facts[0].source, - "gems/lineage/tools/mutant-converters/ruby_mutant.rb" + "gems/gigasail/tools/mutant-converters/ruby_mutant.rb" ); assert_eq!(facts[0].language, "ruby"); assert_eq!(facts[0].mutation_kind, "stochastic"); diff --git a/gems/lineage/src/db/quality.rs b/gems/gigasail/src/db/quality.rs similarity index 99% rename from gems/lineage/src/db/quality.rs rename to gems/gigasail/src/db/quality.rs index daa610436..23c1f10fe 100644 --- a/gems/lineage/src/db/quality.rs +++ b/gems/gigasail/src/db/quality.rs @@ -90,7 +90,7 @@ pub fn ingest_coverage_json_with_options( options: &CoverageIngestOptions, ) -> Result { if !storage.commit_exists(commit_hash)? { - anyhow::bail!("commit {commit_hash} is not present in lineage metadata"); + anyhow::bail!("commit {commit_hash} is not present in gigasail metadata"); } let records = parse_coverage_input(input, format)?; @@ -785,7 +785,7 @@ mod tests { #[test] fn parses_sqlcov_branch_states_as_partial_line_coverage() { let payload = serde_json::json!({ - "format": "sql-cov/v1", "file_path": "gems/lineage/sql/demo.sql", + "format": "sql-cov/v1", "file_path": "gems/gigasail/sql/demo.sql", "statements": [{ "start_line": 2, "end_line": 3, "hit_count": 1 }], "metrics": [{ "measurable": true, "span": { "start_line": 2, "nullable": true }, @@ -797,7 +797,7 @@ mod tests { }); let records = parse_coverage_records(&payload, "sqlcov").unwrap(); assert_eq!(records.len(), 1); - assert_eq!(records[0].path, "gems/lineage/sql/demo.sql"); + assert_eq!(records[0].path, "gems/gigasail/sql/demo.sql"); assert!((records[0].line_coverage.unwrap() - 250.0 / 3.0).abs() < 0.000_001); assert_eq!(records[0].integration_coverage, Some(200.0 / 3.0)); assert_eq!( diff --git a/gems/lineage/src/db/queries/c/tags.scm b/gems/gigasail/src/db/queries/c/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/c/tags.scm rename to gems/gigasail/src/db/queries/c/tags.scm diff --git a/gems/lineage/src/db/queries/cpp/tags.scm b/gems/gigasail/src/db/queries/cpp/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/cpp/tags.scm rename to gems/gigasail/src/db/queries/cpp/tags.scm diff --git a/gems/lineage/src/db/queries/csharp/tags.scm b/gems/gigasail/src/db/queries/csharp/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/csharp/tags.scm rename to gems/gigasail/src/db/queries/csharp/tags.scm diff --git a/gems/lineage/src/db/queries/go/tags.scm b/gems/gigasail/src/db/queries/go/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/go/tags.scm rename to gems/gigasail/src/db/queries/go/tags.scm diff --git a/gems/lineage/src/db/queries/java/tags.scm b/gems/gigasail/src/db/queries/java/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/java/tags.scm rename to gems/gigasail/src/db/queries/java/tags.scm diff --git a/gems/lineage/src/db/queries/javascript/tags.scm b/gems/gigasail/src/db/queries/javascript/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/javascript/tags.scm rename to gems/gigasail/src/db/queries/javascript/tags.scm diff --git a/gems/lineage/src/db/queries/kotlin/tags.scm b/gems/gigasail/src/db/queries/kotlin/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/kotlin/tags.scm rename to gems/gigasail/src/db/queries/kotlin/tags.scm diff --git a/gems/lineage/src/db/queries/lua/tags.scm b/gems/gigasail/src/db/queries/lua/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/lua/tags.scm rename to gems/gigasail/src/db/queries/lua/tags.scm diff --git a/gems/lineage/src/db/queries/php/tags.scm b/gems/gigasail/src/db/queries/php/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/php/tags.scm rename to gems/gigasail/src/db/queries/php/tags.scm diff --git a/gems/lineage/src/db/queries/python/tags.scm b/gems/gigasail/src/db/queries/python/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/python/tags.scm rename to gems/gigasail/src/db/queries/python/tags.scm diff --git a/gems/lineage/src/db/queries/ruby/tags.scm b/gems/gigasail/src/db/queries/ruby/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/ruby/tags.scm rename to gems/gigasail/src/db/queries/ruby/tags.scm diff --git a/gems/lineage/src/db/queries/rust/tags.scm b/gems/gigasail/src/db/queries/rust/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/rust/tags.scm rename to gems/gigasail/src/db/queries/rust/tags.scm diff --git a/gems/lineage/src/db/queries/swift/tags.scm b/gems/gigasail/src/db/queries/swift/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/swift/tags.scm rename to gems/gigasail/src/db/queries/swift/tags.scm diff --git a/gems/lineage/src/db/queries/typescript/tags.scm b/gems/gigasail/src/db/queries/typescript/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/typescript/tags.scm rename to gems/gigasail/src/db/queries/typescript/tags.scm diff --git a/gems/lineage/src/db/queries/zig/tags.scm b/gems/gigasail/src/db/queries/zig/tags.scm similarity index 100% rename from gems/lineage/src/db/queries/zig/tags.scm rename to gems/gigasail/src/db/queries/zig/tags.scm diff --git a/gems/lineage/src/db/sarif.rs b/gems/gigasail/src/db/sarif.rs similarity index 99% rename from gems/lineage/src/db/sarif.rs rename to gems/gigasail/src/db/sarif.rs index d9619d7ab..57867bb8d 100644 --- a/gems/lineage/src/db/sarif.rs +++ b/gems/gigasail/src/db/sarif.rs @@ -16,7 +16,7 @@ pub struct SarifIngestStats { pub skipped_results: usize, } -/// A single physical SARIF finding after applying Lineage's shared path, +/// A single physical SARIF finding after applying Gigasail's shared path, /// fingerprint, category, and provenance normalization. Both persisted SARIF /// ingestion and ephemeral diff overlays consume this representation. #[derive(Debug, Clone, PartialEq)] @@ -404,7 +404,7 @@ fn normalize_sarif_result( .unwrap_or_else(|| short_hash(&format!("{rule_id}\0{message}\0{properties_json}"))); let provenance = string_properties(&properties); let proof_boundary: Vec = properties - .get("lineage.proof_boundary") + .get("gigasail.proof_boundary") .and_then(Value::as_array) .map(|values| { values @@ -747,7 +747,7 @@ mod tests { let properties = serde_json::json!({ "format": "espalier.report.sarif.v1", "tier": 1, - "lineage.proof_boundary": ["bounded input"], + "gigasail.proof_boundary": ["bounded input"], "espalier.manifest": large_manifest, }); @@ -756,7 +756,7 @@ mod tests { assert_eq!(persisted["format"], "espalier.report.sarif.v1"); assert_eq!(persisted["tier"], 1); assert_eq!( - persisted["lineage.proof_boundary"], + persisted["gigasail.proof_boundary"], serde_json::json!(["bounded input"]) ); assert!(persisted.get("espalier.manifest").is_none()); @@ -800,7 +800,7 @@ mod tests { "properties": { "format": "fact-mine.report.sarif.v1", "tier": 1, - "lineage.proof_boundary": ["bounded hazard scan"] + "gigasail.proof_boundary": ["bounded hazard scan"] }, "results": [{ "ruleId": "fact-mine.hazard", diff --git a/gems/lineage/src/db/stack_trace.rs b/gems/gigasail/src/db/stack_trace.rs similarity index 99% rename from gems/lineage/src/db/stack_trace.rs rename to gems/gigasail/src/db/stack_trace.rs index 01262835d..d1346cca1 100644 --- a/gems/lineage/src/db/stack_trace.rs +++ b/gems/gigasail/src/db/stack_trace.rs @@ -151,7 +151,7 @@ where for payload in payloads { if !storage.commit_exists(&payload.commit_hash)? { anyhow::bail!( - "commit {} is not present in lineage metadata", + "commit {} is not present in gigasail metadata", payload.commit_hash ); } @@ -433,7 +433,7 @@ mod tests { } }); - // 1. Should fail because commit is not in lineage storage metadata + // 1. Should fail because commit is not in gigasail storage metadata let err = ingest_stack_traces( &storage, &SentryProvider, diff --git a/gems/lineage/src/db/storage.rs b/gems/gigasail/src/db/storage.rs similarity index 100% rename from gems/lineage/src/db/storage.rs rename to gems/gigasail/src/db/storage.rs diff --git a/gems/lineage/src/db/test_exposure.rs b/gems/gigasail/src/db/test_exposure.rs similarity index 99% rename from gems/lineage/src/db/test_exposure.rs rename to gems/gigasail/src/db/test_exposure.rs index fecd53e72..b1fd1561e 100644 --- a/gems/lineage/src/db/test_exposure.rs +++ b/gems/gigasail/src/db/test_exposure.rs @@ -44,7 +44,7 @@ where E: BoundaryExtractor, { if !storage.commit_exists(commit_hash)? { - anyhow::bail!("commit {commit_hash} is not present in lineage metadata"); + anyhow::bail!("commit {commit_hash} is not present in gigasail metadata"); } let value: Value = serde_json::from_str(input).context("parse test exposure JSON")?; diff --git a/gems/lineage/src/db/vcs.rs b/gems/gigasail/src/db/vcs.rs similarity index 100% rename from gems/lineage/src/db/vcs.rs rename to gems/gigasail/src/db/vcs.rs diff --git a/gems/lineage/src/diff.rs b/gems/gigasail/src/diff.rs similarity index 99% rename from gems/lineage/src/diff.rs rename to gems/gigasail/src/diff.rs index 78c62deaa..866be4b07 100644 --- a/gems/lineage/src/diff.rs +++ b/gems/gigasail/src/diff.rs @@ -18,7 +18,7 @@ pub struct RevisionFile { } /// Repository-local source-role overrides, parsed from the immutable head -/// revision's `.lineage/diff.toml`. They are intentionally limited to exact +/// revision's `.gigasail/diff.toml`. They are intentionally limited to exact /// paths and directory prefixes so classification remains auditable and does /// not need a second glob language. #[derive(Debug, Clone, Default, PartialEq, Eq)] @@ -1874,7 +1874,7 @@ impl ClassificationOverrides { } } -/// Parses `.lineage/diff.toml` from the selected head revision. Invalid, +/// Parses `.gigasail/diff.toml` from the selected head revision. Invalid, /// absolute, and traversal paths are ignored rather than applying a broad /// classification to an unintended file. pub fn classification_overrides(contents: Option<&str>) -> ClassificationOverrides { @@ -1980,8 +1980,8 @@ fn is_lockfile(path: &str) -> bool { fn config_kind(path: &str) -> Option<&'static str> { let file = path.rsplit('/').next().unwrap_or(path); - if path == ".lineage/diff.toml" { - return Some("lineage"); + if path == ".gigasail/diff.toml" { + return Some("gigasail"); } if path.starts_with(".github/workflows/") && (file.ends_with(".yml") || file.ends_with(".yaml")) { @@ -2259,11 +2259,11 @@ mod tests { "base", "head", vec![file( - "gems/lineage/Cargo.toml", + "gems/gigasail/Cargo.toml", "[dependencies]\nserde = \"1\"\n[dev-dependencies]\ntempfile = \"3\"\n", )], vec![file( - "gems/lineage/Cargo.toml", + "gems/gigasail/Cargo.toml", "[dependencies]\nserde = { version = \"1.0\" }\ntoml = \"0.8\"\n", )], ); @@ -3362,7 +3362,7 @@ mod tests { SourceRole::Production ); assert_eq!( - source_role_with_overrides(".lineage/diff.toml", &overrides), + source_role_with_overrides(".gigasail/diff.toml", &overrides), SourceRole::Configuration ); } diff --git a/gems/lineage/src/diff_render.rs b/gems/gigasail/src/diff_render.rs similarity index 98% rename from gems/lineage/src/diff_render.rs rename to gems/gigasail/src/diff_render.rs index 172b2cc07..0ac83116d 100644 --- a/gems/lineage/src/diff_render.rs +++ b/gems/gigasail/src/diff_render.rs @@ -1,10 +1,10 @@ -//! Stable presentation formats for structured Lineage diffs. +//! Stable presentation formats for structured Gigasail diffs. use crate::diff::{DiffGroup, DiffPlan, EvidenceState, FileChangeKind, SourceRole, Visibility}; use serde::Serialize; use std::fmt::Write; -pub const STRUCTURED_DIFF_FORMAT_VERSION: &str = "lineage-diff/v1"; +pub const STRUCTURED_DIFF_FORMAT_VERSION: &str = "gigasail-diff/v1"; /// Versioned JSON envelope for CI and editor integrations. #[derive(Debug, Serialize)] @@ -28,7 +28,7 @@ pub fn render_structured_diff_text(plan: &DiffPlan, full: bool) -> String { let mut output = String::new(); let _ = writeln!( output, - "Lineage diff {}..{} ({})", + "Gigasail diff {}..{} ({})", plan.scope.base_oid, plan.scope.head_oid, plan.scope.policy_version ); let _ = writeln!( @@ -240,7 +240,7 @@ mod tests { let concise = render_structured_diff_text(&plan, false); let detailed = render_structured_diff_text(&plan, true); - assert!(concise.contains("Lineage diff base..head")); + assert!(concise.contains("Gigasail diff base..head")); assert!(concise.contains("lib/app.rb")); assert!(!concise.contains("function run risk=")); assert!(detailed.contains("function run risk=")); diff --git a/gems/lineage/src/diff_service.rs b/gems/gigasail/src/diff_service.rs similarity index 98% rename from gems/lineage/src/diff_service.rs rename to gems/gigasail/src/diff_service.rs index a0303bd67..bd081b722 100644 --- a/gems/lineage/src/diff_service.rs +++ b/gems/gigasail/src/diff_service.rs @@ -157,7 +157,7 @@ mod tests { fn builds_a_revision_pinned_plan_without_a_database() { let directory = tempdir().unwrap(); let repository = git2::Repository::init(directory.path()).unwrap(); - let signature = git2::Signature::now("Lineage", "lineage@example.test").unwrap(); + let signature = git2::Signature::now("Gigasail", "gigasail@example.test").unwrap(); let path = directory.path().join("app.rb"); std::fs::write(&path, "puts :base\n").unwrap(); let base = commit_file(&repository, &signature, None); diff --git a/gems/lineage/src/ingest_service.rs b/gems/gigasail/src/ingest_service.rs similarity index 100% rename from gems/lineage/src/ingest_service.rs rename to gems/gigasail/src/ingest_service.rs diff --git a/gems/lineage/src/lib.rs b/gems/gigasail/src/lib.rs similarity index 98% rename from gems/lineage/src/lib.rs rename to gems/gigasail/src/lib.rs index 5d990d15f..53c754466 100644 --- a/gems/lineage/src/lib.rs +++ b/gems/gigasail/src/lib.rs @@ -1,4 +1,4 @@ -//! Logical-unit lineage tracking for historical risk scoring. +//! Logical-unit gigasail tracking for historical risk scoring. //! //! The crate is intentionally split around replaceable boundaries: //! VCS traversal, source boundary extraction, analysis, and storage. diff --git a/gems/lineage/src/main.rs b/gems/gigasail/src/main.rs similarity index 89% rename from gems/lineage/src/main.rs rename to gems/gigasail/src/main.rs index 794d4d108..a7e3f5fd0 100644 --- a/gems/lineage/src/main.rs +++ b/gems/gigasail/src/main.rs @@ -1,22 +1,22 @@ use anyhow::{Context, Result}; use clap::{Parser, Subcommand, ValueEnum}; -use lineage::application::analyse::{execute as execute_analysis, AnalyseRequest}; +use gigasail::application::analyse::{execute as execute_analysis, AnalyseRequest}; #[cfg(test)] -use lineage::application::ci::{ +use gigasail::application::ci::{ publication_state, run_key, write_publication_state, PublicationState, }; #[cfg(test)] -use lineage::application::diff::resolve_diff_run_scope; -use lineage::application::diff::{prepare as prepare_diff, DiffCommandRequest}; +use gigasail::application::diff::resolve_diff_run_scope; +use gigasail::application::diff::{prepare as prepare_diff, DiffCommandRequest}; #[cfg(test)] -use lineage::application::ingest::normalize_manifest_coverage_paths; -use lineage::application::ingest::{ingest_run_manifest, validate_run_manifest_for_ingestion}; +use gigasail::application::ingest::normalize_manifest_coverage_paths; +use gigasail::application::ingest::{ingest_run_manifest, validate_run_manifest_for_ingestion}; #[cfg(test)] -use lineage::application::revision::ensure_profile_clean_worktree; +use gigasail::application::revision::ensure_profile_clean_worktree; #[cfg(test)] -use lineage::application::revision::{ensure_clean_worktree, porcelain_v1_dirty_paths}; -use lineage::application::revision::{ensure_revision_snapshot, repository_path}; -use lineage::{ +use gigasail::application::revision::{ensure_clean_worktree, porcelain_v1_dirty_paths}; +use gigasail::application::revision::{ensure_revision_snapshot, repository_path}; +use gigasail::{ coverage_records_to_test_exposure_json, ingest_architecture_json, ingest_coverage_json_with_options, ingest_hazards, ingest_hotness_json, ingest_mutant_facts_json_with_options, ingest_sarif_paths, ingest_stack_traces, @@ -30,10 +30,10 @@ use std::fs; use std::path::PathBuf; #[cfg(test)] -use lineage::{ArtifactKind, RunStatus}; +use gigasail::{ArtifactKind, RunStatus}; #[derive(Debug, Parser)] -#[command(name = "lineage")] +#[command(name = "giga")] #[command(about = "Track logical code-unit history across moves and refactors")] struct Cli { #[command(subcommand)] @@ -47,15 +47,15 @@ enum Command { Analyse { #[arg(long, default_value = ".")] repo: PathBuf, - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = "analyse")] profile: String, - /// Ingest a clean immutable-revision analysis run into lineage.db. + /// Ingest a clean immutable-revision analysis run into gigasail.db. #[arg(long)] ingest: bool, - /// Explicitly authorize commands from the checkout's lineage.yml. - /// Without this flag, analysis uses only Lineage's embedded, + /// Explicitly authorize commands from the checkout's gigasail.yml. + /// Without this flag, analysis uses only Gigasail's embedded, /// allowlisted providers. #[arg(long)] trust_current_config: bool, @@ -64,7 +64,7 @@ enum Command { Ci { #[arg(long, default_value = ".")] repo: PathBuf, - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = "ci")] profile: String, @@ -73,7 +73,7 @@ enum Command { /// explicitly authorize a newly introduced or changed configuration. #[arg(long)] config_revision: Option, - /// Explicitly authorize executing lineage.yml from the current clean + /// Explicitly authorize executing gigasail.yml from the current clean /// checkout. Intended only for trusted local runs and protected CI. #[arg(long)] trust_current_config: bool, @@ -86,7 +86,7 @@ enum Command { Diff { #[arg(long, default_value = ".")] repo: PathBuf, - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(value_name = "BASE")] base: Option, @@ -107,10 +107,10 @@ enum Command { mutant_corpus: Option, #[arg(long)] test_set: Option, - /// Refresh Lineage's bundled source analysis before rendering. + /// Refresh Gigasail's bundled source analysis before rendering. #[arg(long)] analyse: bool, - /// Explicitly authorize checkout lineage.yml commands for --analyse. + /// Explicitly authorize checkout gigasail.yml commands for --analyse. /// The default runs only embedded, allowlisted analysis. #[arg(long)] trust_current_config: bool, @@ -122,30 +122,30 @@ enum Command { #[arg(long)] require_complete: bool, }, - /// Initialize an empty lineage SQLite database. + /// Initialize an empty gigasail SQLite database. Init { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, }, /// Ingest a versioned Espalier architecture graph artifact. IngestArchitecture { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long)] input: PathBuf, }, - /// Build lineage data for a Git repository. + /// Build gigasail data for a Git repository. Build { #[arg(long, default_value = ".")] repo: PathBuf, - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long)] max_commits: Option, }, - /// Print the highest-risk logical units from a lineage database. + /// Print the highest-risk logical units from a gigasail database. Summary { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value_t = 20)] top: usize, @@ -156,12 +156,12 @@ enum Command { }, /// Refresh materialized UI summaries for fast dashboard and file index reads. RefreshUi { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, }, - /// Serve the local Lineage source and verification UI. + /// Serve the local Gigasail source and verification UI. Ui { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = ".")] repo: PathBuf, @@ -172,16 +172,16 @@ enum Command { #[arg(long = "overlay")] overlays: Vec, }, - /// Run the Lineage language server over stdio. + /// Run the Gigasail language server over stdio. Lsp { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = ".")] repo: PathBuf, #[arg(long = "overlay")] overlays: Vec, }, - /// Serve lineage.db to LLM coding agents over the Model Context Protocol. + /// Serve gigasail.db to LLM coding agents over the Model Context Protocol. /// Omit --db to run DB-less (live disk facts only; see docs/agents/mcp.md). Mcp { #[arg(long)] @@ -191,7 +191,7 @@ enum Command { }, /// Ingest aggregate coverage or mutation quality data for one commit. IngestCoverage { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = ".")] repo: PathBuf, @@ -216,7 +216,7 @@ enum Command { }, /// Ingest named test exposure facts for one commit. IngestTestExposure { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = ".")] repo: PathBuf, @@ -229,7 +229,7 @@ enum Command { }, /// Ingest Ruby mutant-facts/v1 and convert them to mutation exposure. IngestMutants { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = ".")] repo: PathBuf, @@ -254,7 +254,7 @@ enum Command { }, /// Ingest profile-hotness/v1 runtime profiling shares. IngestHotness { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = ".")] repo: PathBuf, @@ -267,7 +267,7 @@ enum Command { }, /// Ingest current hazard sites for one provider and commit. IngestHazards { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = ".")] repo: PathBuf, @@ -280,7 +280,7 @@ enum Command { }, /// Ingest SARIF artifacts into the persistent finding index. IngestSarif { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = ".")] repo: PathBuf, @@ -297,13 +297,13 @@ enum Command { }, /// Ingest provider stack traces and anchor frames to logical units. Ingest { - #[arg(long, default_value = ".lineage/lineage.db")] + #[arg(long, default_value = ".gigasail/gigasail.db")] db: PathBuf, #[arg(long, default_value = ".")] repo: PathBuf, #[arg(long)] input: Option, - /// Ingest a lineage-run/v1 manifest. Defaults to .lineage/artifacts/latest/manifest.json. + /// Ingest a gigasail-run/v1 manifest. Defaults to .gigasail/artifacts/latest/manifest.json. #[arg(long)] run: Option, #[arg(long)] @@ -313,7 +313,7 @@ enum Command { #[arg(long)] replace: bool, /// Directly ingest a coverage, mutation, or SARIF artifact. This is - /// independent of lineage.yml and complements --run manifests. + /// independent of gigasail.yml and complements --run manifests. #[arg(long, value_enum)] kind: Option, /// Input encoding for --kind (for example cobertura, simplecov, @@ -351,7 +351,7 @@ enum DirectIngestKind { Sarif, } -impl From for lineage::ingest_service::DirectArtifactKind { +impl From for gigasail::ingest_service::DirectArtifactKind { fn from(kind: DirectIngestKind) -> Self { match kind { DirectIngestKind::Coverage => Self::Coverage, @@ -380,7 +380,7 @@ fn main() -> Result<()> { trust_current_config, })?; println!( - "lineage analyse: profile={} revision={} artifacts={} ingested={} run={}", + "gigasail analyse: profile={} revision={} artifacts={} ingested={} run={}", result.profile, result.revision, result.artifact_count, @@ -397,7 +397,7 @@ fn main() -> Result<()> { require_complete, } => { let db = repository_path(&repo, &db); - let result = lineage::application::ci::execute(lineage::application::ci::CiRequest { + let result = gigasail::application::ci::execute(gigasail::application::ci::CiRequest { repo, db, profile, @@ -406,7 +406,7 @@ fn main() -> Result<()> { require_complete, })?; println!( - "lineage ci: profile={} revision={} artifacts={}", + "gigasail ci: profile={} revision={} artifacts={}", result.profile, result.revision, result.artifact_count ); } @@ -607,7 +607,7 @@ fn main() -> Result<()> { &records, &test_type, &test_id, - "lineage ingest-coverage", + "gigasail ingest-coverage", mutation_status.as_deref(), mutation_kind.as_deref(), ); @@ -823,14 +823,14 @@ fn main() -> Result<()> { let format = format.context("--kind requires --format")?; let git = GitProvider::open(&repo)?; let commit = git.resolve_commit(&commit.context("--kind requires --commit")?)?; - lineage::application::ingest::validate_direct_artifact( + gigasail::application::ingest::validate_direct_artifact( kind.into(), &input, &format, )?; ensure_revision_snapshot(&db, &repo, &commit)?; - let result = lineage::application::ingest::ingest_direct_artifact( - lineage::application::ingest::DirectArtifactIngest { + let result = gigasail::application::ingest::ingest_direct_artifact( + gigasail::application::ingest::DirectArtifactIngest { kind: kind.into(), db: &db, repo: &repo, @@ -847,16 +847,16 @@ fn main() -> Result<()> { }, )?; match result { - lineage::application::ingest::DirectIngestResult::Coverage(stats) => println!( + gigasail::application::ingest::DirectIngestResult::Coverage(stats) => println!( "ingested coverage: files={} units={} events={} line_events={} skipped_files={}", stats.files, stats.units, stats.events, stats.line_events, stats.skipped_files ), - lineage::application::ingest::DirectIngestResult::Mutants(stats) => println!( + gigasail::application::ingest::DirectIngestResult::Mutants(stats) => println!( "ingested mutant facts: facts={} units={} quality_events={} exposure_events={} skipped_files={} skipped_facts={}", stats.facts, stats.units, stats.quality_events, stats.exposure_events, stats.skipped_files, stats.skipped_facts ), - lineage::application::ingest::DirectIngestResult::Sarif(stats) => println!( + gigasail::application::ingest::DirectIngestResult::Sarif(stats) => println!( "ingested SARIF: artifacts={} findings={} skipped_files={} skipped_results={}", stats.artifacts, stats.findings, stats.skipped_files, stats.skipped_results ), @@ -919,7 +919,7 @@ fn main() -> Result<()> { Ok(()) } -fn print_json_summary(units: &[lineage::UnitSummary]) { +fn print_json_summary(units: &[gigasail::UnitSummary]) { print!("["); for (index, unit) in units.iter().enumerate() { if index > 0 { @@ -1002,7 +1002,7 @@ fn json_escape(value: &str) -> String { #[cfg(test)] mod tests { use super::*; - use lineage::pipeline::{DeclaredEvidenceScope, ManifestArtifact, RunManifest}; + use gigasail::pipeline::{DeclaredEvidenceScope, ManifestArtifact, RunManifest}; use sha2::{Digest, Sha256}; use tempfile::tempdir; @@ -1036,7 +1036,7 @@ mod tests { fn latest_successful_run_supplies_complete_diff_scope() { let directory = tempdir().unwrap(); let repository = git2::Repository::init(directory.path()).unwrap(); - let signature = git2::Signature::now("Lineage", "lineage@example.test").unwrap(); + let signature = git2::Signature::now("Gigasail", "gigasail@example.test").unwrap(); fs::write(directory.path().join("app.rb"), "puts :ok\n").unwrap(); let mut index = repository.index().unwrap(); index.add_path(std::path::Path::new("app.rb")).unwrap(); @@ -1045,7 +1045,7 @@ mod tests { .commit(Some("HEAD"), &signature, &signature, "initial", &tree, &[]) .unwrap() .to_string(); - fs::write(directory.path().join("lineage.yml"), "version: 1\n").unwrap(); + fs::write(directory.path().join("gigasail.yml"), "version: 1\n").unwrap(); let config = load_config(directory.path()).unwrap(); let latest = latest_run_directory(directory.path(), &config); fs::create_dir_all(&latest).unwrap(); @@ -1057,7 +1057,7 @@ mod tests { fs::write( latest.join("manifest.json"), serde_json::to_vec(&RunManifest { - version: lineage::pipeline::RUN_MANIFEST_VERSION.into(), + version: gigasail::pipeline::RUN_MANIFEST_VERSION.into(), revision: revision.clone(), profile: "ci".into(), repository_identity: "example".into(), @@ -1074,7 +1074,7 @@ mod tests { format: "generic".into(), path: "coverage.json".into(), content_hash: hex::encode(Sha256::digest(coverage)), - compression: lineage::ArtifactCompression::None, + compression: gigasail::ArtifactCompression::None, scope: None, complete: true, evidence_scope: Some(DeclaredEvidenceScope { @@ -1089,7 +1089,7 @@ mod tests { format: "sarif".into(), path: "first.sarif".into(), content_hash: hex::encode(Sha256::digest(sarif)), - compression: lineage::ArtifactCompression::None, + compression: gigasail::ArtifactCompression::None, scope: None, complete: true, evidence_scope: Some(DeclaredEvidenceScope { @@ -1104,7 +1104,7 @@ mod tests { format: "sarif".into(), path: "second.sarif".into(), content_hash: hex::encode(Sha256::digest(sarif)), - compression: lineage::ArtifactCompression::None, + compression: gigasail::ArtifactCompression::None, scope: None, complete: false, evidence_scope: None, @@ -1117,7 +1117,7 @@ mod tests { let provider = GitProvider::open(directory.path()).unwrap(); let mut request = DiffCommandRequest { repo: directory.path().to_path_buf(), - db: directory.path().join("lineage.db"), + db: directory.path().join("gigasail.db"), base: None, head: Some(revision), full: true, @@ -1148,7 +1148,7 @@ mod tests { let provider = GitProvider::open(repository.path().parent().unwrap()).unwrap(); let mut request = DiffCommandRequest { repo: directory.path().to_path_buf(), - db: directory.path().join("lineage.db"), + db: directory.path().join("gigasail.db"), base: None, head: None, full: true, @@ -1175,7 +1175,7 @@ mod tests { let provider = GitProvider::open(repository.path().parent().unwrap()).unwrap(); let mut request = DiffCommandRequest { repo: directory.path().to_path_buf(), - db: directory.path().join("lineage.db"), + db: directory.path().join("gigasail.db"), base: None, head: None, full: true, @@ -1198,7 +1198,7 @@ mod tests { fn clean_worktree_check_ignores_only_configured_artifacts() { let directory = tempdir().unwrap(); let repository = git2::Repository::init(directory.path()).unwrap(); - let signature = git2::Signature::now("Lineage", "lineage@example.test").unwrap(); + let signature = git2::Signature::now("Gigasail", "gigasail@example.test").unwrap(); fs::write(directory.path().join("tracked.txt"), "tracked\n").unwrap(); let mut index = repository.index().unwrap(); index.add_path(std::path::Path::new("tracked.txt")).unwrap(); @@ -1207,27 +1207,27 @@ mod tests { repository .commit(Some("HEAD"), &signature, &signature, "initial", &tree, &[]) .unwrap(); - fs::create_dir_all(directory.path().join(".lineage/artifacts/runs")).unwrap(); + fs::create_dir_all(directory.path().join(".gigasail/artifacts/runs")).unwrap(); fs::write( directory .path() - .join(".lineage/artifacts/runs/manifest.json"), + .join(".gigasail/artifacts/runs/manifest.json"), "{}", ) .unwrap(); - let database = directory.path().join(".lineage/lineage.db"); + let database = directory.path().join(".gigasail/gigasail.db"); fs::write(&database, "sqlite").unwrap(); ensure_clean_worktree( directory.path(), - std::path::Path::new(".lineage/artifacts"), + std::path::Path::new(".gigasail/artifacts"), Some(&database), ) .unwrap(); fs::write(directory.path().join("unexpected.txt"), "dirty\n").unwrap(); assert!(ensure_clean_worktree( directory.path(), - std::path::Path::new(".lineage/artifacts"), + std::path::Path::new(".gigasail/artifacts"), None ) .unwrap_err() @@ -1239,7 +1239,7 @@ mod tests { fn clean_worktree_check_for_subproject_ignores_unrelated_monorepo_changes() { let directory = tempdir().unwrap(); let repository = git2::Repository::init(directory.path()).unwrap(); - let signature = git2::Signature::now("Lineage", "lineage@example.test").unwrap(); + let signature = git2::Signature::now("Gigasail", "gigasail@example.test").unwrap(); let project = directory.path().join("gems/demo"); fs::create_dir_all(&project).unwrap(); fs::write(project.join("tracked.rb"), "puts :ok\n").unwrap(); @@ -1255,13 +1255,13 @@ mod tests { fs::write(directory.path().join("unrelated.md"), "outside project\n").unwrap(); assert!( - ensure_clean_worktree(&project, std::path::Path::new(".lineage/artifacts"), None) + ensure_clean_worktree(&project, std::path::Path::new(".gigasail/artifacts"), None) .is_ok() ); fs::write(project.join("dirty.rb"), "puts :dirty\n").unwrap(); assert!( - ensure_clean_worktree(&project, std::path::Path::new(".lineage/artifacts"), None) + ensure_clean_worktree(&project, std::path::Path::new(".gigasail/artifacts"), None) .unwrap_err() .to_string() .contains("gems/demo/dirty.rb") @@ -1272,7 +1272,7 @@ mod tests { fn command_profiles_require_the_entire_monorepo_to_be_clean() { let directory = tempdir().unwrap(); let repository = git2::Repository::init(directory.path()).unwrap(); - let signature = git2::Signature::now("Lineage", "lineage@example.test").unwrap(); + let signature = git2::Signature::now("Gigasail", "gigasail@example.test").unwrap(); let project = directory.path().join("gems/demo"); fs::create_dir_all(&project).unwrap(); fs::write(project.join("tracked.rb"), "puts :ok\n").unwrap(); @@ -1286,7 +1286,7 @@ mod tests { .commit(Some("HEAD"), &signature, &signature, "initial", &tree, &[]) .unwrap(); - let config = lineage::load_config_contents( + let config = gigasail::load_config_contents( "version: 1\nprofiles:\n ci:\n producers: [command]\nproducers:\n command:\n executor: command\n argv: [true]\n", Some("yml"), ) diff --git a/gems/lineage/src/pipeline.rs b/gems/gigasail/src/pipeline.rs similarity index 95% rename from gems/lineage/src/pipeline.rs rename to gems/gigasail/src/pipeline.rs index 7992fa015..4279d53f7 100644 --- a/gems/lineage/src/pipeline.rs +++ b/gems/gigasail/src/pipeline.rs @@ -1,4 +1,4 @@ -//! Typed configuration and manifest contracts for the Lineage evidence pipeline. +//! Typed configuration and manifest contracts for the Gigasail evidence pipeline. use anyhow::{bail, Context, Result}; use flate2::Compression; @@ -16,9 +16,9 @@ use std::sync::mpsc; use std::thread; use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; -pub const CONFIG_FILE_NAME: &str = "lineage.yml"; -pub const CONFIG_JSON_FILE_NAME: &str = "lineage.json"; -pub const RUN_MANIFEST_VERSION: &str = "lineage-run/v1"; +pub const CONFIG_FILE_NAME: &str = "gigasail.yml"; +pub const CONFIG_JSON_FILE_NAME: &str = "gigasail.json"; +pub const RUN_MANIFEST_VERSION: &str = "gigasail-run/v1"; const MAX_DECOMPRESSED_ARTIFACT_BYTES: u64 = 128 * 1024 * 1024; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -108,7 +108,7 @@ pub struct EvidenceProducer { #[serde(rename_all = "snake_case")] pub enum ProducerExecutor { Command, - Lineage, + Gigasail, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -142,7 +142,7 @@ pub struct DeclaredEvidenceScope { pub enum ArtifactKind { /// A producer-owned intermediate artifact. It is staged, hashed, and /// retained with the run so later producers can consume it, but it is not - /// evidence that Lineage imports into its database. + /// evidence that Gigasail imports into its database. Auxiliary, Coverage, Mutants, @@ -274,7 +274,7 @@ fn ensure_artifact_store_root(repo: &Path, config: &LineageConfig) -> Result<()> match fs::symlink_metadata(¤t) { Ok(metadata) if metadata.file_type().is_symlink() || !metadata.is_dir() => { bail!( - "Lineage artifact-store ancestor {} must be a non-symlink directory", + "Gigasail artifact-store ancestor {} must be a non-symlink directory", current.display() ); } @@ -282,7 +282,7 @@ fn ensure_artifact_store_root(repo: &Path, config: &LineageConfig) -> Result<()> Err(error) if error.kind() == std::io::ErrorKind::NotFound => { fs::create_dir(¤t).with_context(|| { format!( - "create Lineage artifact-store directory {}", + "create Gigasail artifact-store directory {}", current.display() ) })?; @@ -290,7 +290,7 @@ fn ensure_artifact_store_root(repo: &Path, config: &LineageConfig) -> Result<()> Err(error) => { return Err(error).with_context(|| { format!( - "inspect Lineage artifact-store directory {}", + "inspect Gigasail artifact-store directory {}", current.display() ) }); @@ -320,7 +320,7 @@ impl ExecutionLock { if let Err(error) = writeln!(file, "{identity}").and_then(|_| file.sync_all()) { let _ = fs::remove_file(&path); return Err(error).with_context(|| { - format!("write Lineage execution lock {}", path.display()) + format!("write Gigasail execution lock {}", path.display()) }); } return Ok(Self { path }); @@ -328,18 +328,18 @@ impl ExecutionLock { Err(error) if error.kind() == std::io::ErrorKind::AlreadyExists && attempt == 0 => { if stale_execution_lock(&path)? { fs::remove_file(&path).with_context(|| { - format!("remove stale Lineage execution lock {}", path.display()) + format!("remove stale Gigasail execution lock {}", path.display()) })?; continue; } bail!( - "acquire Lineage execution lock {}; another profile execution may be running", + "acquire Gigasail execution lock {}; another profile execution may be running", path.display() ); } Err(error) => { return Err(error).with_context(|| { - format!("acquire Lineage execution lock {}", path.display()) + format!("acquire Gigasail execution lock {}", path.display()) }) } } @@ -356,7 +356,7 @@ impl Drop for ExecutionLock { fn stale_execution_lock(path: &Path) -> Result { let contents = fs::read_to_string(path) - .with_context(|| format!("read Lineage execution lock {}", path.display()))?; + .with_context(|| format!("read Gigasail execution lock {}", path.display()))?; let mut fields = contents.split_whitespace(); let Some(pid) = fields.next().and_then(|pid| pid.parse::().ok()) else { return Ok(true); @@ -435,7 +435,7 @@ pub fn load_config(repo: &Path) -> Result { bail!("no {CONFIG_FILE_NAME} found in {}", repo.display()); }; let contents = fs::read_to_string(&path) - .with_context(|| format!("read Lineage configuration {}", path.display()))?; + .with_context(|| format!("read Gigasail configuration {}", path.display()))?; load_config_contents( &contents, path.extension().and_then(|extension| extension.to_str()), @@ -444,7 +444,7 @@ pub fn load_config(repo: &Path) -> Result { /// Parses a configuration from an already-trusted source snapshot. CI uses /// this for a reviewed base revision so a pull request cannot grant itself -/// arbitrary command execution merely by editing `lineage.yml`. +/// arbitrary command execution merely by editing `gigasail.yml`. pub fn load_config_contents(contents: &str, extension: Option<&str>) -> Result { let config: LineageConfig = if extension == Some("json") { serde_json::from_str(contents).map_err(anyhow::Error::from) @@ -457,7 +457,7 @@ pub fn load_config_contents(contents: &str, extension: Option<&str>) -> Result Result { if config.version != 1 { bail!( - "unsupported lineage.yml version {}; expected 1", + "unsupported gigasail.yml version {}; expected 1", config.version ); } @@ -477,11 +477,11 @@ pub fn validate_config(config: LineageConfig) -> Result { if producer.executor == ProducerExecutor::Command && producer.argv.is_empty() { bail!("command producer {name:?} requires argv"); } - if producer.executor == ProducerExecutor::Lineage + if producer.executor == ProducerExecutor::Gigasail && producer.argv.as_slice() != ["fact-mine-native"] { bail!( - "lineage producer {name:?} must use the allowlisted embedded provider argv: [fact-mine-native]; use executor: command for an explicitly trusted external command" + "gigasail producer {name:?} must use the allowlisted embedded provider argv: [fact-mine-native]; use executor: command for an explicitly trusted external command" ); } if producer.timeout_seconds == 0 || producer.max_output_bytes == 0 { @@ -653,7 +653,7 @@ pub fn validate_run_artifacts(run_directory: &Path, manifest: &RunManifest) -> R Ok(()) } -/// Validates the strict SARIF contract accepted for persisted Lineage +/// Validates the strict SARIF contract accepted for persisted Gigasail /// evidence. Direct ingestion and manifest ingestion intentionally share this /// gate so an unsupported document cannot be reported as complete. pub fn validate_sarif_document(bytes: &[u8]) -> Result<()> { @@ -739,7 +739,7 @@ fn remove_retained_run(run_directory: &Path) -> Result<()> { make_removable(run_directory)?; } fs::remove_dir_all(run_directory) - .with_context(|| format!("prune retained Lineage run {}", run_directory.display())) + .with_context(|| format!("prune retained Gigasail run {}", run_directory.display())) } /// Executes one configured profile and replaces the bounded `latest` run. @@ -755,7 +755,7 @@ fn execute_profile_unlocked( let profile = config .profiles .get(profile_name) - .with_context(|| format!("unknown Lineage profile {profile_name:?}"))?; + .with_context(|| format!("unknown Gigasail profile {profile_name:?}"))?; let declared_outputs = profile .producers .iter() @@ -840,7 +840,7 @@ fn execute_profile_unlocked( let observed = working_tree_fingerprint(repo, &config.artifacts.directory, &declared_outputs)?; if observed != expected { - bail!("working tree changed while Lineage analysis was running"); + bail!("working tree changed while Gigasail analysis was running"); } } write_manifest(&run_directory, &manifest)?; @@ -1155,32 +1155,32 @@ pub fn recover_workspace_transactions(repo: &Path, config: &LineageConfig) -> Re let artifact_root = checked_relative_directory( &repository_root, &config.artifacts.directory, - "Lineage artifact store", + "Gigasail artifact store", )?; let runs = artifact_root.join("runs"); if !runs.exists() { return Ok(()); } let runs_root = - checked_relative_directory(&artifact_root, Path::new("runs"), "Lineage run store")?; + checked_relative_directory(&artifact_root, Path::new("runs"), "Gigasail run store")?; let declared_outputs = declared_workspace_outputs(config)?; for entry in fs::read_dir(&runs)?.filter_map(std::result::Result::ok) { let run = entry.path(); let metadata = fs::symlink_metadata(&run)?; if metadata.file_type().is_symlink() || !metadata.is_dir() { bail!( - "Lineage run {} must be a non-symlink directory", + "Gigasail run {} must be a non-symlink directory", run.display() ); } let run_name = run .file_name() - .context("Lineage run directory has no file name")?; + .context("Gigasail run directory has no file name")?; let run_root = - checked_relative_directory(&runs_root, Path::new(run_name), "Lineage run directory")?; + checked_relative_directory(&runs_root, Path::new(run_name), "Gigasail run directory")?; if run_root.parent() != Some(runs_root.as_path()) { bail!( - "Lineage run {} escapes the configured run store", + "Gigasail run {} escapes the configured run store", run.display() ); } @@ -1445,7 +1445,7 @@ fn build_manifest( /// current file content for every non-ignored change, anchored to HEAD. fn working_tree_fingerprint( repo: &Path, - lineage_directory: &Path, + gigasail_directory: &Path, declared_outputs: &BTreeSet, ) -> Result { let repository = git2::Repository::discover(repo).with_context(|| { @@ -1478,7 +1478,7 @@ fn working_tree_fingerprint( .include_ignored(false) .renames_head_to_index(true) .renames_index_to_workdir(true); - let lineage_root = lineage_directory + let gigasail_root = gigasail_directory .components() .next() .map(|component| component.as_os_str().to_string_lossy().replace('\\', "/")) @@ -1505,7 +1505,7 @@ fn working_tree_fingerprint( .map(|path| (path.replace('\\', "/"), entry.status().bits())) }) .filter(|(path, _)| { - lineage_root + gigasail_root .as_ref() .is_none_or(|root| path != root && !path.starts_with(&format!("{root}/"))) }) @@ -1514,7 +1514,7 @@ fn working_tree_fingerprint( changes.sort(); let mut fingerprint = Sha256::new(); - fingerprint.update(b"lineage-worktree-fingerprint-v1\0"); + fingerprint.update(b"gigasail-worktree-fingerprint-v1\0"); fingerprint.update(head.as_bytes()); // Include the index object IDs as well as worktree bytes. Analysis reads // the worktree, but a staged-only change is still part of the developer's @@ -1581,7 +1581,7 @@ fn retain_failed_run(repo: &Path, config: &LineageConfig, staged: &Path) -> Resu .context("staged run directory has no valid file name")?; let failed = runs.join(format!("failed-{}", name.trim_start_matches(".staging-"))); fs::rename(staged, &failed) - .with_context(|| format!("retain failed Lineage run {}", staged.display()))?; + .with_context(|| format!("retain failed Gigasail run {}", staged.display()))?; prune_retained_runs(repo, config)?; Ok(()) } @@ -1626,7 +1626,7 @@ fn finalize_run( run_name.trim_start_matches(".staging-") )); fs::rename(staged, &completed) - .with_context(|| format!("finalize staged Lineage run {}", staged.display()))?; + .with_context(|| format!("finalize staged Gigasail run {}", staged.display()))?; if kind == ProfileRunKind::StandaloneAnalysis { prune_retained_runs(repo, config)?; } @@ -1654,7 +1654,7 @@ pub fn publish_run(repo: &Path, config: &LineageConfig, completed: &Path) -> Res let published_name = if let Some(name) = completed_name.strip_prefix("pending-") { let published = runs.join(format!("published-{name}")); fs::rename(completed, &published) - .with_context(|| format!("publish completed Lineage run {}", completed.display()))?; + .with_context(|| format!("publish completed Gigasail run {}", completed.display()))?; name } else if let Some(name) = completed_name.strip_prefix("published-") { name @@ -1683,18 +1683,18 @@ pub fn publish_run(repo: &Path, config: &LineageConfig, completed: &Path) -> Res // Windows does not permit the inexpensive symlink publication used on // Unix. Keep the completed run immutable and require a platform // specific publisher rather than destructively replacing `latest`. - bail!("atomic Lineage run publication is currently supported on Unix hosts"); + bail!("atomic Gigasail run publication is currently supported on Unix hosts"); } if let Ok(metadata) = fs::symlink_metadata(&latest) { if !metadata.file_type().is_symlink() { let legacy = runs.join(format!("legacy-{published_name}")); fs::rename(&latest, &legacy).with_context(|| { - format!("preserve legacy latest Lineage run {}", latest.display()) + format!("preserve legacy latest Gigasail run {}", latest.display()) })?; } } fs::rename(&temporary_link, &latest) - .with_context(|| format!("atomically publish latest Lineage run {}", latest.display()))?; + .with_context(|| format!("atomically publish latest Gigasail run {}", latest.display()))?; sync_parent_directory(&latest)?; prune_retained_runs(repo, config)?; Ok(()) @@ -1769,7 +1769,7 @@ fn prune_abandoned_runs(runs: &Path, stale_age: Duration) -> Result<()> { .is_some_and(|age| age >= stale_age); if stale { fs::remove_dir_all(entry.path()).with_context(|| { - format!("prune abandoned Lineage run {}", entry.path().display()) + format!("prune abandoned Gigasail run {}", entry.path().display()) })?; } } @@ -1782,8 +1782,8 @@ fn execute_producer( producer: &EvidenceProducer, run_directory: &Path, ) -> Result { - if producer.executor == ProducerExecutor::Lineage { - return execute_lineage_provider(repo, name, producer, run_directory); + if producer.executor == ProducerExecutor::Gigasail { + return execute_gigasail_provider(repo, name, producer, run_directory); } let working_directory = producer .working_directory @@ -1934,10 +1934,10 @@ fn execute_producer( }) } -/// Executes an embedded Lineage provider. The enum deliberately does *not* +/// Executes an embedded Gigasail provider. The enum deliberately does *not* /// resolve arbitrary executables from PATH: configuration is data, and a -/// `lineage` executor must remain an auditable, constrained capability. -fn execute_lineage_provider( +/// `gigasail` executor must remain an auditable, constrained capability. +fn execute_gigasail_provider( repo: &Path, name: &str, producer: &EvidenceProducer, @@ -2044,7 +2044,7 @@ struct FactMineRunStats { oversized_files: usize, } -/// The FactMine provider is linked into Lineage and is therefore safe to run +/// The FactMine provider is linked into Gigasail and is therefore safe to run /// in an unconfigured repository. It deliberately reports source-derived /// hazards as *partial* SARIF: static syntax can prove a site exists, never /// that a dynamic risk is absent. @@ -2066,13 +2066,13 @@ fn build_fact_mine_sarif(repo: &Path) -> Result<(FactMineRunStats, Vec)> { "runs": [{ "tool": {"driver": {"name": "FactMine", "informationUri": "https://github.com/cuzzo/clear"}}, "properties": { - "lineage.analysis_complete": false, - "lineage.provider_capability": "bounded-syntax-hazard-scan", - "lineage.proof_boundary": fact_mine_proof_boundary(&stats), - "lineage.scanned_files": stats.scanned_files, - "lineage.scanned_bytes": stats.scanned_bytes, - "lineage.unreadable_files": stats.unreadable_files, - "lineage.oversized_files": stats.oversized_files, + "gigasail.analysis_complete": false, + "gigasail.provider_capability": "bounded-syntax-hazard-scan", + "gigasail.proof_boundary": fact_mine_proof_boundary(&stats), + "gigasail.scanned_files": stats.scanned_files, + "gigasail.scanned_bytes": stats.scanned_bytes, + "gigasail.unreadable_files": stats.unreadable_files, + "gigasail.oversized_files": stats.oversized_files, }, "results": findings, }], @@ -2106,7 +2106,7 @@ fn embedded_fact_mine_version() -> String { .map(|value| value.trim_matches('"')) .unwrap_or("unknown"); format!( - "fact-mine-rust/{version};lineage/{}", + "fact-mine-rust/{version};gigasail/{}", env!("CARGO_PKG_VERSION") ) } @@ -2201,7 +2201,7 @@ fn collect_fact_mine_findings( hazard.hazard_type, if hazard.required_evidence.is_empty() { "review" } else { &hazard.required_evidence }, )}, - "partialFingerprints": {"lineage/v1": fingerprint}, + "partialFingerprints": {"gigasail/v1": fingerprint}, "properties": { "category": "static-hazard", "required_evidence": hazard.required_evidence, @@ -2413,10 +2413,10 @@ pub fn validate_relative_path(path: &Path, label: &str) -> Result<()> { fn validate_artifact_directory(path: &Path) -> Result<()> { validate_relative_path(path, "artifacts.directory")?; // A project may keep the database, run store, and declared producer - // outputs under one `.lineage/` root. Keep the historical - // `.lineage/artifacts/` default, but do not force a split that makes the + // outputs under one `.gigasail/` root. Keep the historical + // `.gigasail/artifacts/` default, but do not force a split that makes the // database look like a source-tree mutation during subproject CI. - let reserved = Path::new(".lineage"); + let reserved = Path::new(".gigasail"); if !path.starts_with(reserved) { bail!("artifacts.directory must be beneath {}", reserved.display()); } @@ -2449,7 +2449,7 @@ fn is_environment_key_continue(byte: u8) -> bool { } fn default_artifact_directory() -> PathBuf { - PathBuf::from(".lineage/artifacts") + PathBuf::from(".gigasail/artifacts") } fn default_compression() -> ArtifactCompression { @@ -2533,7 +2533,7 @@ mod tests { assert_eq!(config.artifacts.compression, ArtifactCompression::Gzip); assert_eq!( latest_run_directory(directory.path(), &config), - directory.path().join(".lineage/artifacts/latest") + directory.path().join(".gigasail/artifacts/latest") ); assert_eq!(config.profiles["ci"].producers, ["coverage"]); } @@ -2542,7 +2542,7 @@ mod tests { fn worktree_fingerprint_changes_with_dirty_source_and_untracked_files() { let directory = tempdir().unwrap(); let repository = git2::Repository::init(directory.path()).unwrap(); - let signature = git2::Signature::now("Lineage", "lineage@example.test").unwrap(); + let signature = git2::Signature::now("Gigasail", "gigasail@example.test").unwrap(); fs::write(directory.path().join("lib.rs"), "pub fn value() {}\n").unwrap(); let mut index = repository.index().unwrap(); index.add_path(Path::new("lib.rs")).unwrap(); @@ -2552,7 +2552,7 @@ mod tests { .commit(Some("HEAD"), &signature, &signature, "initial", &tree, &[]) .unwrap(); - let artifact_directory = Path::new(".lineage/artifacts"); + let artifact_directory = Path::new(".gigasail/artifacts"); let clean = working_tree_fingerprint(directory.path(), artifact_directory, &BTreeSet::new()) .unwrap(); @@ -2574,19 +2574,19 @@ mod tests { let untracked = working_tree_fingerprint(directory.path(), artifact_directory, &BTreeSet::new()) .unwrap(); - fs::create_dir_all(directory.path().join(".lineage/artifacts")).unwrap(); + fs::create_dir_all(directory.path().join(".gigasail/artifacts")).unwrap(); fs::write( - directory.path().join(".lineage/artifacts/transient.json"), + directory.path().join(".gigasail/artifacts/transient.json"), "{}\n", ) .unwrap(); - let with_lineage_output = + let with_gigasail_output = working_tree_fingerprint(directory.path(), artifact_directory, &BTreeSet::new()) .unwrap(); assert_ne!(clean, modified); assert_ne!(modified, staged); assert_ne!(modified, untracked); - assert_eq!(untracked, with_lineage_output); + assert_eq!(untracked, with_gigasail_output); assert!(untracked.starts_with("worktree:")); } @@ -2607,7 +2607,7 @@ mod tests { assert!(load_config(directory.path()) .unwrap_err() .to_string() - .contains("both lineage.yml")); + .contains("both gigasail.yml")); } #[test] @@ -2758,7 +2758,7 @@ mod tests { ); let failed = directory .path() - .join(".lineage/artifacts/runs") + .join(".gigasail/artifacts/runs") .read_dir() .unwrap() .map(|entry| entry.unwrap().path()) @@ -2933,7 +2933,7 @@ mod tests { .unwrap(); let run = directory .path() - .join(".lineage/artifacts/runs/.staging-interrupted"); + .join(".gigasail/artifacts/runs/.staging-interrupted"); fs::create_dir_all(&run).unwrap(); let transaction = quarantine_profile_outputs(directory.path(), &run, &config.profiles["ci"], &config) @@ -2984,7 +2984,7 @@ mod tests { .unwrap(); let run = directory .path() - .join(".lineage/artifacts/runs/.staging-interrupted"); + .join(".gigasail/artifacts/runs/.staging-interrupted"); fs::create_dir_all(&run).unwrap(); let transaction = quarantine_profile_outputs(directory.path(), &run, &config.profiles["ci"], &config) @@ -3102,7 +3102,7 @@ mod tests { } #[test] - fn lineage_executor_rejects_unallowlisted_path_commands() { + fn gigasail_executor_rejects_unallowlisted_path_commands() { let config = LineageConfig { version: 1, artifacts: ArtifactStoreConfig::default(), @@ -3110,7 +3110,7 @@ mod tests { producers: BTreeMap::from([( "unsafe".into(), EvidenceProducer { - executor: ProducerExecutor::Lineage, + executor: ProducerExecutor::Gigasail, argv: vec!["sh".into(), "-c".into(), "touch escaped".into()], working_directory: None, timeout_seconds: 1, @@ -3181,7 +3181,7 @@ mod tests { seal_published_run(&run.directory).unwrap(); } } - let runs = fs::read_dir(directory.path().join(".lineage/artifacts/runs")) + let runs = fs::read_dir(directory.path().join(".gigasail/artifacts/runs")) .unwrap() .filter_map(std::result::Result::ok) .filter(|entry| entry.file_name().to_string_lossy().starts_with("analysis-")) @@ -3236,7 +3236,7 @@ mod tests { .to_string(); assert!(error.contains("validate SARIF artifact"), "{error}"); assert!( - fs::read_dir(directory.path().join(".lineage/artifacts/runs")) + fs::read_dir(directory.path().join(".gigasail/artifacts/runs")) .unwrap() .filter_map(std::result::Result::ok) .all(|entry| !entry.file_name().to_string_lossy().starts_with("analysis-")) @@ -3295,7 +3295,7 @@ mod tests { ) .unwrap(); let producer = EvidenceProducer { - executor: ProducerExecutor::Lineage, + executor: ProducerExecutor::Gigasail, argv: vec!["fact-mine-native".into()], working_directory: None, timeout_seconds: 1, @@ -3321,23 +3321,23 @@ mod tests { assert!(results.contains("z.rs")); assert!(!results.contains("ignored.rs")); assert_eq!( - document.pointer("/runs/0/properties/lineage.analysis_complete"), + document.pointer("/runs/0/properties/gigasail.analysis_complete"), Some(&serde_json::Value::Bool(false)) ); assert_eq!( - document.pointer("/runs/0/properties/lineage.provider_capability"), + document.pointer("/runs/0/properties/gigasail.provider_capability"), Some(&serde_json::Value::String( "bounded-syntax-hazard-scan".to_string() )) ); assert!(document - .pointer("/runs/0/properties/lineage.proof_boundary") + .pointer("/runs/0/properties/gigasail.proof_boundary") .and_then(serde_json::Value::as_array) .is_some()); let run = directory.path().join("run"); fs::create_dir_all(&run).unwrap(); let producer_run = - execute_lineage_provider(directory.path(), "fact-mine", &producer, &run).unwrap(); + execute_gigasail_provider(directory.path(), "fact-mine", &producer, &run).unwrap(); assert_eq!(producer_run.outcome, ProducerOutcome::Succeeded); assert!( producer_run.tool_version.starts_with("fact-mine-rust/"), diff --git a/gems/lineage/src/ui/assets/app.css b/gems/gigasail/src/ui/assets/app.css similarity index 100% rename from gems/lineage/src/ui/assets/app.css rename to gems/gigasail/src/ui/assets/app.css diff --git a/gems/lineage/src/ui/assets/app.js b/gems/gigasail/src/ui/assets/app.js similarity index 100% rename from gems/lineage/src/ui/assets/app.js rename to gems/gigasail/src/ui/assets/app.js diff --git a/gems/lineage/src/ui/assets/diff/.vite/manifest.json b/gems/gigasail/src/ui/assets/diff/.vite/manifest.json similarity index 100% rename from gems/lineage/src/ui/assets/diff/.vite/manifest.json rename to gems/gigasail/src/ui/assets/diff/.vite/manifest.json diff --git a/gems/lineage/src/ui/assets/diff/assets/index--_D05yx7.js b/gems/gigasail/src/ui/assets/diff/assets/index--_D05yx7.js similarity index 93% rename from gems/lineage/src/ui/assets/diff/assets/index--_D05yx7.js rename to gems/gigasail/src/ui/assets/diff/assets/index--_D05yx7.js index 9b3611f9c..d2f0748e5 100644 --- a/gems/lineage/src/ui/assets/diff/assets/index--_D05yx7.js +++ b/gems/gigasail/src/ui/assets/diff/assets/index--_D05yx7.js @@ -56,6 +56,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho monaco.config({ paths: { vs: '...' } }) For more please check the link https://github.com/suren-atoyan/monaco-loader#config - `},Zd=qy(Gy)(Kd),Xy={config:Yy},Qy=function(){for(var r=arguments.length,o=new Array(r),s=0;s{s.current=!1}:i,r)}var de=cm;function ju(){}function Oa(i,r,o,s){return fm(i,s)||rm(i,r,o,s)}function fm(i,r){return i.editor.getModel(Id(i,r))}function rm(i,r,o,s){return i.editor.createModel(r,o,s?Id(i,s):void 0)}function Id(i,r){return i.Uri.parse(r)}function sm({original:i,modified:r,language:o,originalLanguage:s,modifiedLanguage:E,originalModelPath:z,modifiedModelPath:H,keepCurrentOriginalModel:X=!1,keepCurrentModifiedModel:U=!1,theme:_="light",loading:R="Loading...",options:J={},height:et="100%",width:pt="100%",className:_t,wrapperProps:xt={},beforeMount:lt=ju,onMount:Y=ju}){let[K,ft]=B.useState(!1),[Xt,Z]=B.useState(!0),st=B.useRef(null),nt=B.useRef(null),Nt=B.useRef(null),St=B.useRef(Y),at=B.useRef(lt),Vt=B.useRef(!1);Pd(()=>{let k=Wd.init();return k.then(p=>(nt.current=p)&&Z(!1)).catch(p=>p?.type!=="cancelation"&&console.error("Monaco initialization: error:",p)),()=>st.current?ee():k.cancel()}),de(()=>{if(st.current&&nt.current){let k=st.current.getOriginalEditor(),p=Oa(nt.current,i||"",s||o||"text",z||"");p!==k.getModel()&&k.setModel(p)}},[z],K),de(()=>{if(st.current&&nt.current){let k=st.current.getModifiedEditor(),p=Oa(nt.current,r||"",E||o||"text",H||"");p!==k.getModel()&&k.setModel(p)}},[H],K),de(()=>{let k=st.current.getModifiedEditor();k.getOption(nt.current.editor.EditorOption.readOnly)?k.setValue(r||""):r!==k.getValue()&&(k.executeEdits("",[{range:k.getModel().getFullModelRange(),text:r||"",forceMoveMarkers:!0}]),k.pushUndoStop())},[r],K),de(()=>{st.current?.getModel()?.original.setValue(i||"")},[i],K),de(()=>{let{original:k,modified:p}=st.current.getModel();nt.current.editor.setModelLanguage(k,s||o||"text"),nt.current.editor.setModelLanguage(p,E||o||"text")},[o,s,E],K),de(()=>{nt.current?.editor.setTheme(_)},[_],K),de(()=>{st.current?.updateOptions(J)},[J],K);let zt=B.useCallback(()=>{if(!nt.current)return;at.current(nt.current);let k=Oa(nt.current,i||"",s||o||"text",z||""),p=Oa(nt.current,r||"",E||o||"text",H||"");st.current?.setModel({original:k,modified:p})},[o,r,E,i,s,z,H]),ve=B.useCallback(()=>{!Vt.current&&Nt.current&&(st.current=nt.current.editor.createDiffEditor(Nt.current,{automaticLayout:!0,...J}),zt(),nt.current?.editor.setTheme(_),ft(!0),Vt.current=!0)},[J,_,zt]);B.useEffect(()=>{K&&St.current(st.current,nt.current)},[K]),B.useEffect(()=>{!Xt&&!K&&ve()},[Xt,K,ve]);function ee(){let k=st.current?.getModel();X||k?.original?.dispose(),U||k?.modified?.dispose(),st.current?.dispose()}return za.createElement(Fd,{width:pt,height:et,isEditorReady:K,loading:R,_ref:Nt,className:_t,wrapperProps:xt})}var om=sm,dm=B.memo(om);function hm(i){let r=B.useRef();return B.useEffect(()=>{r.current=i},[i]),r.current}var vm=hm,Pn=new Map;function ym({defaultValue:i,defaultLanguage:r,defaultPath:o,value:s,language:E,path:z,theme:H="light",line:X,loading:U="Loading...",options:_={},overrideServices:R={},saveViewState:J=!0,keepCurrentModel:et=!1,width:pt="100%",height:_t="100%",className:xt,wrapperProps:lt={},beforeMount:Y=ju,onMount:K=ju,onChange:ft,onValidate:Xt=ju}){let[Z,st]=B.useState(!1),[nt,Nt]=B.useState(!0),St=B.useRef(null),at=B.useRef(null),Vt=B.useRef(null),zt=B.useRef(K),ve=B.useRef(Y),ee=B.useRef(),k=B.useRef(s),p=vm(z),N=B.useRef(!1),Q=B.useRef(!1);Pd(()=>{let A=Wd.init();return A.then(j=>(St.current=j)&&Nt(!1)).catch(j=>j?.type!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>at.current?h():A.cancel()}),de(()=>{let A=Oa(St.current,i||s||"",r||E||"",z||o||"");A!==at.current?.getModel()&&(J&&Pn.set(p,at.current?.saveViewState()),at.current?.setModel(A),J&&at.current?.restoreViewState(Pn.get(z)))},[z],Z),de(()=>{at.current?.updateOptions(_)},[_],Z),de(()=>{!at.current||s===void 0||(at.current.getOption(St.current.editor.EditorOption.readOnly)?at.current.setValue(s):s!==at.current.getValue()&&(Q.current=!0,at.current.executeEdits("",[{range:at.current.getModel().getFullModelRange(),text:s,forceMoveMarkers:!0}]),at.current.pushUndoStop(),Q.current=!1))},[s],Z),de(()=>{let A=at.current?.getModel();A&&E&&St.current?.editor.setModelLanguage(A,E)},[E],Z),de(()=>{X!==void 0&&at.current?.revealLine(X)},[X],Z),de(()=>{St.current?.editor.setTheme(H)},[H],Z);let ot=B.useCallback(()=>{if(!(!Vt.current||!St.current)&&!N.current){ve.current(St.current);let A=z||o,j=Oa(St.current,s||i||"",r||E||"",A||"");at.current=St.current?.editor.create(Vt.current,{model:j,automaticLayout:!0,..._},R),J&&at.current.restoreViewState(Pn.get(A)),St.current.editor.setTheme(H),X!==void 0&&at.current.revealLine(X),st(!0),N.current=!0}},[i,r,o,s,E,z,_,R,J,H,X]);B.useEffect(()=>{Z&&zt.current(at.current,St.current)},[Z]),B.useEffect(()=>{!nt&&!Z&&ot()},[nt,Z,ot]),k.current=s,B.useEffect(()=>{Z&&ft&&(ee.current?.dispose(),ee.current=at.current?.onDidChangeModelContent(A=>{Q.current||ft(at.current.getValue(),A)}))},[Z,ft]),B.useEffect(()=>{if(Z){let A=St.current.editor.onDidChangeMarkers(j=>{let x=at.current.getModel()?.uri;if(x&&j.find(G=>G.path===x.path)){let G=St.current.editor.getModelMarkers({resource:x});Xt?.(G)}});return()=>{A?.dispose()}}return()=>{}},[Z,Xt]);function h(){ee.current?.dispose(),et?J&&Pn.set(z,at.current.saveViewState()):at.current.getModel()?.dispose(),at.current.dispose()}return za.createElement(Fd,{width:pt,height:_t,isEditorReady:Z,loading:U,_ref:Vt,className:xt,wrapperProps:lt})}var mm=ym;B.memo(mm);function th({language:i,modified:r,original:o,sideBySide:s=!0,highlights:E=[],annotations:z=[]}){const H=E.length===0&&z.length===0?void 0:(X,U)=>{X.getModifiedEditor().createDecorationsCollection([...gm(E,U),...Sm(z,U)])};return D.jsx(dm,{height:"18rem",language:i,modified:r,onMount:H,options:{automaticLayout:!0,glyphMargin:z.length>0,minimap:{enabled:!1},readOnly:!0,renderSideBySide:s},original:o,theme:"vs-dark"})}function gm(i,r){return i.map(o=>({options:{className:"lineage-sarif-line",hoverMessage:{value:o.title},isWholeLine:!0,overviewRuler:{color:"#d29922",position:r.editor.OverviewRulerLane.Right}},range:new r.Range(Math.max(1,o.startLine),1,Math.max(1,o.endLine),1)}))}function Sm(i,r){return i.map(o=>({options:{className:`lineage-verification-${o.verification}`,glyphMarginClassName:`lineage-verification-glyph-${o.verification}`,hoverMessage:{value:bm(o.verification)},isWholeLine:!0,overviewRuler:{color:pm(o.verification),position:r.editor.OverviewRulerLane.Right}},range:new r.Range(Math.max(1,o.line),1,Math.max(1,o.line),1)}))}function bm(i){return`Lineage verification: ${i.replaceAll("_"," ")}`}function pm(i){return{covered_and_killed:"#3fb950",covered:"#58a6ff",partially_covered:"#d29922",not_covered:"#f85149",unknown:"#8b949e"}[i]}const Ma=50;function _m(){const[i,r]=B.useState(window.location.search),o=Q0(i),s=new URLSearchParams(i),E=s.get("layout"),z=E==="inline"||E==="split"?E:window.localStorage.getItem("lineage.diff.layout")==="inline"||window.innerWidth<900?"inline":"split",[H,X]=B.useState(null),[U,_]=B.useState(null);return B.useEffect(()=>{o&&L0(o).then(X).catch(R=>{_(R instanceof ti?R.message:"Unable to load diff plan")})},[o?.base,o?.head,o?.coverage_source,o?.sarif_source,o?.selection,o?.mutant_corpus,o?.test_set,o?.page,o?.path]),B.useEffect(()=>{const R=()=>r(window.location.search);return window.addEventListener("popstate",R),()=>window.removeEventListener("popstate",R)},[]),D.jsxs("main",{className:"app-shell",children:[D.jsxs("header",{children:[D.jsx("p",{className:"eyebrow",children:"Lineage"}),D.jsx("h1",{children:"Revision-aware diff review"}),D.jsx("p",{children:"Revision-pinned inventory and raw source review."})]}),D.jsx(Om,{revisions:o}),!o&&D.jsx("p",{role:"status",children:"Add immutable base and head revisions to the URL to begin review."}),U&&D.jsx("p",{role:"alert",children:U}),H&&D.jsx(Em,{initialLayout:z,page:Tm(i),plan:H,rawPath:s.get("presentation")==="raw"?s.get("path"):null,selectedGroup:s.get("group")})]})}function Em({initialLayout:i,page:r,plan:o,rawPath:s,selectedGroup:E}){const[z,H]=B.useState(()=>i==="split"),X=s?o.files.find(Y=>Y.path===s):void 0,U=Math.max(1,Math.ceil(o.files.length/Ma)),_=E===null?-1:o.files.findIndex(Y=>Y.groups.some(K=>li(Y,K)===E)),R=_>=0?Math.floor(_/Ma)+1:Math.min(r,U),J=o.files.slice((R-1)*Ma,R*Ma);B.useEffect(()=>H(i==="split"),[i]);const et=Y=>{const K=new URLSearchParams(window.location.search);K.set("layout",Y?"split":"inline"),window.history.replaceState({},"",`${window.location.pathname}?${K}`),window.localStorage.setItem("lineage.diff.layout",Y?"split":"inline"),H(Y)},pt=Y=>{const K=new URLSearchParams(window.location.search);K.set("presentation","raw"),K.set("path",Y),K.set("focus","residual"),K.delete("group"),window.history.replaceState({},"",`${window.location.pathname}?${K}`),window.dispatchEvent(new PopStateEvent("popstate"))},_t=()=>{const Y=new URLSearchParams(window.location.search);Y.delete("presentation"),Y.delete("path"),Y.delete("focus"),window.history.replaceState({},"",`${window.location.pathname}?${Y}`),window.dispatchEvent(new PopStateEvent("popstate"))},xt=Y=>{const K=new URLSearchParams(window.location.search);Y===1?K.delete("page"):K.set("page",String(Y)),K.delete("group"),K.delete("path"),window.history.pushState({},"",`${window.location.pathname}?${K}`),window.dispatchEvent(new PopStateEvent("popstate"))},lt=(Y,K)=>{const ft=new URLSearchParams(window.location.search);K===null?(ft.delete("group"),ft.delete("path")):(ft.set("group",li(Y,K)),ft.set("path",Y.path)),window.history.pushState({},"",`${window.location.pathname}?${ft}`),window.dispatchEvent(new PopStateEvent("popstate"))};return D.jsxs("section",{"aria-label":"Diff inventory",className:"preview-card",children:[D.jsxs("p",{children:[o.inventory.changed_files," files in ",o.inventory.changed_directories," directories"]}),D.jsxs("p",{children:[o.inventory.added_files," added · ",o.inventory.modified_files," modified · ",o.inventory.deleted_files," deleted · ",o.inventory.renamed_files," renamed"]}),D.jsxs("p",{children:["Base ",o.scope.base_oid," · Head ",o.scope.head_oid]}),D.jsxs("p",{children:["Evidence scope: ",o.scope.evidence_scope.selection," · ",o.scope.evidence_scope.mutant_corpus," · ",o.scope.evidence_scope.test_set]}),D.jsxs("p",{children:["Evidence: coverage ",o.evidence.coverage," · mutation ",o.evidence.mutation," · hazards ",o.evidence.hazards," · SARIF ",o.evidence.sarif]}),o.resolved_sarif_findings.length>0&&D.jsxs("p",{children:["Resolved SARIF findings: ",o.resolved_sarif_findings.map(Y=>`${Y.path} ${uh(Y.finding)}`).join(" · ")]}),D.jsx(In,{label:"Configuration",paths:o.inventory.configuration_paths.map(Y=>`${Y.path} (${Y.kind})`)}),D.jsx(In,{label:"Documentation",paths:o.inventory.documentation_paths}),D.jsx(In,{label:"Generated",paths:o.inventory.generated_paths}),D.jsx(In,{label:"Lockfiles",paths:o.inventory.lockfile_paths}),o.dependency_changes.map(Y=>D.jsx(Mm,{change:Y},Y.manifest_path)),o.language_summaries.map(Y=>D.jsx(zm,{summary:Y},Y.language)),D.jsxs("fieldset",{children:[D.jsx("legend",{children:"Diff layout"}),D.jsxs("label",{children:[D.jsx("input",{checked:z,name:"layout",onChange:()=>et(!0),type:"radio"}),"Side by side"]}),D.jsxs("label",{children:[D.jsx("input",{checked:!z,name:"layout",onChange:()=>et(!1),type:"radio"}),"Inline"]})]}),X?D.jsx(Um,{file:X,headOid:o.scope.head_oid,onBack:_t,sideBySide:z}):D.jsxs(D.Fragment,{children:[D.jsx(Am,{onPage:xt,page:R,pageCount:U,totalFiles:o.files.length}),J.map(Y=>D.jsx(Dm,{file:Y,headOid:o.scope.head_oid,onGroupChange:lt,onRaw:pt,selectedGroup:E,sideBySide:z},Y.path))]})]})}function Tm(i){const r=Number(new URLSearchParams(i).get("page"));return Number.isSafeInteger(r)&&r>1?r:1}function Am({onPage:i,page:r,pageCount:o,totalFiles:s}){if(o<=1)return null;const E=(r-1)*Ma+1,z=Math.min(s,r*Ma);return D.jsxs("nav",{"aria-label":"Diff file pages",children:[D.jsxs("p",{children:["Showing files ",E,"–",z," of ",s]}),D.jsx("button",{disabled:r===1,onClick:()=>i(r-1),children:"Previous files"}),D.jsx("button",{disabled:r===o,onClick:()=>i(r+1),children:"Next files"})]})}function Om({revisions:i}){const[r,o]=B.useState(i?.base??""),[s,E]=B.useState(i?.head??""),[z,H]=B.useState(i?.coverage_source??""),[X,U]=B.useState(i?.sarif_source??""),[_,R]=B.useState(i?.selection??""),[J,et]=B.useState(i?.mutant_corpus??""),[pt,_t]=B.useState(i?.test_set??"");B.useEffect(()=>{o(i?.base??""),E(i?.head??""),H(i?.coverage_source??""),U(i?.sarif_source??""),R(i?.selection??""),et(i?.mutant_corpus??""),_t(i?.test_set??"")},[i?.base,i?.head,i?.coverage_source,i?.sarif_source,i?.selection,i?.mutant_corpus,i?.test_set]);const xt=lt=>{if(lt.preventDefault(),!r.trim()||!s.trim())return;const Y=new URLSearchParams(window.location.search);Y.set("base",r.trim()),Y.set("head",s.trim());for(const[K,ft]of[["coverage_source",z],["sarif_source",X],["selection",_],["mutant_corpus",J],["test_set",pt]])ft.trim()?Y.set(K,ft.trim()):Y.delete(K);Y.delete("presentation"),Y.delete("path"),Y.delete("group"),window.history.pushState({},"",`${window.location.pathname}?${Y}`),window.dispatchEvent(new PopStateEvent("popstate"))};return D.jsxs("form",{"aria-label":"Revision comparison",className:"revision-controls",onSubmit:xt,children:[D.jsxs("label",{children:["Base revision ",D.jsx("input",{"aria-label":"Base revision",onChange:lt=>o(lt.target.value),required:!0,value:r})]}),D.jsxs("label",{children:["Head revision ",D.jsx("input",{"aria-label":"Head revision",onChange:lt=>E(lt.target.value),required:!0,value:s})]}),D.jsxs("details",{children:[D.jsx("summary",{children:"Evidence selection"}),D.jsxs("label",{children:["Coverage source ",D.jsx("input",{"aria-label":"Coverage source",onChange:lt=>H(lt.target.value),value:z})]}),D.jsxs("label",{children:["SARIF source ",D.jsx("input",{"aria-label":"SARIF source",onChange:lt=>U(lt.target.value),value:X})]}),D.jsxs("label",{children:["Selection ",D.jsx("input",{"aria-label":"Evidence selection",onChange:lt=>R(lt.target.value),value:_})]}),D.jsxs("label",{children:["Mutant corpus ",D.jsx("input",{"aria-label":"Mutant corpus",onChange:lt=>et(lt.target.value),value:J})]}),D.jsxs("label",{children:["Test set ",D.jsx("input",{"aria-label":"Test set",onChange:lt=>_t(lt.target.value),value:pt})]})]}),D.jsx("button",{type:"submit",children:"Compare revisions"})]})}function Mm({change:i}){return i.status!=="exact"?D.jsxs("p",{children:[i.manifest_path,": unknown package-file change"]}):i.entries.length===0?D.jsxs("p",{children:[i.manifest_path,": no declared dependency changes"]}):D.jsxs("section",{"aria-label":`Dependency changes for ${i.manifest_path}`,children:[D.jsxs("p",{children:[i.manifest_path,": declared dependency changes"]}),D.jsx("ul",{children:i.entries.map(r=>D.jsxs("li",{children:[r.name," (",r.scope,"): ",r.before??"not declared"," → ",r.after??"not declared"]},`${r.scope}:${r.name}`))})]})}function zm({summary:i}){const r=i.production_by_visibility;return D.jsxs("p",{children:[i.language,": ",i.production.code," production code lines · ",i.production.comments," production comments · public ",Uf(r.public)," · private ",Uf(r.private)," · unknown visibility ",Uf(r.unknown)," · ",D.jsx(Hf,{verification:i.production_verification})," · ",i.test.code," test code lines · ",i.test.comments," test comments · assertions ",i.test_assertions??"unavailable"]})}function In({label:i,paths:r}){return r.length>0?D.jsxs("p",{children:[i,": ",r.join(", ")]}):null}function Dm({file:i,headOid:r,onGroupChange:o,onRaw:s,selectedGroup:E,sideBySide:z}){const[H,X]=B.useState(!1),U=i.groups.filter(R=>R.visibility!=="private"),_=i.groups.filter(R=>R.visibility==="private");return B.useEffect(()=>{E!==null&&i.groups.some(R=>li(i,R)===E)&&X(!0)},[i,E]),D.jsxs("article",{className:"file-review",children:[D.jsxs("button",{"aria-expanded":H,className:"disclosure",onClick:()=>X(!H),children:[i.path," · risk ",i.risk.score," · ",i.role," · ",i.change," · ",i.added_lines.code," code lines"]})," ",D.jsx("a",{href:ch(i.path,r),children:"Open source"}),H&&D.jsxs("div",{className:"file-body",children:[!i.semantic_classification_available&&D.jsx("p",{className:"metrics",children:"Semantic classification unavailable; use the raw source-ordered diff."}),D.jsx(lh,{risk:i.risk,verification:i.verification}),D.jsx(ah,{findings:i.sarif_findings}),i.semantic_classification_available&&U.sort(nh).map(R=>D.jsx(eh,{file:i,group:R,onGroupChange:o,selectedGroup:E,sideBySide:z},`${R.kind}:${R.name}:${R.start_line}`)),D.jsxs("p",{children:["Other changed lines: ",i.residual_lines.code," code, ",i.residual_lines.comments," comments. ",D.jsx("button",{onClick:()=>s(i.path),children:"Open raw file diff"})]}),(i.removed_lines.code>0||i.removed_lines.comments>0)&&D.jsxs("details",{children:[D.jsx("summary",{children:"Removals"}),D.jsxs("p",{children:[i.removed_lines.code," code lines and ",i.removed_lines.comments," comments removed; review in the raw diff."]})]}),i.semantic_classification_available&&_.length>0&&D.jsx(Rm,{file:i,groups:_,onGroupChange:o,selectedGroup:E,sideBySide:z}),(i.base_source===null||i.head_source===null)&&D.jsx("p",{children:"Binary or one-sided change; open the raw file view for details."})]})]})}function Rm({file:i,groups:r,onGroupChange:o,selectedGroup:s,sideBySide:E}){const[z,H]=B.useState(!1),X=r.reduce(Nm,jm()),U=r.reduce(Hm,xm()),_=r.reduce((R,J)=>R+J.risk.tier_one_hazards,0);return D.jsxs("section",{children:[D.jsxs("button",{"aria-expanded":z,className:"disclosure",onClick:()=>H(!z),children:["Private changes (",r.length," functions, ",X.code," code, +",r.reduce((R,J)=>R+J.risk.added_complexity,0)," complexity, +",_," tier-1 hazards, ",D.jsx(Hf,{verification:U}),")"]}),z&&r.slice().sort(nh).map(R=>D.jsx(eh,{file:i,group:R,onGroupChange:o,selectedGroup:s,sideBySide:E},`${R.kind}:${R.name}:${R.start_line}`))]})}function eh({file:i,group:r,onGroupChange:o,selectedGroup:s,sideBySide:E}){const z=li(i,r),[H,X]=B.useState(()=>s===z);B.useEffect(()=>X(s===z),[z,s]);const U=()=>{const _=!H;X(_),o(i,_?r:null)};return D.jsxs("section",{className:"group-review",children:[D.jsxs("button",{"aria-expanded":H,className:"disclosure",onClick:U,children:[r.kind," ",r.name," · ",r.added_lines.code," code lines · ",r.added_lines.comments," comments"]}),D.jsx(lh,{risk:r.risk,verification:r.verification}),D.jsx(ah,{findings:r.sarif_findings}),H&&D.jsx(th,{annotations:Bm(i.line_annotations,r.start_line,r.end_line),highlights:qm(r),language:i.language??"plaintext",modified:wd(i.head_source,r.start_line,r.end_line),original:wd(i.base_source,r.base_start_line,r.base_end_line),sideBySide:E})]})}function Um({file:i,headOid:r,onBack:o,sideBySide:s}){return D.jsxs("article",{className:"file-review",children:[D.jsx("button",{onClick:o,children:"Back to semantic review"}),D.jsxs("h2",{children:["Raw diff: ",i.path]}),D.jsx("a",{href:ch(i.path,r),children:"Open source"}),i.base_source!==null&&i.head_source!==null?D.jsx(th,{annotations:i.line_annotations,highlights:i.sarif_findings.map(ih),language:i.language??"plaintext",modified:i.head_source,original:i.base_source,sideBySide:s}):D.jsx("p",{children:"Binary or one-sided change."})]})}function lh({risk:i,verification:r}){return D.jsxs("p",{className:"metrics",children:[D.jsx(Hf,{verification:r})," · +",i.added_complexity," complexity · +",i.tier_one_hazards," tier-1 hazards"]})}function ah({findings:i}){return i.length===0?null:D.jsxs("p",{className:"metrics",children:["SARIF findings: ",i.map(uh).join(" · ")]})}function uh(i){return`${i.status} ${i.level}/${i.category} ${i.tier===null?"unclassified tier":`tier-${i.tier}`} ${i.source}:${i.tool}/${i.rule_id} line ${i.start_line}: ${i.message}`}function wd(i,r,o){return i===null||r===null||o===null?"":i.split(` + `},Zd=qy(Gy)(Kd),Xy={config:Yy},Qy=function(){for(var r=arguments.length,o=new Array(r),s=0;s{s.current=!1}:i,r)}var de=cm;function ju(){}function Oa(i,r,o,s){return fm(i,s)||rm(i,r,o,s)}function fm(i,r){return i.editor.getModel(Id(i,r))}function rm(i,r,o,s){return i.editor.createModel(r,o,s?Id(i,s):void 0)}function Id(i,r){return i.Uri.parse(r)}function sm({original:i,modified:r,language:o,originalLanguage:s,modifiedLanguage:E,originalModelPath:z,modifiedModelPath:H,keepCurrentOriginalModel:X=!1,keepCurrentModifiedModel:U=!1,theme:_="light",loading:R="Loading...",options:J={},height:et="100%",width:pt="100%",className:_t,wrapperProps:xt={},beforeMount:lt=ju,onMount:Y=ju}){let[K,ft]=B.useState(!1),[Xt,Z]=B.useState(!0),st=B.useRef(null),nt=B.useRef(null),Nt=B.useRef(null),St=B.useRef(Y),at=B.useRef(lt),Vt=B.useRef(!1);Pd(()=>{let k=Wd.init();return k.then(p=>(nt.current=p)&&Z(!1)).catch(p=>p?.type!=="cancelation"&&console.error("Monaco initialization: error:",p)),()=>st.current?ee():k.cancel()}),de(()=>{if(st.current&&nt.current){let k=st.current.getOriginalEditor(),p=Oa(nt.current,i||"",s||o||"text",z||"");p!==k.getModel()&&k.setModel(p)}},[z],K),de(()=>{if(st.current&&nt.current){let k=st.current.getModifiedEditor(),p=Oa(nt.current,r||"",E||o||"text",H||"");p!==k.getModel()&&k.setModel(p)}},[H],K),de(()=>{let k=st.current.getModifiedEditor();k.getOption(nt.current.editor.EditorOption.readOnly)?k.setValue(r||""):r!==k.getValue()&&(k.executeEdits("",[{range:k.getModel().getFullModelRange(),text:r||"",forceMoveMarkers:!0}]),k.pushUndoStop())},[r],K),de(()=>{st.current?.getModel()?.original.setValue(i||"")},[i],K),de(()=>{let{original:k,modified:p}=st.current.getModel();nt.current.editor.setModelLanguage(k,s||o||"text"),nt.current.editor.setModelLanguage(p,E||o||"text")},[o,s,E],K),de(()=>{nt.current?.editor.setTheme(_)},[_],K),de(()=>{st.current?.updateOptions(J)},[J],K);let zt=B.useCallback(()=>{if(!nt.current)return;at.current(nt.current);let k=Oa(nt.current,i||"",s||o||"text",z||""),p=Oa(nt.current,r||"",E||o||"text",H||"");st.current?.setModel({original:k,modified:p})},[o,r,E,i,s,z,H]),ve=B.useCallback(()=>{!Vt.current&&Nt.current&&(st.current=nt.current.editor.createDiffEditor(Nt.current,{automaticLayout:!0,...J}),zt(),nt.current?.editor.setTheme(_),ft(!0),Vt.current=!0)},[J,_,zt]);B.useEffect(()=>{K&&St.current(st.current,nt.current)},[K]),B.useEffect(()=>{!Xt&&!K&&ve()},[Xt,K,ve]);function ee(){let k=st.current?.getModel();X||k?.original?.dispose(),U||k?.modified?.dispose(),st.current?.dispose()}return za.createElement(Fd,{width:pt,height:et,isEditorReady:K,loading:R,_ref:Nt,className:_t,wrapperProps:xt})}var om=sm,dm=B.memo(om);function hm(i){let r=B.useRef();return B.useEffect(()=>{r.current=i},[i]),r.current}var vm=hm,Pn=new Map;function ym({defaultValue:i,defaultLanguage:r,defaultPath:o,value:s,language:E,path:z,theme:H="light",line:X,loading:U="Loading...",options:_={},overrideServices:R={},saveViewState:J=!0,keepCurrentModel:et=!1,width:pt="100%",height:_t="100%",className:xt,wrapperProps:lt={},beforeMount:Y=ju,onMount:K=ju,onChange:ft,onValidate:Xt=ju}){let[Z,st]=B.useState(!1),[nt,Nt]=B.useState(!0),St=B.useRef(null),at=B.useRef(null),Vt=B.useRef(null),zt=B.useRef(K),ve=B.useRef(Y),ee=B.useRef(),k=B.useRef(s),p=vm(z),N=B.useRef(!1),Q=B.useRef(!1);Pd(()=>{let A=Wd.init();return A.then(j=>(St.current=j)&&Nt(!1)).catch(j=>j?.type!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>at.current?h():A.cancel()}),de(()=>{let A=Oa(St.current,i||s||"",r||E||"",z||o||"");A!==at.current?.getModel()&&(J&&Pn.set(p,at.current?.saveViewState()),at.current?.setModel(A),J&&at.current?.restoreViewState(Pn.get(z)))},[z],Z),de(()=>{at.current?.updateOptions(_)},[_],Z),de(()=>{!at.current||s===void 0||(at.current.getOption(St.current.editor.EditorOption.readOnly)?at.current.setValue(s):s!==at.current.getValue()&&(Q.current=!0,at.current.executeEdits("",[{range:at.current.getModel().getFullModelRange(),text:s,forceMoveMarkers:!0}]),at.current.pushUndoStop(),Q.current=!1))},[s],Z),de(()=>{let A=at.current?.getModel();A&&E&&St.current?.editor.setModelLanguage(A,E)},[E],Z),de(()=>{X!==void 0&&at.current?.revealLine(X)},[X],Z),de(()=>{St.current?.editor.setTheme(H)},[H],Z);let ot=B.useCallback(()=>{if(!(!Vt.current||!St.current)&&!N.current){ve.current(St.current);let A=z||o,j=Oa(St.current,s||i||"",r||E||"",A||"");at.current=St.current?.editor.create(Vt.current,{model:j,automaticLayout:!0,..._},R),J&&at.current.restoreViewState(Pn.get(A)),St.current.editor.setTheme(H),X!==void 0&&at.current.revealLine(X),st(!0),N.current=!0}},[i,r,o,s,E,z,_,R,J,H,X]);B.useEffect(()=>{Z&&zt.current(at.current,St.current)},[Z]),B.useEffect(()=>{!nt&&!Z&&ot()},[nt,Z,ot]),k.current=s,B.useEffect(()=>{Z&&ft&&(ee.current?.dispose(),ee.current=at.current?.onDidChangeModelContent(A=>{Q.current||ft(at.current.getValue(),A)}))},[Z,ft]),B.useEffect(()=>{if(Z){let A=St.current.editor.onDidChangeMarkers(j=>{let x=at.current.getModel()?.uri;if(x&&j.find(G=>G.path===x.path)){let G=St.current.editor.getModelMarkers({resource:x});Xt?.(G)}});return()=>{A?.dispose()}}return()=>{}},[Z,Xt]);function h(){ee.current?.dispose(),et?J&&Pn.set(z,at.current.saveViewState()):at.current.getModel()?.dispose(),at.current.dispose()}return za.createElement(Fd,{width:pt,height:_t,isEditorReady:Z,loading:U,_ref:Vt,className:xt,wrapperProps:lt})}var mm=ym;B.memo(mm);function th({language:i,modified:r,original:o,sideBySide:s=!0,highlights:E=[],annotations:z=[]}){const H=E.length===0&&z.length===0?void 0:(X,U)=>{X.getModifiedEditor().createDecorationsCollection([...gm(E,U),...Sm(z,U)])};return D.jsx(dm,{height:"18rem",language:i,modified:r,onMount:H,options:{automaticLayout:!0,glyphMargin:z.length>0,minimap:{enabled:!1},readOnly:!0,renderSideBySide:s},original:o,theme:"vs-dark"})}function gm(i,r){return i.map(o=>({options:{className:"gigasail-sarif-line",hoverMessage:{value:o.title},isWholeLine:!0,overviewRuler:{color:"#d29922",position:r.editor.OverviewRulerLane.Right}},range:new r.Range(Math.max(1,o.startLine),1,Math.max(1,o.endLine),1)}))}function Sm(i,r){return i.map(o=>({options:{className:`gigasail-verification-${o.verification}`,glyphMarginClassName:`gigasail-verification-glyph-${o.verification}`,hoverMessage:{value:bm(o.verification)},isWholeLine:!0,overviewRuler:{color:pm(o.verification),position:r.editor.OverviewRulerLane.Right}},range:new r.Range(Math.max(1,o.line),1,Math.max(1,o.line),1)}))}function bm(i){return`Gigasail verification: ${i.replaceAll("_"," ")}`}function pm(i){return{covered_and_killed:"#3fb950",covered:"#58a6ff",partially_covered:"#d29922",not_covered:"#f85149",unknown:"#8b949e"}[i]}const Ma=50;function _m(){const[i,r]=B.useState(window.location.search),o=Q0(i),s=new URLSearchParams(i),E=s.get("layout"),z=E==="inline"||E==="split"?E:window.localStorage.getItem("gigasail.diff.layout")==="inline"||window.innerWidth<900?"inline":"split",[H,X]=B.useState(null),[U,_]=B.useState(null);return B.useEffect(()=>{o&&L0(o).then(X).catch(R=>{_(R instanceof ti?R.message:"Unable to load diff plan")})},[o?.base,o?.head,o?.coverage_source,o?.sarif_source,o?.selection,o?.mutant_corpus,o?.test_set,o?.page,o?.path]),B.useEffect(()=>{const R=()=>r(window.location.search);return window.addEventListener("popstate",R),()=>window.removeEventListener("popstate",R)},[]),D.jsxs("main",{className:"app-shell",children:[D.jsxs("header",{children:[D.jsx("p",{className:"eyebrow",children:"Gigasail"}),D.jsx("h1",{children:"Revision-aware diff review"}),D.jsx("p",{children:"Revision-pinned inventory and raw source review."})]}),D.jsx(Om,{revisions:o}),!o&&D.jsx("p",{role:"status",children:"Add immutable base and head revisions to the URL to begin review."}),U&&D.jsx("p",{role:"alert",children:U}),H&&D.jsx(Em,{initialLayout:z,page:Tm(i),plan:H,rawPath:s.get("presentation")==="raw"?s.get("path"):null,selectedGroup:s.get("group")})]})}function Em({initialLayout:i,page:r,plan:o,rawPath:s,selectedGroup:E}){const[z,H]=B.useState(()=>i==="split"),X=s?o.files.find(Y=>Y.path===s):void 0,U=Math.max(1,Math.ceil(o.files.length/Ma)),_=E===null?-1:o.files.findIndex(Y=>Y.groups.some(K=>li(Y,K)===E)),R=_>=0?Math.floor(_/Ma)+1:Math.min(r,U),J=o.files.slice((R-1)*Ma,R*Ma);B.useEffect(()=>H(i==="split"),[i]);const et=Y=>{const K=new URLSearchParams(window.location.search);K.set("layout",Y?"split":"inline"),window.history.replaceState({},"",`${window.location.pathname}?${K}`),window.localStorage.setItem("gigasail.diff.layout",Y?"split":"inline"),H(Y)},pt=Y=>{const K=new URLSearchParams(window.location.search);K.set("presentation","raw"),K.set("path",Y),K.set("focus","residual"),K.delete("group"),window.history.replaceState({},"",`${window.location.pathname}?${K}`),window.dispatchEvent(new PopStateEvent("popstate"))},_t=()=>{const Y=new URLSearchParams(window.location.search);Y.delete("presentation"),Y.delete("path"),Y.delete("focus"),window.history.replaceState({},"",`${window.location.pathname}?${Y}`),window.dispatchEvent(new PopStateEvent("popstate"))},xt=Y=>{const K=new URLSearchParams(window.location.search);Y===1?K.delete("page"):K.set("page",String(Y)),K.delete("group"),K.delete("path"),window.history.pushState({},"",`${window.location.pathname}?${K}`),window.dispatchEvent(new PopStateEvent("popstate"))},lt=(Y,K)=>{const ft=new URLSearchParams(window.location.search);K===null?(ft.delete("group"),ft.delete("path")):(ft.set("group",li(Y,K)),ft.set("path",Y.path)),window.history.pushState({},"",`${window.location.pathname}?${ft}`),window.dispatchEvent(new PopStateEvent("popstate"))};return D.jsxs("section",{"aria-label":"Diff inventory",className:"preview-card",children:[D.jsxs("p",{children:[o.inventory.changed_files," files in ",o.inventory.changed_directories," directories"]}),D.jsxs("p",{children:[o.inventory.added_files," added · ",o.inventory.modified_files," modified · ",o.inventory.deleted_files," deleted · ",o.inventory.renamed_files," renamed"]}),D.jsxs("p",{children:["Base ",o.scope.base_oid," · Head ",o.scope.head_oid]}),D.jsxs("p",{children:["Evidence scope: ",o.scope.evidence_scope.selection," · ",o.scope.evidence_scope.mutant_corpus," · ",o.scope.evidence_scope.test_set]}),D.jsxs("p",{children:["Evidence: coverage ",o.evidence.coverage," · mutation ",o.evidence.mutation," · hazards ",o.evidence.hazards," · SARIF ",o.evidence.sarif]}),o.resolved_sarif_findings.length>0&&D.jsxs("p",{children:["Resolved SARIF findings: ",o.resolved_sarif_findings.map(Y=>`${Y.path} ${uh(Y.finding)}`).join(" · ")]}),D.jsx(In,{label:"Configuration",paths:o.inventory.configuration_paths.map(Y=>`${Y.path} (${Y.kind})`)}),D.jsx(In,{label:"Documentation",paths:o.inventory.documentation_paths}),D.jsx(In,{label:"Generated",paths:o.inventory.generated_paths}),D.jsx(In,{label:"Lockfiles",paths:o.inventory.lockfile_paths}),o.dependency_changes.map(Y=>D.jsx(Mm,{change:Y},Y.manifest_path)),o.language_summaries.map(Y=>D.jsx(zm,{summary:Y},Y.language)),D.jsxs("fieldset",{children:[D.jsx("legend",{children:"Diff layout"}),D.jsxs("label",{children:[D.jsx("input",{checked:z,name:"layout",onChange:()=>et(!0),type:"radio"}),"Side by side"]}),D.jsxs("label",{children:[D.jsx("input",{checked:!z,name:"layout",onChange:()=>et(!1),type:"radio"}),"Inline"]})]}),X?D.jsx(Um,{file:X,headOid:o.scope.head_oid,onBack:_t,sideBySide:z}):D.jsxs(D.Fragment,{children:[D.jsx(Am,{onPage:xt,page:R,pageCount:U,totalFiles:o.files.length}),J.map(Y=>D.jsx(Dm,{file:Y,headOid:o.scope.head_oid,onGroupChange:lt,onRaw:pt,selectedGroup:E,sideBySide:z},Y.path))]})]})}function Tm(i){const r=Number(new URLSearchParams(i).get("page"));return Number.isSafeInteger(r)&&r>1?r:1}function Am({onPage:i,page:r,pageCount:o,totalFiles:s}){if(o<=1)return null;const E=(r-1)*Ma+1,z=Math.min(s,r*Ma);return D.jsxs("nav",{"aria-label":"Diff file pages",children:[D.jsxs("p",{children:["Showing files ",E,"–",z," of ",s]}),D.jsx("button",{disabled:r===1,onClick:()=>i(r-1),children:"Previous files"}),D.jsx("button",{disabled:r===o,onClick:()=>i(r+1),children:"Next files"})]})}function Om({revisions:i}){const[r,o]=B.useState(i?.base??""),[s,E]=B.useState(i?.head??""),[z,H]=B.useState(i?.coverage_source??""),[X,U]=B.useState(i?.sarif_source??""),[_,R]=B.useState(i?.selection??""),[J,et]=B.useState(i?.mutant_corpus??""),[pt,_t]=B.useState(i?.test_set??"");B.useEffect(()=>{o(i?.base??""),E(i?.head??""),H(i?.coverage_source??""),U(i?.sarif_source??""),R(i?.selection??""),et(i?.mutant_corpus??""),_t(i?.test_set??"")},[i?.base,i?.head,i?.coverage_source,i?.sarif_source,i?.selection,i?.mutant_corpus,i?.test_set]);const xt=lt=>{if(lt.preventDefault(),!r.trim()||!s.trim())return;const Y=new URLSearchParams(window.location.search);Y.set("base",r.trim()),Y.set("head",s.trim());for(const[K,ft]of[["coverage_source",z],["sarif_source",X],["selection",_],["mutant_corpus",J],["test_set",pt]])ft.trim()?Y.set(K,ft.trim()):Y.delete(K);Y.delete("presentation"),Y.delete("path"),Y.delete("group"),window.history.pushState({},"",`${window.location.pathname}?${Y}`),window.dispatchEvent(new PopStateEvent("popstate"))};return D.jsxs("form",{"aria-label":"Revision comparison",className:"revision-controls",onSubmit:xt,children:[D.jsxs("label",{children:["Base revision ",D.jsx("input",{"aria-label":"Base revision",onChange:lt=>o(lt.target.value),required:!0,value:r})]}),D.jsxs("label",{children:["Head revision ",D.jsx("input",{"aria-label":"Head revision",onChange:lt=>E(lt.target.value),required:!0,value:s})]}),D.jsxs("details",{children:[D.jsx("summary",{children:"Evidence selection"}),D.jsxs("label",{children:["Coverage source ",D.jsx("input",{"aria-label":"Coverage source",onChange:lt=>H(lt.target.value),value:z})]}),D.jsxs("label",{children:["SARIF source ",D.jsx("input",{"aria-label":"SARIF source",onChange:lt=>U(lt.target.value),value:X})]}),D.jsxs("label",{children:["Selection ",D.jsx("input",{"aria-label":"Evidence selection",onChange:lt=>R(lt.target.value),value:_})]}),D.jsxs("label",{children:["Mutant corpus ",D.jsx("input",{"aria-label":"Mutant corpus",onChange:lt=>et(lt.target.value),value:J})]}),D.jsxs("label",{children:["Test set ",D.jsx("input",{"aria-label":"Test set",onChange:lt=>_t(lt.target.value),value:pt})]})]}),D.jsx("button",{type:"submit",children:"Compare revisions"})]})}function Mm({change:i}){return i.status!=="exact"?D.jsxs("p",{children:[i.manifest_path,": unknown package-file change"]}):i.entries.length===0?D.jsxs("p",{children:[i.manifest_path,": no declared dependency changes"]}):D.jsxs("section",{"aria-label":`Dependency changes for ${i.manifest_path}`,children:[D.jsxs("p",{children:[i.manifest_path,": declared dependency changes"]}),D.jsx("ul",{children:i.entries.map(r=>D.jsxs("li",{children:[r.name," (",r.scope,"): ",r.before??"not declared"," → ",r.after??"not declared"]},`${r.scope}:${r.name}`))})]})}function zm({summary:i}){const r=i.production_by_visibility;return D.jsxs("p",{children:[i.language,": ",i.production.code," production code lines · ",i.production.comments," production comments · public ",Uf(r.public)," · private ",Uf(r.private)," · unknown visibility ",Uf(r.unknown)," · ",D.jsx(Hf,{verification:i.production_verification})," · ",i.test.code," test code lines · ",i.test.comments," test comments · assertions ",i.test_assertions??"unavailable"]})}function In({label:i,paths:r}){return r.length>0?D.jsxs("p",{children:[i,": ",r.join(", ")]}):null}function Dm({file:i,headOid:r,onGroupChange:o,onRaw:s,selectedGroup:E,sideBySide:z}){const[H,X]=B.useState(!1),U=i.groups.filter(R=>R.visibility!=="private"),_=i.groups.filter(R=>R.visibility==="private");return B.useEffect(()=>{E!==null&&i.groups.some(R=>li(i,R)===E)&&X(!0)},[i,E]),D.jsxs("article",{className:"file-review",children:[D.jsxs("button",{"aria-expanded":H,className:"disclosure",onClick:()=>X(!H),children:[i.path," · risk ",i.risk.score," · ",i.role," · ",i.change," · ",i.added_lines.code," code lines"]})," ",D.jsx("a",{href:ch(i.path,r),children:"Open source"}),H&&D.jsxs("div",{className:"file-body",children:[!i.semantic_classification_available&&D.jsx("p",{className:"metrics",children:"Semantic classification unavailable; use the raw source-ordered diff."}),D.jsx(lh,{risk:i.risk,verification:i.verification}),D.jsx(ah,{findings:i.sarif_findings}),i.semantic_classification_available&&U.sort(nh).map(R=>D.jsx(eh,{file:i,group:R,onGroupChange:o,selectedGroup:E,sideBySide:z},`${R.kind}:${R.name}:${R.start_line}`)),D.jsxs("p",{children:["Other changed lines: ",i.residual_lines.code," code, ",i.residual_lines.comments," comments. ",D.jsx("button",{onClick:()=>s(i.path),children:"Open raw file diff"})]}),(i.removed_lines.code>0||i.removed_lines.comments>0)&&D.jsxs("details",{children:[D.jsx("summary",{children:"Removals"}),D.jsxs("p",{children:[i.removed_lines.code," code lines and ",i.removed_lines.comments," comments removed; review in the raw diff."]})]}),i.semantic_classification_available&&_.length>0&&D.jsx(Rm,{file:i,groups:_,onGroupChange:o,selectedGroup:E,sideBySide:z}),(i.base_source===null||i.head_source===null)&&D.jsx("p",{children:"Binary or one-sided change; open the raw file view for details."})]})]})}function Rm({file:i,groups:r,onGroupChange:o,selectedGroup:s,sideBySide:E}){const[z,H]=B.useState(!1),X=r.reduce(Nm,jm()),U=r.reduce(Hm,xm()),_=r.reduce((R,J)=>R+J.risk.tier_one_hazards,0);return D.jsxs("section",{children:[D.jsxs("button",{"aria-expanded":z,className:"disclosure",onClick:()=>H(!z),children:["Private changes (",r.length," functions, ",X.code," code, +",r.reduce((R,J)=>R+J.risk.added_complexity,0)," complexity, +",_," tier-1 hazards, ",D.jsx(Hf,{verification:U}),")"]}),z&&r.slice().sort(nh).map(R=>D.jsx(eh,{file:i,group:R,onGroupChange:o,selectedGroup:s,sideBySide:E},`${R.kind}:${R.name}:${R.start_line}`))]})}function eh({file:i,group:r,onGroupChange:o,selectedGroup:s,sideBySide:E}){const z=li(i,r),[H,X]=B.useState(()=>s===z);B.useEffect(()=>X(s===z),[z,s]);const U=()=>{const _=!H;X(_),o(i,_?r:null)};return D.jsxs("section",{className:"group-review",children:[D.jsxs("button",{"aria-expanded":H,className:"disclosure",onClick:U,children:[r.kind," ",r.name," · ",r.added_lines.code," code lines · ",r.added_lines.comments," comments"]}),D.jsx(lh,{risk:r.risk,verification:r.verification}),D.jsx(ah,{findings:r.sarif_findings}),H&&D.jsx(th,{annotations:Bm(i.line_annotations,r.start_line,r.end_line),highlights:qm(r),language:i.language??"plaintext",modified:wd(i.head_source,r.start_line,r.end_line),original:wd(i.base_source,r.base_start_line,r.base_end_line),sideBySide:E})]})}function Um({file:i,headOid:r,onBack:o,sideBySide:s}){return D.jsxs("article",{className:"file-review",children:[D.jsx("button",{onClick:o,children:"Back to semantic review"}),D.jsxs("h2",{children:["Raw diff: ",i.path]}),D.jsx("a",{href:ch(i.path,r),children:"Open source"}),i.base_source!==null&&i.head_source!==null?D.jsx(th,{annotations:i.line_annotations,highlights:i.sarif_findings.map(ih),language:i.language??"plaintext",modified:i.head_source,original:i.base_source,sideBySide:s}):D.jsx("p",{children:"Binary or one-sided change."})]})}function lh({risk:i,verification:r}){return D.jsxs("p",{className:"metrics",children:[D.jsx(Hf,{verification:r})," · +",i.added_complexity," complexity · +",i.tier_one_hazards," tier-1 hazards"]})}function ah({findings:i}){return i.length===0?null:D.jsxs("p",{className:"metrics",children:["SARIF findings: ",i.map(uh).join(" · ")]})}function uh(i){return`${i.status} ${i.level}/${i.category} ${i.tier===null?"unclassified tier":`tier-${i.tier}`} ${i.source}:${i.tool}/${i.rule_id} line ${i.start_line}: ${i.message}`}function wd(i,r,o){return i===null||r===null||o===null?"":i.split(` `).slice(r-1,o).join(` -`)}function nh(i,r){return r.risk.score-i.risk.score||r.risk.tier_one_hazards-i.risk.tier_one_hazards||r.risk.not_covered-i.risk.not_covered||r.added_lines.code-i.added_lines.code||i.name.localeCompare(r.name)}function jm(){return{code:0,comments:0,other:0}}function xm(){return{covered_and_killed:0,covered:0,partially_covered:0,not_covered:0,unknown:0}}function Nm(i,r){return{code:i.code+r.added_lines.code,comments:i.comments+r.added_lines.comments,other:i.other+r.added_lines.other}}function Hm(i,r){return{covered_and_killed:i.covered_and_killed+r.verification.covered_and_killed,covered:i.covered+r.verification.covered,partially_covered:i.partially_covered+r.verification.partially_covered,not_covered:i.not_covered+r.verification.not_covered,unknown:i.unknown+r.verification.unknown}}function Uf(i){return i.covered_and_killed+i.covered+i.partially_covered+i.not_covered+i.unknown}function Hf({verification:i}){return D.jsxs(D.Fragment,{children:[i.covered_and_killed," covered+killed · ",i.covered," covered · ",i.partially_covered," partial · ",i.not_covered," not covered · ",i.unknown," unknown"]})}function qm(i){return i.sarif_findings.map(r=>({...ih(r),startLine:Math.max(1,r.start_line-i.start_line+1),endLine:Math.max(1,r.end_line-i.start_line+1)}))}function Bm(i,r,o){return i.filter(s=>s.line>=r&&s.line<=o).map(s=>({...s,line:s.line-r+1}))}function ih(i){return{startLine:i.start_line,endLine:i.end_line,title:`${i.tool}/${i.rule_id}: ${i.message}`}}function ch(i,r){return`/?${new URLSearchParams({path:i,commit:r})}#L1`}function li(i,r){return`${i.path}:${r.kind}:${r.name}:${r.start_line}`}function Ym(i){if(!(i instanceof HTMLElement))throw new Error("Lineage UI requires an HTML root element");X0.createRoot(i).render(D.jsx(B.StrictMode,{children:D.jsx(_m,{})}))}Ym(document.getElementById("root")); +`)}function nh(i,r){return r.risk.score-i.risk.score||r.risk.tier_one_hazards-i.risk.tier_one_hazards||r.risk.not_covered-i.risk.not_covered||r.added_lines.code-i.added_lines.code||i.name.localeCompare(r.name)}function jm(){return{code:0,comments:0,other:0}}function xm(){return{covered_and_killed:0,covered:0,partially_covered:0,not_covered:0,unknown:0}}function Nm(i,r){return{code:i.code+r.added_lines.code,comments:i.comments+r.added_lines.comments,other:i.other+r.added_lines.other}}function Hm(i,r){return{covered_and_killed:i.covered_and_killed+r.verification.covered_and_killed,covered:i.covered+r.verification.covered,partially_covered:i.partially_covered+r.verification.partially_covered,not_covered:i.not_covered+r.verification.not_covered,unknown:i.unknown+r.verification.unknown}}function Uf(i){return i.covered_and_killed+i.covered+i.partially_covered+i.not_covered+i.unknown}function Hf({verification:i}){return D.jsxs(D.Fragment,{children:[i.covered_and_killed," covered+killed · ",i.covered," covered · ",i.partially_covered," partial · ",i.not_covered," not covered · ",i.unknown," unknown"]})}function qm(i){return i.sarif_findings.map(r=>({...ih(r),startLine:Math.max(1,r.start_line-i.start_line+1),endLine:Math.max(1,r.end_line-i.start_line+1)}))}function Bm(i,r,o){return i.filter(s=>s.line>=r&&s.line<=o).map(s=>({...s,line:s.line-r+1}))}function ih(i){return{startLine:i.start_line,endLine:i.end_line,title:`${i.tool}/${i.rule_id}: ${i.message}`}}function ch(i,r){return`/?${new URLSearchParams({path:i,commit:r})}#L1`}function li(i,r){return`${i.path}:${r.kind}:${r.name}:${r.start_line}`}function Ym(i){if(!(i instanceof HTMLElement))throw new Error("Gigasail UI requires an HTML root element");X0.createRoot(i).render(D.jsx(B.StrictMode,{children:D.jsx(_m,{})}))}Ym(document.getElementById("root")); diff --git a/gems/gigasail/src/ui/assets/diff/assets/index-BZcXXTiw.css b/gems/gigasail/src/ui/assets/diff/assets/index-BZcXXTiw.css new file mode 100644 index 000000000..0cf910ca1 --- /dev/null +++ b/gems/gigasail/src/ui/assets/diff/assets/index-BZcXXTiw.css @@ -0,0 +1 @@ +:root{background:#10151c;color:#e7edf5;font-family:Inter,ui-sans-serif,system-ui,sans-serif}body{margin:0}.app-shell{margin:0 auto;max-width:72rem;padding:3rem 1.5rem}.eyebrow{color:#80cbc4;font-size:.78rem;font-weight:700;letter-spacing:.12em;margin:0 0 .45rem;text-transform:uppercase}h1,h2,p{margin-top:0}.preview-card{background:#18212d;border:1px solid #2b3b4f;border-radius:.75rem;margin-top:2rem;padding:1.25rem}.gigasail-sarif-line{background:color-mix(in srgb,#d29922 22%,transparent)}.gigasail-verification-covered-and-killed{background:color-mix(in srgb,#3fb950 18%,transparent)}.gigasail-verification-covered{background:color-mix(in srgb,#58a6ff 16%,transparent)}.gigasail-verification-partially-covered{background:color-mix(in srgb,#d29922 20%,transparent)}.gigasail-verification-not-covered{background:color-mix(in srgb,#f85149 20%,transparent)}.gigasail-verification-unknown{background:color-mix(in srgb,#8b949e 14%,transparent)}.gigasail-verification-glyph-covered-and-killed{background:#3fb950;border-radius:50%}.gigasail-verification-glyph-covered{background:#58a6ff;border-radius:50%}.gigasail-verification-glyph-partially-covered{background:#d29922;border-radius:50%}.gigasail-verification-glyph-not-covered{background:#f85149;border-radius:50%}.gigasail-verification-glyph-unknown{background:#8b949e;border-radius:50%} diff --git a/gems/lineage/src/ui/assets/diff/index.html b/gems/gigasail/src/ui/assets/diff/index.html similarity index 92% rename from gems/lineage/src/ui/assets/diff/index.html rename to gems/gigasail/src/ui/assets/diff/index.html index 3802cde9d..c79e9d2b3 100644 --- a/gems/lineage/src/ui/assets/diff/index.html +++ b/gems/gigasail/src/ui/assets/diff/index.html @@ -3,7 +3,7 @@ - Lineage Diff + Gigasail Diff diff --git a/gems/lineage/src/ui/controllers/architecture.rs b/gems/gigasail/src/ui/controllers/architecture.rs similarity index 99% rename from gems/lineage/src/ui/controllers/architecture.rs rename to gems/gigasail/src/ui/controllers/architecture.rs index 87cc08210..d5f34fcb7 100644 --- a/gems/lineage/src/ui/controllers/architecture.rs +++ b/gems/gigasail/src/ui/controllers/architecture.rs @@ -179,7 +179,7 @@ fn render_architecture_page(inventory: &Value, neighborhood: &Value, lens: &str) out.push_str(&html_escape(owner_name)); out.push_str(" architecture"); out.push_str("
"); - out.push_str("
← Lineage

"); + out.push_str("
← Gigasail

"); out.push_str(&html_escape(owner_name)); out.push_str("

"); out.push_str(&html_escape( diff --git a/gems/lineage/src/ui/controllers/assets.rs b/gems/gigasail/src/ui/controllers/assets.rs similarity index 100% rename from gems/lineage/src/ui/controllers/assets.rs rename to gems/gigasail/src/ui/controllers/assets.rs diff --git a/gems/lineage/src/ui/controllers/diff.rs b/gems/gigasail/src/ui/controllers/diff.rs similarity index 99% rename from gems/lineage/src/ui/controllers/diff.rs rename to gems/gigasail/src/ui/controllers/diff.rs index edb226ce8..9050f97ae 100644 --- a/gems/lineage/src/ui/controllers/diff.rs +++ b/gems/gigasail/src/ui/controllers/diff.rs @@ -240,7 +240,7 @@ mod tests { fn test_state() -> (tempfile::TempDir, UiServerState, String, String) { let dir = tempdir().unwrap(); let repo = git2::Repository::init(dir.path()).unwrap(); - let signature = git2::Signature::now("Lineage", "lineage@example.test").unwrap(); + let signature = git2::Signature::now("Gigasail", "gigasail@example.test").unwrap(); std::fs::write(dir.path().join("app.rb"), "puts :base\n").unwrap(); let mut index = repo.index().unwrap(); index.add_path(std::path::Path::new("app.rb")).unwrap(); @@ -266,7 +266,7 @@ mod tests { .unwrap() .to_string(); let state = UiServerState { - db: Arc::new(dir.path().join("lineage.db")), + db: Arc::new(dir.path().join("gigasail.db")), repo: Arc::new(dir.path().to_path_buf()), overlays: Arc::new(UiOverlays::default()), }; @@ -276,7 +276,7 @@ mod tests { fn large_test_state() -> (tempfile::TempDir, UiServerState, String, String) { let dir = tempdir().unwrap(); let repo = git2::Repository::init(dir.path()).unwrap(); - let signature = git2::Signature::now("Lineage", "lineage@example.test").unwrap(); + let signature = git2::Signature::now("Gigasail", "gigasail@example.test").unwrap(); let mut index = repo.index().unwrap(); for number in 0..=crate::diff::DIFF_FILE_PAGE_SIZE { let path = format!("app-{number:03}.rb"); @@ -308,7 +308,7 @@ mod tests { .unwrap() .to_string(); let state = UiServerState { - db: Arc::new(dir.path().join("lineage.db")), + db: Arc::new(dir.path().join("gigasail.db")), repo: Arc::new(dir.path().to_path_buf()), overlays: Arc::new(UiOverlays::default()), }; diff --git a/gems/lineage/src/ui/controllers/index.rs b/gems/gigasail/src/ui/controllers/index.rs similarity index 100% rename from gems/lineage/src/ui/controllers/index.rs rename to gems/gigasail/src/ui/controllers/index.rs diff --git a/gems/lineage/src/ui/controllers/mod.rs b/gems/gigasail/src/ui/controllers/mod.rs similarity index 100% rename from gems/lineage/src/ui/controllers/mod.rs rename to gems/gigasail/src/ui/controllers/mod.rs diff --git a/gems/lineage/src/ui/controllers/source.rs b/gems/gigasail/src/ui/controllers/source.rs similarity index 100% rename from gems/lineage/src/ui/controllers/source.rs rename to gems/gigasail/src/ui/controllers/source.rs diff --git a/gems/lineage/src/ui/lsp.rs b/gems/gigasail/src/ui/lsp.rs similarity index 97% rename from gems/lineage/src/ui/lsp.rs rename to gems/gigasail/src/ui/lsp.rs index 8b9c0be15..707b3e622 100644 --- a/gems/lineage/src/ui/lsp.rs +++ b/gems/gigasail/src/ui/lsp.rs @@ -79,7 +79,7 @@ enum GutterUpdate {} impl Notification for GutterUpdate { type Params = GutterUpdateParams; - const METHOD: &'static str = "lineage/gutterUpdate"; + const METHOD: &'static str = "gigasail/gutterUpdate"; } pub async fn serve_lsp( @@ -125,7 +125,7 @@ impl LanguageServer for LineageLsp { async fn initialized(&self, _: InitializedParams) { self.client - .log_message(MessageType::INFO, "Lineage LSP initialized") + .log_message(MessageType::INFO, "Gigasail LSP initialized") .await; } @@ -167,7 +167,7 @@ impl LanguageServer for LineageLsp { Ok(Some(facts)) => Ok(hover_for_line(&facts, line)), Ok(None) => Ok(None), Err(error) => { - self.log_error(format!("lineage hover failed: {error:#}")) + self.log_error(format!("gigasail hover failed: {error:#}")) .await; Ok(None) } @@ -179,7 +179,7 @@ impl LanguageServer for LineageLsp { Ok(Some(facts)) => Ok(Some(code_lenses_for_units(&facts))), Ok(None) => Ok(Some(Vec::new())), Err(error) => { - self.log_error(format!("lineage codeLens failed: {error:#}")) + self.log_error(format!("gigasail codeLens failed: {error:#}")) .await; Ok(Some(Vec::new())) } @@ -199,7 +199,7 @@ impl LanguageServer for LineageLsp { Ok(Some(path)) => path, Ok(None) => return Ok(None), Err(error) => { - self.log_error(format!("lineage definition failed: {error:#}")) + self.log_error(format!("gigasail definition failed: {error:#}")) .await; return Ok(None); } @@ -207,7 +207,7 @@ impl LanguageServer for LineageLsp { let storage = match Storage::open_existing(&self.db) { Ok(storage) => storage, Err(error) => { - self.log_error(format!("lineage definition failed: {error:#}")) + self.log_error(format!("gigasail definition failed: {error:#}")) .await; return Ok(None); } @@ -215,7 +215,7 @@ impl LanguageServer for LineageLsp { let definitions = match storage.find_definitions(&word, None, Some(¤t_path)) { Ok(definitions) => definitions, Err(error) => { - self.log_error(format!("lineage definition failed: {error:#}")) + self.log_error(format!("gigasail definition failed: {error:#}")) .await; return Ok(None); } @@ -255,7 +255,7 @@ impl LineageLsp { } Ok(None) => {} Err(error) => { - self.log_error(format!("lineage diagnostics failed: {error:#}")) + self.log_error(format!("gigasail diagnostics failed: {error:#}")) .await; } } @@ -476,9 +476,9 @@ pub fn diagnostics_for_annotations(annotations: &[UiLineAnnotation]) -> Vec Vec Vec Option { } let mut lines = Vec::new(); - lines.push("### Lineage".to_string()); + lines.push("### Gigasail".to_string()); lines.push(format!("`{}` line {}", facts.path, line)); if let Some(unit) = unit { lines.push(format!( @@ -712,7 +712,7 @@ fn code_lenses_for_units(facts: &FileFacts) -> Vec { .iter() .map(|unit| { let mut title = format!( - "Lineage: risk {:.1} | fixes {} | tests {} | mutant {}/{} | stale {} | reopened {}", + "Gigasail: risk {:.1} | fixes {} | tests {} | mutant {}/{} | stale {} | reopened {}", unit.risk_score, unit.fixes, unit.current_distinct_tests, @@ -731,7 +731,7 @@ fn code_lenses_for_units(facts: &FileFacts) -> Vec { range: range_for_line(unit.start_line), command: Some(Command { title, - command: "lineage.showUnit".to_string(), + command: "gigasail.showUnit".to_string(), arguments: Some(vec![serde_json::json!({ "path": facts.path, "unit_id": unit.id, diff --git a/gems/lineage/src/ui/mcp.rs b/gems/gigasail/src/ui/mcp.rs similarity index 95% rename from gems/lineage/src/ui/mcp.rs rename to gems/gigasail/src/ui/mcp.rs index 227e8b95b..2a059027e 100644 --- a/gems/lineage/src/ui/mcp.rs +++ b/gems/gigasail/src/ui/mcp.rs @@ -1,4 +1,4 @@ -//! MCP server: exposes `lineage.db` (and, for a bounded set of static +//! MCP server: exposes `gigasail.db` (and, for a bounded set of static //! facts, live disk content) to LLM coding agents over the Model Context //! Protocol. Five workflow-shaped tools, not one per table - see //! `docs/agents/mcp.md` for the rationale, plus the uncommitted-changes and @@ -31,7 +31,7 @@ use std::fs; use std::path::{Path, PathBuf}; use std::sync::Mutex; -/// Serve `lineage_*` tools over stdio JSON-RPC, newline-delimited (per the +/// Serve `giga_*` tools over stdio JSON-RPC, newline-delimited (per the /// MCP spec - unlike LSP, there is no Content-Length framing here). `db` is /// optional: omitting it runs in /// DB-less mode (see `docs/agents/mcp.md`), where only the tools/fields @@ -41,7 +41,7 @@ pub async fn serve_mcp(db: Option, repo: PathBuf) -> Result<()> { Some(path) => { if !path.is_file() { anyhow::bail!( - "lineage database not found: {} (run `lineage init`/`lineage build` first, or omit --db for DB-less mode)", + "gigasail database not found: {} (run `gigasail init`/`gigasail build` first, or omit --db for DB-less mode)", path.display() ); } @@ -70,10 +70,10 @@ fn tool_defs() -> Vec { }; vec![ Tool::new( - "lineage_file_risk", + "giga_file_risk", "Coverage, mutation coverage, and open-hazard counts for a file or a directory \ prefix. Call before editing unfamiliar code to learn whether it is well-verified. \ - Requires a lineage.db.", + Requires a gigasail.db.", obj(json!({ "type": "object", "properties": {"path": {"type": "string", "description": "Repo-relative file path or directory prefix"}}, @@ -81,13 +81,13 @@ fn tool_defs() -> Vec { })), ), Tool::new( - "lineage_unit_context", + "giga_unit_context", "Full context for the function/unit containing a specific line: risk, test \ coverage, mutation status, open hazards, runtime hotness, and static findings in \ its range. The richest tool - call before modifying a specific function. Works \ - without a lineage.db (structure + live hazard scan only, no history/coverage). If \ + without a gigasail.db (structure + live hazard scan only, no history/coverage). If \ the file has uncommitted or added-but-not-committed changes, hazards are \ - live-rescanned from disk for languages Lineage scans in-process (rust/go/zig/c/\ + live-rescanned from disk for languages Gigasail scans in-process (rust/go/zig/c/\ cpp/csharp) rather than served stale from the database.", obj(json!({ "type": "object", @@ -99,10 +99,10 @@ fn tool_defs() -> Vec { })), ), Tool::new( - "lineage_verification_gaps", + "giga_verification_gaps", "Open hazards lacking evidence, dead/dark branch arms, and zero-kill (weak) tests \ in a file or directory. Call before trusting a coverage percentage at face value. \ - Without a lineage.db, only a live hazard scan is available (no evidence join, no \ + Without a gigasail.db, only a live hazard scan is available (no evidence join, no \ dark-arm/weak-test data).", obj(json!({ "type": "object", @@ -111,10 +111,10 @@ fn tool_defs() -> Vec { })), ), Tool::new( - "lineage_change_history", + "giga_change_history", "Recent commit-level events (changes/moves/fixes) and production crash occurrences \ for a file. Call before a risky refactor to see how fragile the area has been. \ - Requires a lineage.db.", + Requires a gigasail.db.", obj(json!({ "type": "object", "properties": { @@ -125,9 +125,9 @@ fn tool_defs() -> Vec { })), ), Tool::new( - "lineage_find_definition", + "giga_find_definition", "Resolve a symbol name to its definition location(s) by rename-stable logical-unit \ - identity, not text search. Requires a lineage.db.", + identity, not text search. Requires a gigasail.db.", obj(json!({ "type": "object", "properties": { @@ -145,7 +145,7 @@ impl ServerHandler for LineageMcp { fn get_info(&self) -> rmcp::model::ServerInfo { InitializeResult::new(ServerCapabilities::builder().enable_tools().build()) .with_server_info(Implementation::new( - "lineage-mcp", + "gigasail-mcp", env!("CARGO_PKG_VERSION"), )) } @@ -178,26 +178,26 @@ impl ServerHandler for LineageMcp { } let dispatch = || -> Result { match tool_name { - "lineage_file_risk" => file_risk( - require_db(&storage, "lineage_file_risk")?, + "giga_file_risk" => file_risk( + require_db(&storage, "giga_file_risk")?, arg_str(&args, "path")?, ), - "lineage_unit_context" => unit_context( + "giga_unit_context" => unit_context( storage.as_ref(), &self.repo, arg_str(&args, "path")?, arg_u32(&args, "line")?, ), - "lineage_verification_gaps" => { + "giga_verification_gaps" => { verification_gaps(storage.as_ref(), &self.repo, arg_str(&args, "path")?) } - "lineage_change_history" => change_history( - require_db(&storage, "lineage_change_history")?, + "giga_change_history" => change_history( + require_db(&storage, "giga_change_history")?, arg_str(&args, "path")?, arg_u32_opt(&args, "limit").unwrap_or(20), ), - "lineage_find_definition" => find_definition( - require_db(&storage, "lineage_find_definition")?, + "giga_find_definition" => find_definition( + require_db(&storage, "giga_find_definition")?, arg_str(&args, "name")?, args.get("path").and_then(Value::as_str), args.get("commit").and_then(Value::as_str), @@ -239,7 +239,7 @@ fn arg_u32_opt(args: &Map, key: &str) -> Option { fn require_db<'a>(storage: &'a Option, tool: &str) -> Result<&'a Storage, String> { storage .as_ref() - .ok_or_else(|| format!("{tool} requires a lineage.db; server was started without --db")) + .ok_or_else(|| format!("{tool} requires a gigasail.db; server was started without --db")) } // --------------------------------------------------------------------------- @@ -411,7 +411,7 @@ fn file_risk(storage: &Storage, path: &str) -> Result { )?; if rows.is_empty() { return Err(format!( - "no tracked units under {path:?} (run `lineage build` first?)" + "no tracked units under {path:?} (run `gigasail build` first?)" )); } @@ -714,7 +714,7 @@ fn unit_context( // Uncommitted/added-but-not-committed changes: if the file has a dirty // working-tree status, the DB's hazard rows may be stale (computed at // the last commit's content, not what's on disk now). For languages - // Lineage already scans in-process (rust/go/zig/c/cpp/csharp), rescan + // Gigasail already scans in-process (rust/go/zig/c/cpp/csharp), rescan // live disk content directly - no subprocess, no DB write - and report // it as a distinct `live_hazards` field rather than silently merging it // into (possibly stale) `hazards`. See docs/agents/mcp.md. @@ -744,7 +744,7 @@ fn unit_context( // Uncommitted-changes support: git2 working-tree status (not GitProvider, // which is intentionally committed-history-only), plus live in-process // rescanning reusing hazard.rs's own scan_*_sites functions - the same code -// `lineage ingest-hazards` uses, just pointed at disk instead of a git blob. +// `gigasail ingest-hazards` uses, just pointed at disk instead of a git blob. // --------------------------------------------------------------------------- /// Returns a short status label if `path` has uncommitted or @@ -812,7 +812,7 @@ fn live_rescan_hazards( ) } -/// `unit_context` with no `lineage.db` at all: structure comes from the +/// `unit_context` with no `gigasail.db` at all: structure comes from the /// same git-decoupled `HeuristicExtractor` the UI already runs against live /// disk content (`source_symbols_from_current_file`); hazards come from the /// same live in-process rescan used for the dirty-file case above. No @@ -854,7 +854,7 @@ fn live_unit_context(repo: &Path, path: &str, line: u32) -> Value { "unit": {"name": unit.name, "type": unit.kind.as_str(), "original_path": unit.path, "start_line": unit.start_line}, "span": [unit.start_line, unit.end_line], "live_hazards": live_hazards, - "note": "no lineage.db: structure via live heuristic extraction, hazards via live in-process \ + "note": "no gigasail.db: structure via live heuristic extraction, hazards via live in-process \ rescan (rust/go/zig/c/cpp/csharp only). No history, coverage, mutation, or hotness \ data available without a database.", }) @@ -872,7 +872,7 @@ fn live_verification_gaps(repo: &Path, path: &str) -> Value { return json!({ "scope": path, "open_hazards": [], - "note": "no lineage.db and no in-process hazard scanner for this file's language \ + "note": "no gigasail.db and no in-process hazard scanner for this file's language \ (rust/go/zig/c/cpp/csharp only)", }); }; @@ -888,7 +888,7 @@ fn live_verification_gaps(repo: &Path, path: &str) -> Value { json!({ "scope": path, "open_hazards": open_hazards, - "note": "no lineage.db: live in-process rescan only, no evidence join, no dark-arm/weak-test data", + "note": "no gigasail.db: live in-process rescan only, no evidence join, no dark-arm/weak-test data", }) } diff --git a/gems/lineage/src/ui/templates/app.html b/gems/gigasail/src/ui/templates/app.html similarity index 91% rename from gems/lineage/src/ui/templates/app.html rename to gems/gigasail/src/ui/templates/app.html index 1469eb052..9abcb57be 100644 --- a/gems/lineage/src/ui/templates/app.html +++ b/gems/gigasail/src/ui/templates/app.html @@ -1,5 +1,5 @@

- +