@code-sentinel-cli/code-sentinel-cli 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +1 -1
  2. package/dist/bin.js +1184 -809
  3. package/dist/builtin-rules/ai/angular/api-service-contract-risk.prompt.md +71 -0
  4. package/dist/builtin-rules/ai/angular/api-service-contract-risk.rule.yaml +22 -0
  5. package/dist/builtin-rules/ai/angular/component-state-flow.prompt.md +79 -0
  6. package/dist/builtin-rules/ai/angular/component-state-flow.rule.yaml +26 -0
  7. package/dist/builtin-rules/ai/angular/cross-feature-api-drift.prompt.md +70 -0
  8. package/dist/builtin-rules/ai/angular/cross-feature-api-drift.rule.yaml +42 -0
  9. package/dist/builtin-rules/ai/angular/cross-feature-route-permission-drift.prompt.md +73 -0
  10. package/dist/builtin-rules/ai/angular/cross-feature-route-permission-drift.rule.yaml +50 -0
  11. package/dist/builtin-rules/ai/angular/reactive-form-flow.prompt.md +82 -0
  12. package/dist/builtin-rules/ai/angular/reactive-form-flow.rule.yaml +23 -0
  13. package/dist/builtin-rules/ai/angular/route-permission-flow.prompt.md +80 -0
  14. package/dist/builtin-rules/ai/angular/route-permission-flow.rule.yaml +23 -0
  15. package/dist/builtin-rules/ai/angular/rxjs-flow-risk.prompt.md +82 -0
  16. package/dist/builtin-rules/ai/angular/rxjs-flow-risk.rule.yaml +24 -0
  17. package/dist/builtin-rules/ai/angular/template-contract-risk.prompt.md +80 -0
  18. package/dist/builtin-rules/ai/angular/template-contract-risk.rule.yaml +25 -0
  19. package/dist/builtin-rules/ai/flutter/dynamic-content-risk.prompt.md +55 -0
  20. package/dist/builtin-rules/ai/flutter/dynamic-content-risk.rule.yaml +18 -0
  21. package/dist/builtin-rules/ai/flutter/feature-state-flow-risk.prompt.md +58 -0
  22. package/dist/builtin-rules/ai/flutter/feature-state-flow-risk.rule.yaml +18 -0
  23. package/dist/builtin-rules/ai/flutter/native-platform-consistency-risk.prompt.md +56 -0
  24. package/dist/builtin-rules/ai/flutter/native-platform-consistency-risk.rule.yaml +18 -0
  25. package/dist/builtin-rules/ai/flutter/network-auth-flow-risk.prompt.md +57 -0
  26. package/dist/builtin-rules/ai/flutter/network-auth-flow-risk.rule.yaml +19 -0
  27. package/dist/builtin-rules/ai/flutter/ui-responsive-accessibility-risk.prompt.md +60 -0
  28. package/dist/builtin-rules/ai/flutter/ui-responsive-accessibility-risk.rule.yaml +18 -0
  29. package/dist/builtin-rules/ai/general/code-clarity.prompt.md +57 -0
  30. package/dist/builtin-rules/ai/general/code-clarity.rule.yaml +20 -0
  31. package/dist/builtin-rules/ai/spring-boot/business-invariant-risk.prompt.md +86 -0
  32. package/dist/builtin-rules/ai/spring-boot/business-invariant-risk.rule.yaml +25 -0
  33. package/dist/builtin-rules/ai/spring-boot/cache-consistency-risk.prompt.md +80 -0
  34. package/dist/builtin-rules/ai/spring-boot/cache-consistency-risk.rule.yaml +25 -0
  35. package/dist/builtin-rules/ai/spring-boot/cross-feature-error-handling-drift.prompt.md +76 -0
  36. package/dist/builtin-rules/ai/spring-boot/cross-feature-error-handling-drift.rule.yaml +63 -0
  37. package/dist/builtin-rules/ai/spring-boot/cross-feature-transaction-boundary-drift.prompt.md +85 -0
  38. package/dist/builtin-rules/ai/spring-boot/cross-feature-transaction-boundary-drift.rule.yaml +68 -0
  39. package/dist/builtin-rules/ai/spring-boot/error-handling-completeness.prompt.md +121 -0
  40. package/dist/builtin-rules/ai/spring-boot/error-handling-completeness.rule.yaml +84 -0
  41. package/dist/builtin-rules/ai/spring-boot/event-publishing-risk.prompt.md +80 -0
  42. package/dist/builtin-rules/ai/spring-boot/event-publishing-risk.rule.yaml +25 -0
  43. package/dist/builtin-rules/ai/spring-boot/io-boundary-risk.prompt.md +78 -0
  44. package/dist/builtin-rules/ai/spring-boot/io-boundary-risk.rule.yaml +25 -0
  45. package/dist/builtin-rules/ai/spring-boot/ownership-scope-risk.prompt.md +83 -0
  46. package/dist/builtin-rules/ai/spring-boot/ownership-scope-risk.rule.yaml +25 -0
  47. package/dist/builtin-rules/ai/spring-boot/pagination-risk.prompt.md +81 -0
  48. package/dist/builtin-rules/ai/spring-boot/pagination-risk.rule.yaml +25 -0
  49. package/dist/builtin-rules/ai/spring-boot/security-authorization-risk.prompt.md +75 -0
  50. package/dist/builtin-rules/ai/spring-boot/security-authorization-risk.rule.yaml +26 -0
  51. package/dist/builtin-rules/ai/spring-boot/security-mass-assignment-risk.prompt.md +75 -0
  52. package/dist/builtin-rules/ai/spring-boot/security-mass-assignment-risk.rule.yaml +24 -0
  53. package/dist/builtin-rules/ai/spring-boot/security-redirect-risk.prompt.md +74 -0
  54. package/dist/builtin-rules/ai/spring-boot/security-redirect-risk.rule.yaml +24 -0
  55. package/dist/builtin-rules/ai/spring-boot/security-sensitive-data-risk.prompt.md +75 -0
  56. package/dist/builtin-rules/ai/spring-boot/security-sensitive-data-risk.rule.yaml +25 -0
  57. package/dist/builtin-rules/ai/spring-boot/transaction-loop-risk.prompt.md +78 -0
  58. package/dist/builtin-rules/ai/spring-boot/transaction-loop-risk.rule.yaml +25 -0
  59. package/dist/builtin-rules/static/angular/component-prefix.rule.js +78 -0
  60. package/dist/builtin-rules/static/angular/image-control-alt-required.rule.js +105 -0
  61. package/dist/builtin-rules/static/angular/img-alt-required.rule.js +96 -0
  62. package/dist/builtin-rules/static/angular/inject-pattern.rule.js +47 -0
  63. package/dist/builtin-rules/static/angular/lifecycle-method-required.rule.js +59 -0
  64. package/dist/builtin-rules/static/angular/no-any-type.rule.yaml +55 -0
  65. package/dist/builtin-rules/static/angular/no-direct-dom-access.rule.js +191 -0
  66. package/dist/builtin-rules/static/angular/no-dom-xss.rule.js +48 -0
  67. package/dist/builtin-rules/static/angular/no-leaky-subscription.rule.js +197 -0
  68. package/dist/builtin-rules/static/angular/no-ngmodule.rule.yaml +44 -0
  69. package/dist/builtin-rules/static/angular/no-non-null-asserted-optional-chain.rule.js +53 -0
  70. package/dist/builtin-rules/static/angular/no-uncalled-signal-in-condition.rule.js +112 -0
  71. package/dist/builtin-rules/static/angular/observable-naming.rule.js +85 -0
  72. package/dist/builtin-rules/static/angular/onpush-required.rule.js +70 -0
  73. package/dist/builtin-rules/static/angular/standalone-component-required.rule.js +65 -0
  74. package/dist/builtin-rules/static/angular/template-dom-xss.rule.js +112 -0
  75. package/dist/builtin-rules/static/angular/template-syntax-modern.rule.js +154 -0
  76. package/dist/builtin-rules/static/angular/trackby-required.rule.js +66 -0
  77. package/dist/builtin-rules/static/flutter/android-exported-component.rule.js +75 -0
  78. package/dist/builtin-rules/static/flutter/android-manifest-hardening.rule.js +117 -0
  79. package/dist/builtin-rules/static/flutter/android-sensitive-permissions.rule.js +87 -0
  80. package/dist/builtin-rules/static/flutter/debug-tooling-release-risk.rule.js +90 -0
  81. package/dist/builtin-rules/static/flutter/dynamic-archive-risk.rule.js +96 -0
  82. package/dist/builtin-rules/static/flutter/hive-sensitive-storage.rule.js +77 -0
  83. package/dist/builtin-rules/static/flutter/ios-privacy-hardening.rule.js +119 -0
  84. package/dist/builtin-rules/static/flutter/packaged-env-risk.rule.js +95 -0
  85. package/dist/builtin-rules/static/flutter/sensitive-log-leak.rule.js +94 -0
  86. package/dist/builtin-rules/static/flutter/webview-bridge-guard.rule.js +102 -0
  87. package/dist/builtin-rules/static/general/file-too-long.rule.js +41 -0
  88. package/dist/builtin-rules/static/general/function-too-long.rule.js +72 -0
  89. package/dist/builtin-rules/static/general/no-circular-import.rule.js +39 -0
  90. package/dist/builtin-rules/static/general/no-code-injection.rule.js +48 -0
  91. package/dist/builtin-rules/static/general/no-console-log.rule.js +110 -0
  92. package/dist/builtin-rules/static/general/no-empty-catch.rule.yaml +56 -0
  93. package/dist/builtin-rules/static/general/no-hardcoded-secret.rule.js +517 -0
  94. package/dist/builtin-rules/static/general/no-magic-number.rule.js +78 -0
  95. package/dist/builtin-rules/static/general/no-open-redirect.rule.js +46 -0
  96. package/dist/builtin-rules/static/general/no-todo-comment.rule.yaml +30 -0
  97. package/dist/builtin-rules/static/general/no-unresolved-import-symbol.rule.js +80 -0
  98. package/dist/builtin-rules/static/general/no-unused-export.rule.js +140 -0
  99. package/dist/builtin-rules/static/spring-boot/no-autowired-field.rule.js +162 -0
  100. package/dist/builtin-rules/static/spring-boot/no-business-logic-in-controller.rule.js +94 -0
  101. package/dist/builtin-rules/static/spring-boot/no-command-injection.rule.js +47 -0
  102. package/dist/builtin-rules/static/spring-boot/no-entity-in-controller.rule.yaml +52 -0
  103. package/dist/builtin-rules/static/spring-boot/no-nplus1-query-in-loop.rule.js +106 -0
  104. package/dist/builtin-rules/static/spring-boot/no-path-traversal.rule.js +47 -0
  105. package/dist/builtin-rules/static/spring-boot/no-spel-injection.rule.js +41 -0
  106. package/dist/builtin-rules/static/spring-boot/no-sql-string-concat.rule.js +194 -0
  107. package/dist/builtin-rules/static/spring-boot/no-ssrf.rule.js +49 -0
  108. package/dist/builtin-rules/static/spring-boot/no-transactional-self-invocation.rule.js +142 -0
  109. package/dist/builtin-rules/static/spring-boot/no-unclosed-resource.rule.js +108 -0
  110. package/dist/builtin-rules/static/spring-boot/no-unsafe-shared-formatter.rule.js +118 -0
  111. package/dist/builtin-rules/static/spring-boot/repository-naming.rule.yaml +42 -0
  112. package/dist/builtin-rules/static/spring-boot/restful-naming.rule.yaml +39 -0
  113. package/dist/builtin-rules/static/spring-boot/transaction-on-service.rule.yaml +58 -0
  114. package/dist/builtin-rules/static/spring-boot/validate-input.rule.js +123 -0
  115. package/dist/builtin-rules/vauthz/static/spring-boot/require-authz-check.rule.js +101 -0
  116. package/dist/index.d.ts +224 -47
  117. package/dist/index.js +1183 -808
  118. package/package.json +3 -2
  119. package/src/migrations/0000_initial.sql +62 -0
  120. package/src/migrations/0001_add_confidence.sql +7 -0
  121. package/src/migrations/0002_add_ai_stats.sql +21 -0
  122. package/src/migrations/0003_add_fix_recipe.sql +29 -0
  123. package/src/migrations/0004_add_ast_graph.sql +61 -0
  124. package/src/migrations/0005_add_project_id.sql +1 -0
  125. package/src/migrations/0006_add_ai_model.sql +5 -0
  126. package/src/migrations/0006_add_rule_results.sql +1 -0
  127. package/src/migrations/0007_add_finding_metadata.sql +4 -0
  128. package/src/migrations/0008_add_coverage.sql +2 -0
  129. package/src/migrations/0009_run_provenance.sql +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-sentinel-cli/code-sentinel-cli",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "AI-assisted code review CLI for Angular, Spring Boot, and Flutter projects.",
@@ -29,7 +29,8 @@
29
29
  },
30
30
  "files": [
31
31
  "dist",
32
- "templates"
32
+ "templates",
33
+ "src/migrations"
33
34
  ],
34
35
  "engines": {
35
36
  "node": ">=22"
@@ -0,0 +1,62 @@
1
+ -- Initial schema for code-sentinel storage.
2
+ -- Phase 6. Hand-written rather than drizzle-kit generated for
3
+ -- predictability; subsequent migrations should be generated.
4
+
5
+ CREATE TABLE IF NOT EXISTS review_runs (
6
+ id TEXT PRIMARY KEY,
7
+ project_path TEXT NOT NULL,
8
+ started_at INTEGER NOT NULL,
9
+ finished_at INTEGER,
10
+ status TEXT NOT NULL CHECK (status IN ('pending', 'running', 'completed', 'failed')),
11
+ total_files INTEGER NOT NULL,
12
+ total_findings INTEGER NOT NULL,
13
+ rule_set_hash TEXT NOT NULL,
14
+ git_ref TEXT,
15
+ ai_provider TEXT
16
+ );
17
+
18
+ CREATE INDEX IF NOT EXISTS review_runs_started_at_idx ON review_runs(started_at DESC);
19
+ CREATE INDEX IF NOT EXISTS review_runs_project_path_idx ON review_runs(project_path);
20
+
21
+ CREATE TABLE IF NOT EXISTS findings (
22
+ id TEXT PRIMARY KEY,
23
+ run_id TEXT NOT NULL REFERENCES review_runs(id) ON DELETE CASCADE,
24
+ rule_id TEXT NOT NULL,
25
+ severity TEXT NOT NULL CHECK (severity IN ('info', 'warning', 'error', 'blocker')),
26
+ message TEXT NOT NULL,
27
+ file TEXT NOT NULL,
28
+ line INTEGER NOT NULL,
29
+ column INTEGER NOT NULL,
30
+ end_line INTEGER,
31
+ end_column INTEGER,
32
+ snippet TEXT,
33
+ suggestion TEXT
34
+ );
35
+
36
+ CREATE INDEX IF NOT EXISTS findings_run_id_idx ON findings(run_id);
37
+ CREATE INDEX IF NOT EXISTS findings_rule_id_idx ON findings(rule_id);
38
+ CREATE INDEX IF NOT EXISTS findings_severity_idx ON findings(severity);
39
+
40
+ CREATE TABLE IF NOT EXISTS ai_cache (
41
+ key TEXT PRIMARY KEY,
42
+ value TEXT NOT NULL,
43
+ expires_at INTEGER,
44
+ created_at INTEGER NOT NULL
45
+ );
46
+ CREATE INDEX IF NOT EXISTS ai_cache_expires_idx ON ai_cache(expires_at);
47
+
48
+ CREATE TABLE IF NOT EXISTS rule_cache (
49
+ key TEXT PRIMARY KEY,
50
+ value TEXT NOT NULL,
51
+ expires_at INTEGER,
52
+ created_at INTEGER NOT NULL
53
+ );
54
+ CREATE INDEX IF NOT EXISTS rule_cache_expires_idx ON rule_cache(expires_at);
55
+
56
+ CREATE TABLE IF NOT EXISTS parse_cache (
57
+ key TEXT PRIMARY KEY,
58
+ value TEXT NOT NULL,
59
+ expires_at INTEGER,
60
+ created_at INTEGER NOT NULL
61
+ );
62
+ CREATE INDEX IF NOT EXISTS parse_cache_expires_idx ON parse_cache(expires_at);
@@ -0,0 +1,7 @@
1
+ -- Phase 11 — add confidence column to findings.
2
+ -- NULL allowed for backward compatibility with pre-1.1.0 rows. New rows
3
+ -- written by 1.1.0+ always populate it (resolved from the rule's
4
+ -- baseConfidence or DEFAULT_FINDING_CONFIDENCE).
5
+
6
+ ALTER TABLE findings ADD COLUMN confidence INTEGER;
7
+ CREATE INDEX IF NOT EXISTS findings_confidence_idx ON findings(confidence);
@@ -0,0 +1,21 @@
1
+ -- Phase 12.6 — add ai_stats_json column to review_runs.
2
+ --
3
+ -- Phase 12.3 introduced ReviewRun.aiStats (run-level AI execution stats:
4
+ -- succeeded/skipped counters + per-rule breakdown + provider). At the
5
+ -- time we deferred the SQLite migration: aiStats was only consumed at
6
+ -- report-render time INSIDE the same `cs review` invocation, so an
7
+ -- in-memory field was sufficient.
8
+ --
9
+ -- Phase 12.6 adds `cs report <run-id> --format <fmt>` which re-renders
10
+ -- a past run from storage. Without this column the AI execution block
11
+ -- would always render empty when re-rendering, defeating the
12
+ -- observability win from 12.3. Persisting as JSON keeps the migration
13
+ -- minimal (no nested tables, no FK churn) and matches the shape that
14
+ -- the JSON + SARIF reporters already emit.
15
+ --
16
+ -- Schema choice: TEXT column holding `JSON.stringify(aiStats)`. NULL
17
+ -- when the run had no AI rules (or for pre-12.6 rows). Decoded back to
18
+ -- AiExecutionStats by the review-store reader; malformed JSON is
19
+ -- treated as absent (defensive — never throw inside findById).
20
+
21
+ ALTER TABLE review_runs ADD COLUMN ai_stats_json TEXT;
@@ -0,0 +1,29 @@
1
+ -- Phase 14.3 — add fix_json column to findings.
2
+ --
3
+ -- Phase 14.3 ships structured auto-fix recipes. A rule's check(ctx) can
4
+ -- attach a FixRecipe to a RawFinding (`{ edits: TextEdit[], safety,
5
+ -- description }`); the executor propagates it through `toFinding`. The
6
+ -- CLI's `cs fix [<run-id>]` command reads recipes off stored findings
7
+ -- and applies them to the working tree.
8
+ --
9
+ -- Why persist instead of regenerate:
10
+ -- - `cs fix <run-id>` replays a past run without re-executing rules
11
+ -- (mirrors the Phase 12.6 `cs report <run-id>` re-render pattern).
12
+ -- - Reports may render across multiple sessions; the `🔧 fixable` badge
13
+ -- in markdown / SARIF `fixes` array depend on having the recipe on
14
+ -- the persisted finding.
15
+ -- - Lazy regeneration would force re-loading the rule set + re-parsing
16
+ -- files — defeats the "replay from store" use case.
17
+ --
18
+ -- Schema choice: TEXT column holding `JSON.stringify(fix)`. NULL when:
19
+ -- - The rule didn't emit a fix for this finding (the common case).
20
+ -- - The row was written by pre-1.5.0 (Phase 14.3) code.
21
+ --
22
+ -- Decoded back to FixRecipe by the review-store reader; malformed JSON
23
+ -- is treated as absent (defensive — same pattern as ai_stats_json in
24
+ -- migration 0002).
25
+ --
26
+ -- No index: queries don't filter on this column. Fix application is by
27
+ -- run-id + per-finding iteration; the existing run_id index covers it.
28
+
29
+ ALTER TABLE findings ADD COLUMN fix_json TEXT;
@@ -0,0 +1,61 @@
1
+ -- Phase 15.3 — add AST dependency graph persistence tables.
2
+ --
3
+ -- Phase 15.0.x → 15.1.x shipped a full AST dependency graph for graph-backed
4
+ -- static rules (no-circular-import, no-unresolved-import-symbol, no-unused-export).
5
+ -- The graph was in-memory only: every `cs review` rebuilt it from scratch.
6
+ -- Phase 15.3 (per ADR-0015) adds incremental rebuild backed by these tables.
7
+ --
8
+ -- Why these tables instead of reusing the (parse | rule | ai) cache namespaces:
9
+ -- - The cache contract is "key → opaque value." A graph is structured + queried
10
+ -- by-path, not by single key. Per-file invalidation requires per-file rows,
11
+ -- not a single blob.
12
+ -- - A dedicated IAstGraphStore port keeps the existing ICacheStore untouched
13
+ -- (in-memory test fakes don't grow graph-aware logic).
14
+ --
15
+ -- Schema choices (ADR-0015 §2):
16
+ -- - project_root prefixes every PK / index — a user can review multiple
17
+ -- projects; rows must not leak across projects.
18
+ -- - symbols_json as TEXT — symbols are small (1-50 per file), always read with
19
+ -- the node, never queried alone. JOIN-free reads + 3× fewer rows than a
20
+ -- child table. Defensive parse pattern (Phase 12.6 ai_stats_json, Phase 14.3
21
+ -- fix_json) already proven.
22
+ -- - schema_version stored PER project_root, not globally — code bumps the
23
+ -- constant when extraction shape changes; on mismatch the wrapper discards
24
+ -- only THAT project's rows + rebuilds.
25
+ -- - Edges are NOT unique-indexed; builder de-dupes in memory before save.
26
+ -- Lookup indexes cover outgoing() (from_path) and incoming() (to_path).
27
+ -- - No weight index; weight is a future ranking hint, not a filter today.
28
+ --
29
+ -- Invalidation flow lives in
30
+ -- packages/parsers/src/ts-morph/incremental-ast-graph-builder.ts. This file
31
+ -- only declares storage shape; never edit a past migration in place.
32
+
33
+ CREATE TABLE ast_graph_nodes (
34
+ project_root TEXT NOT NULL,
35
+ path TEXT NOT NULL,
36
+ language TEXT NOT NULL,
37
+ hash TEXT NOT NULL,
38
+ role TEXT,
39
+ symbols_json TEXT,
40
+ PRIMARY KEY (project_root, path)
41
+ );
42
+
43
+ CREATE TABLE ast_graph_edges (
44
+ project_root TEXT NOT NULL,
45
+ from_path TEXT NOT NULL,
46
+ to_path TEXT NOT NULL,
47
+ kind TEXT NOT NULL,
48
+ symbol TEXT,
49
+ alias TEXT,
50
+ weight INTEGER
51
+ );
52
+
53
+ CREATE INDEX ast_graph_edges_from_idx ON ast_graph_edges (project_root, from_path);
54
+ CREATE INDEX ast_graph_edges_to_idx ON ast_graph_edges (project_root, to_path);
55
+
56
+ CREATE TABLE ast_graph_meta (
57
+ project_root TEXT PRIMARY KEY,
58
+ schema_version INTEGER NOT NULL,
59
+ fingerprint TEXT NOT NULL,
60
+ updated_at INTEGER NOT NULL
61
+ );
@@ -0,0 +1 @@
1
+ ALTER TABLE review_runs ADD COLUMN project_id TEXT NOT NULL DEFAULT 'local-project';
@@ -0,0 +1,5 @@
1
+ -- Add nullable AI model metadata to persisted review runs.
2
+ -- Provider alone is not enough to reproduce or audit AI-backed findings once
3
+ -- a provider hosts multiple model choices.
4
+
5
+ ALTER TABLE review_runs ADD COLUMN ai_model TEXT;
@@ -0,0 +1 @@
1
+ ALTER TABLE review_runs ADD COLUMN rule_results_json TEXT;
@@ -0,0 +1,4 @@
1
+ -- Add optional finding metadata for category/root-cause/profile triage.
2
+ -- Defensive mappers treat NULL or malformed JSON as absent metadata.
3
+
4
+ ALTER TABLE findings ADD COLUMN metadata_json TEXT;
@@ -0,0 +1,2 @@
1
+ -- Phase 07: durable truthful review-profile/scope coverage provenance.
2
+ ALTER TABLE review_runs ADD COLUMN coverage_json TEXT NULL;
@@ -0,0 +1,5 @@
1
+ ALTER TABLE review_runs ADD COLUMN execution_source TEXT;
2
+ ALTER TABLE review_runs ADD COLUMN git_commit TEXT;
3
+ ALTER TABLE review_runs ADD COLUMN effective_config_hash TEXT;
4
+ ALTER TABLE review_runs ADD COLUMN policy_revision TEXT;
5
+ ALTER TABLE review_runs ADD COLUMN duration_ms INTEGER;