@neurcode/action 0.2.1 → 0.3.0-rc.6

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.
package/README.md CHANGED
@@ -1,88 +1,223 @@
1
- # Neurcode Verify GitHub Action
1
+ # Neurcode Runtime Admission Advisory
2
2
 
3
- Enterprise PR governance action for `neurcode verify`, with optional auto-remediation and merge-confidence publishing.
3
+ **A zero-account, source-free PR triage report for ownership, sensitive surfaces, and runtime admission evidence.**
4
4
 
5
- ## Recommended PR Gate (Deterministic)
5
+ Install one workflow file and get a deterministic GitHub Step Summary that helps maintainers decide where review attention should go. It works for AI-assisted PRs and ordinary PRs.
6
6
 
7
- ```yaml
8
- name: Neurcode Gatekeeper
7
+ No Neurcode account. No API key. No source upload. No telemetry. No local runtime required.
8
+
9
+ ## OSS Maintainer Path
10
+
11
+ Use the Action as a free PR triage layer first:
12
+
13
+ 1. Install the workflow below.
14
+ 2. Open or update a pull request.
15
+ 3. Read the Step Summary for review routing: changed-file count, subsystems, CODEOWNERS zones, sensitive path categories, admission status, and deterministic maintainer questions.
16
+ 4. If your team uses AI coding agents, optionally run a governed local session and commit `.neurcode-admission/*.json` so future PRs show source-free runtime context.
17
+
18
+ Without an account, maintainers still get immediate review-attention signals for CODEOWNERS crossings, CI/workflow files, dependency manifests, lockfiles, auth/config/payment-like paths, database migrations, infrastructure/deploy paths, generated files, and docs-only PRs that should stay quiet when no deterministic routing flag fires.
19
+
20
+ This is not a vulnerability scanner and not a review replacement. It is a source-free way to make "who should look at this PR?" easier to answer.
21
+
22
+ ## What Maintainers Get
23
+
24
+ On every pull request, the Action reports:
9
25
 
26
+ - changed file count and change kinds
27
+ - top-level subsystem reach
28
+ - CODEOWNERS areas and owners crossed, read from the base commit
29
+ - deterministic sensitive path categories such as auth, billing/payment, database/migrations, CI/workflow, infrastructure/deploy, secrets/config, dependency manifests, lockfiles, and generated files
30
+ - optional `.neurcode-admission/*.json` runtime admission context: trust level, governed host, blocked/approved/denied counts, approval-required surfaces, and receipt/integrity status
31
+ - deterministic maintainer questions generated from those facts
32
+
33
+ The report uses review-attention language. It does not claim security vulnerabilities or infer model intent.
34
+
35
+ ## Quick Start
36
+
37
+ ```yaml
38
+ # .github/workflows/neurcode-admission.yml
39
+ name: Neurcode Admission Advisory
10
40
  on:
11
41
  pull_request:
12
42
  types: [opened, synchronize, reopened]
13
-
43
+ permissions:
44
+ contents: read
14
45
  jobs:
15
- governance:
46
+ admission-advisory:
16
47
  runs-on: ubuntu-latest
17
48
  steps:
18
- - uses: actions/checkout@v4
49
+ - uses: actions/checkout@v5
19
50
  with:
20
51
  fetch-depth: 0
52
+ - uses: sujit-jaunjal/neurcode-actions@v0.3.0-rc.5
53
+ ```
21
54
 
22
- - name: Run Neurcode Verification
23
- uses: ./packages/action
24
- env:
25
- NEURCODE_API_URL: https://api.neurcode.com
26
- with:
27
- api_key: ${{ secrets.NEURCODE_API_KEY }}
28
- project_id: ${{ vars.NEURCODE_PROJECT_ID }}
29
- org_id: ${{ vars.NEURCODE_ORG_ID }}
30
- base_ref: 'HEAD~1'
31
- threshold: 'C'
32
- record: 'true'
33
- verify_policy_only: 'true'
34
- changed_files_only: 'true'
35
- auto_remediate: 'true'
36
- remediation_commit: 'false'
37
- remediation_push: 'false'
55
+ That is enough for the standalone report. Runtime admission provenance activates only when a PR includes `.neurcode-admission/*.json`.
56
+
57
+ ## How It Connects To Runtime Governance
58
+
59
+ The free Action helps after code reaches a PR. The Neurcode runtime platform governs before code lands.
60
+
61
+ | Layer | What it does | Account required | Trust boundary |
62
+ |---|---|---:|---|
63
+ | Action alone | Deterministic PR review routing from git metadata, CODEOWNERS, path categories, and optional admission artifacts. | No | Source-free, advisory, no telemetry. |
64
+ | Action + runtime admission record | Shows that the PR includes source-free runtime context from a governed local session. | No for the Action | Trust level is explicit: `self_attested`, `unsigned_local`, or `backend_signed` when a signed receipt is attached. |
65
+ | Full Neurcode runtime platform | Governs live AI coding sessions with source-free intent summaries, exact-path approvals, ownership boundaries, dashboard workflow, and backend receipts where configured. | Yes | Runtime evidence remains source-free; backend-signed receipts are stronger than self-attested records but still must be verified. |
66
+
67
+ Common PR states:
68
+
69
+ - **Without runtime:** the report says `no_record - no self-attested record attached`. That is normal for ordinary PRs.
70
+ - **With runtime:** the report can say `self_attested_complete`, `self_attested_incomplete`, or `self_attested_inconsistent` and show covered/uncovered path counts.
71
+ - **With backend receipts:** the report can label runtime context `backend_signed` only when signed receipt metadata is attached. Self-attested records remain claims.
72
+
73
+ ## Export A Runtime Admission Record
74
+
75
+ Use this when a PR was produced from a governed Neurcode runtime session:
76
+
77
+ ```bash
78
+ # 1. Run a governed AI coding session locally.
79
+ # 2. Finish the session, or keep it active if you want to export current context.
80
+ neurcode session export-admission
81
+
82
+ # 3. Commit the source-free PR artifact.
83
+ git add .neurcode-admission/*.json
84
+ git commit -m "Add Neurcode runtime admission context"
38
85
  ```
39
86
 
40
- ## Inputs (Common)
87
+ You can also export a selected session:
88
+
89
+ ```bash
90
+ neurcode session export-admission <sessionId>
91
+ # equivalent legacy form:
92
+ neurcode admission export <sessionId>
93
+ ```
94
+
95
+ The artifact is written to `.neurcode-admission/<sessionId>.json`. It contains paths, owners, counts, hashes, trust level, runtime host metadata, approval-required surfaces, and receipt/integrity status. It must not contain source code, diff hunks, patch bodies, shell command bodies, secrets, or raw prompts.
96
+
97
+ ## Report Shape
98
+
99
+ The GitHub Step Summary is organized for PR triage:
100
+
101
+ - **Maintainer read this first**: compact table with changed files, subsystems, sensitive surfaces, CODEOWNERS status, admission status, and review routing cue.
102
+ - **Review routing**: ownership zones, owner tokens, unowned paths, no-CODEOWNERS state, and degraded CODEOWNERS diagnostics.
103
+ - **Sensitive surfaces**: path/category hits only, capped with `+N more`.
104
+ - **Subsystem reach**: ranked top-level directories.
105
+ - **Runtime admission provenance**: `no_record`, `self_attested_complete`, `self_attested_incomplete`, or `self_attested_inconsistent`, explained in plain English.
106
+ - **Runtime admission context**: whether a record was found, trust level, session count, governed host, blocked/approved/denied counts, approval-required surfaces, and receipt/integrity status.
107
+ - **Suggested maintainer questions**: deterministic questions such as "This PR touches CI or workflow files. Should workflow changes be reviewed separately?"
108
+ - **Trust boundary**: always present.
109
+
110
+ Every line is traceable to paths, git modes, blob object IDs, CODEOWNERS metadata, file categories, changed-file status, or deterministic hashes. There is no AI inference in the report.
111
+
112
+ ## Inputs
41
113
 
42
- | Input | Description | Default |
114
+ | Input | Default | Description |
43
115
  |---|---|---|
44
- | `api_key` | Neurcode API key for verify/ship in CI | `''` |
45
- | `project_id` | Neurcode project id for cloud-linked workflows | `''` |
46
- | `org_id` | Optional org id for CI auth scoping | `''` |
47
- | `base_ref` | Override verify base ref (`origin/main`, `HEAD~1`, etc.) | `''` |
48
- | `record` | Record verification to Neurcode cloud | `true` |
49
- | `threshold` | Minimum acceptable grade (`A`/`B`/`C`/`D`/`F`) | `C` |
50
- | `verify_policy_only` | Run `neurcode verify --policy-only` | `false` |
51
- | `changed_files_only` | Enforce only violations from changed files in this PR/base diff | `false` |
52
- | `enforce_strict_verification` | Treat tier-limited `INFO` as failure | `false` |
53
- | `auto_remediate` | Run `neurcode ship` when verify fails | `false` |
54
- | `remediation_commit` | Create remediation commit on success | `false` |
55
- | `remediation_push` | Push remediation commit to PR branch | `false` |
56
- | `verify_after_remediation` | Re-run verify after remediation | `true` |
57
-
58
- See `action.yml` for full advanced inputs (timeouts, retries, CLI source/version, commit metadata).
116
+ | `policy` | `advisory` | `advisory` never blocks. `strict_self_attested` is experimental and may fail on incomplete/inconsistent self-attested records. |
117
+ | `no_record_strict` | `false` | In strict mode, fail when no admission record exists. |
118
+ | `max_artifacts` | `256` | Maximum `.neurcode-admission/*.json` files to process. |
119
+ | `max_aggregate_bytes` | `16777216` | Maximum aggregate artifact bytes. |
120
+
121
+ Base and head SHAs are resolved from `github.event.pull_request`. There are no SHA override inputs.
59
122
 
60
123
  ## Outputs
61
124
 
62
- | Output | Meaning |
125
+ Existing outputs are preserved:
126
+
127
+ | Output | Description |
128
+ |---|---|
129
+ | `effect_count` | Number of files in the committed delta. |
130
+ | `subsystems` | Comma-separated top-level directories touched. |
131
+ | `sensitive_surfaces` | Comma-separated sensitive surface categories. |
132
+ | `codeowners_zones_crossed` | Distinct CODEOWNERS ownership zones crossed. |
133
+ | `codeowners_changed` | `true` when CODEOWNERS itself appears in the delta. |
134
+ | `admission_verdict` | `self_attested_complete`, `self_attested_incomplete`, `self_attested_inconsistent`, or `no_record`. |
135
+ | `covered_paths_count` | Changed paths with strict-admissible admission coverage. |
136
+ | `uncovered_paths_count` | Changed paths without admission coverage. |
137
+ | `record_count` | Total admission artifacts discovered. |
138
+ | `usable_record_count` | Artifacts passing bounded parsing and consistency checks. |
139
+ | `runtime_admission_found` | `true` when `.neurcode-admission` metadata was present. |
140
+ | `runtime_admission_trust_level` | `none`, `unsigned_local`, `self_attested`, `backend_signed`, or `mixed`. |
141
+ | `runtime_admission_session_count` | Governed runtime sessions represented by usable admission records. |
142
+ | `runtime_admission_blocked_count` | Paths blocked during represented runtime sessions. |
143
+ | `runtime_admission_approved_count` | Exact paths approved during represented runtime sessions. |
144
+ | `runtime_admission_denied_count` | Denied paths in represented runtime sessions. |
145
+ | `runtime_admission_receipt_status` | Source-free receipt posture: `not_present`, `local_self_attested`, `valid`, `unverifiable`, `backend_signed`, or `mixed`. |
146
+ | `action_blocked` | `true` only in strict mode when admission failed. |
147
+
148
+ The older `runtime_blocked_paths_count`, `runtime_approved_paths_count`, and
149
+ `runtime_denied_paths_count` aliases are retained for RC5 compatibility.
150
+
151
+ New maintainer-report outputs:
152
+
153
+ | Output | Description |
63
154
  |---|---|
64
- | `verdict` | Verification verdict |
65
- | `verify_mode` | Effective verify mode (`plan_aware`, `plan_enforced_explicit`, `policy_only`, `policy_only_fallback`) |
66
- | `policy_only_fallback_used` | `true` if missing plan context triggered policy-only retry |
67
- | `grade` | Verification grade |
68
- | `score` | Verification score |
69
- | `violations` | Violation count |
70
- | `verification_tier` | Reported tier (if present) |
71
- | `tier_limited` | `true` if verify result is tier-limited |
72
- | `threshold` | Threshold used by action |
73
- | `threshold_passed` | `true` / `false` / `unknown` |
74
- | `remediation_status` | `READY_TO_MERGE` or `BLOCKED` (when remediation runs) |
75
- | `merge_confidence` | Merge confidence from ship summary |
76
- | `share_card_url` | Public merge confidence card URL (when available) |
77
- | `remediation_commit_created` | Whether remediation commit was created |
78
- | `remediation_commit_pushed` | Whether remediation commit was pushed |
79
- | `remediation_commit_sha` | Commit SHA when a remediation commit is created |
80
-
81
- ## Safety Defaults
82
-
83
- - Use `verify_policy_only: true` for stable PR governance checks.
84
- - Without explicit `plan_id`, the action runs plan-aware mode first and automatically retries in policy-only mode only when the verify failure is strictly "missing plan context".
85
- - Use `changed_files_only: true` to avoid blocking on historical repository debt.
86
- - Use `base_ref: HEAD~1` for incremental adoption on long-lived branches with legacy violations.
87
- - Keep `remediation_commit` and `remediation_push` disabled in shared CI.
88
- - Enable commit/push only in a dedicated remediation workflow where branch mutation is expected.
155
+ | `review_attention` | `simple`, `manual_routing`, or `needs_attention`. |
156
+ | `maintainer_questions_count` | Number of deterministic maintainer questions generated. |
157
+ | `sensitive_surface_count` | Number of distinct sensitive surface categories detected. |
158
+
159
+ ## Runtime Admission Provenance
160
+
161
+ Runtime admission records are optional. They are source-free JSON files under `.neurcode-admission/*.json`.
162
+
163
+ Export commands:
164
+
165
+ ```bash
166
+ neurcode session export-admission
167
+ neurcode session export-admission <sessionId>
168
+ neurcode session export-admission <sessionId> --receipt receipt.json
169
+ ```
170
+
171
+ `--receipt` attaches source-free backend receipt metadata when you already have a Neurcode runtime receipt JSON. The admission artifact includes receipt ID, key ID, replay hash, signature status, verification status, signed timestamp, and verifier hint, never the full receipt body or signature.
172
+
173
+ Possible verdicts:
174
+
175
+ - `no_record`: no record is attached.
176
+ - `self_attested_complete`: usable records claim coverage for every changed path.
177
+ - `self_attested_incomplete`: usable records claim coverage for only part of the changed path set.
178
+ - `self_attested_inconsistent`: records are malformed or inconsistent with committed git metadata.
179
+
180
+ If no files exist, the report says: "No runtime admission record found. This report is PR metadata only."
181
+
182
+ Self-attested provenance is a claim by the PR author, not cryptographic proof and not enterprise signed evidence. Backend-signed context is displayed only when signed receipt metadata is attached and should be verified before being treated as enterprise evidence.
183
+
184
+ ## Strict Self-Attested Mode
185
+
186
+ ```yaml
187
+ - uses: sujit-jaunjal/neurcode-actions@v0.3.0-rc.5
188
+ with:
189
+ policy: strict_self_attested
190
+ no_record_strict: 'false'
191
+ ```
192
+
193
+ This mode is experimental. It can block on self-attested incomplete or inconsistent records. It is not a trusted branch-protection gate and not a replacement for enterprise-grade signed receipts.
194
+
195
+ ## Trust Boundary
196
+
197
+ - Fork-safe: no secrets required and `pull_request_target` is rejected.
198
+ - Source-free: paths, modes, blob object IDs, CODEOWNERS metadata, categories, and deterministic hashes only.
199
+ - No source content, diff hunks, prompts, patches, or secrets are uploaded or rendered.
200
+ - CODEOWNERS is read from the base commit, never the PR head.
201
+ - Unsupported CODEOWNERS syntax is reported as degraded analysis instead of guessed.
202
+ - Advisory by default.
203
+
204
+ ## Evaluation Harness
205
+
206
+ Run the source-free OSS evaluation harness:
207
+
208
+ ```bash
209
+ pnpm --filter @neurcode/action build
210
+ node packages/action/evaluation/oss-report-harness.mjs
211
+ ```
212
+
213
+ The harness runs controlled OSS-style PR scenarios, scores the report as ACTIONABLE, OBVIOUS, or NOISE, and writes `packages/action/evaluation/latest-report.md`.
214
+
215
+ ## Preserved Installation Path
216
+
217
+ The `sujit-jaunjal/neurcode-actions@v0.2.4` release remains available and untouched. `v0.3.0-rc.5` is the current rehearsal ref for runtime admission bridge behavior after live Airflow fork rehearsal.
218
+
219
+ ## Adoption Bridge Docs
220
+
221
+ - [OSS maintainer path](./oss-public/docs/oss-maintainer-path.md)
222
+ - [Runtime admission demo story](./oss-public/docs/runtime-admission-demo-story.md)
223
+ - [Maintainer outreach ask](./oss-public/docs/maintainer-outreach.md)
package/action.yml CHANGED
@@ -1,217 +1,113 @@
1
- name: 'Neurcode Verify'
2
- description: 'Gatekeeper action that runs neurcode verify and fails the build if code adherence grade is below threshold'
1
+ name: 'Neurcode - Runtime Admission Advisory'
2
+ description: >
3
+ Zero-account, source-free PR triage report for ownership, sensitive surfaces,
4
+ subsystem reach, and optional runtime admission evidence. No account,
5
+ API key, source upload, telemetry, or local runtime required. Self-attested
6
+ provenance is a claim, backend-signed context must be verified, and the Action is
7
+ advisory-only by default - never blocks.
3
8
  author: 'Neurcode'
4
9
  branding:
5
- icon: 'shield-check'
10
+ icon: 'shield'
6
11
  color: 'blue'
7
12
 
8
13
  inputs:
9
- threshold:
10
- description: 'Minimum passing grade (A, B, C, D, F). Default: C'
14
+ policy:
15
+ description: >
16
+ admission-gate policy. "advisory" (default) - step summary only, never fails the
17
+ job. "strict_self_attested" - experimental; may fail on incomplete/inconsistent
18
+ records (clearly labelled as NOT enterprise proof, NOT a trusted gate).
11
19
  required: false
12
- default: 'C'
13
- github_token:
14
- description: 'GitHub Token for posting PR comments. Pass github.token from the workflow.'
15
- required: false
16
- default: ''
17
- annotate:
18
- description: 'Post inline annotations on the PR for each violation (file + line)'
19
- required: false
20
- default: 'true'
21
- api_key:
22
- description: 'Neurcode API Key for recording results to Neurcode Cloud'
23
- required: false
24
- default: ''
25
- record:
26
- description: 'Enable reporting verification results to Neurcode Cloud'
27
- required: false
28
- default: 'true'
29
- working_directory:
30
- description: 'Directory where to run the neurcode verify command'
31
- required: false
32
- default: '.'
33
- base_ref:
34
- description: 'Override base ref for verify diff (e.g., origin/main, HEAD~1)'
35
- required: false
36
- default: ''
37
- plan_id:
38
- description: 'Plan ID to verify against (optional, will use from config if not provided)'
39
- required: false
40
- default: ''
41
- project_id:
42
- description: 'The Neurcode Project ID (Optional if config file exists)'
43
- required: false
44
- default: ''
45
- org_id:
46
- description: 'Optional organization ID used to scope CI auth when login state is unavailable'
47
- required: false
48
- default: ''
49
- neurcode_cli_version:
50
- description: 'npm version specifier for @neurcode-ai/cli (e.g. "latest", "0.8.13", "^0.8")'
51
- required: false
52
- default: 'latest'
53
- neurcode_cli_source:
54
- description: 'CLI install source: npm (registry) or workspace (local packages/cli in current repo)'
55
- required: false
56
- default: 'npm'
57
- neurcode_cli_workspace_path:
58
- description: 'Workspace path used when neurcode_cli_source=workspace'
59
- required: false
60
- default: 'packages/cli'
61
- verify_timeout_minutes:
62
- description: 'Timeout for neurcode verify command in minutes (Linux/macOS runners)'
63
- required: false
64
- default: '8'
65
- verify_policy_only:
66
- description: 'Run neurcode verify in policy-only mode (skip plan/scope enforcement)'
67
- required: false
68
- default: 'false'
69
- compiled_policy_path:
70
- description: 'Compiled policy artifact path passed to neurcode verify'
71
- required: false
72
- default: 'neurcode.policy.compiled.json'
73
- change_contract_path:
74
- description: 'Change contract path passed to neurcode verify'
75
- required: false
76
- default: '.neurcode/change-contract.json'
77
- enforce_change_contract:
78
- description: 'Treat change contract drift as hard verification failure'
79
- required: false
80
- default: 'false'
81
- changed_files_only:
82
- description: 'Only enforce violations detected in files changed by this PR/base diff'
83
- required: false
84
- default: 'false'
85
- fail_on_violation:
86
- description: 'Fail the build if violations are found'
87
- required: false
88
- default: 'true'
89
- enforce_strict_verification:
90
- description: 'Treat tier-limited INFO verification results as failure (enterprise trust mode)'
91
- required: false
92
- default: 'false'
93
- auto_remediate:
94
- description: 'When verify fails, run neurcode ship auto-remediation flow'
95
- required: false
96
- default: 'false'
97
- remediation_goal:
98
- description: 'Optional explicit goal passed to neurcode ship for auto-remediation'
99
- required: false
100
- default: ''
101
- remediation_max_attempts:
102
- description: 'Maximum ship remediation attempts when auto_remediate=true'
103
- required: false
104
- default: '2'
105
- remediation_skip_tests:
106
- description: 'Skip tests during remediation ship run'
107
- required: false
108
- default: 'true'
109
- remediation_allow_dirty:
110
- description: 'Allow dirty tree during remediation ship run'
111
- required: false
112
- default: 'true'
113
- publish_merge_card:
114
- description: 'Publish merge confidence card during remediation ship run'
115
- required: false
116
- default: 'true'
117
- ship_test_command:
118
- description: 'Optional test command override for neurcode ship remediation'
119
- required: false
120
- default: ''
121
- ship_timeout_minutes:
122
- description: 'Timeout for neurcode ship remediation command in minutes (Linux/macOS runners)'
123
- required: false
124
- default: '20'
125
- ship_network_retries:
126
- description: 'Additional retries for neurcode ship when transient network errors occur'
127
- required: false
128
- default: '1'
129
- ship_network_retry_delay_seconds:
130
- description: 'Delay between neurcode ship network retries in seconds'
131
- required: false
132
- default: '5'
133
- verify_after_remediation:
134
- description: 'Run neurcode verify again after auto-remediation succeeds'
135
- required: false
136
- default: 'true'
137
- verify_after_remediation_timeout_minutes:
138
- description: 'Timeout for post-remediation neurcode verify command in minutes'
139
- required: false
140
- default: '8'
141
- remediation_commit:
142
- description: 'When auto-remediation succeeds, create a commit with generated fixes (same-repo PRs only)'
143
- required: false
144
- default: 'false'
145
- remediation_push:
146
- description: 'Push remediation commit back to PR branch (requires write permissions and same-repo PR)'
20
+ default: 'advisory'
21
+
22
+ no_record_strict:
23
+ description: >
24
+ In strict_self_attested mode, fail when no .neurcode-admission/*.json record is
25
+ present. Default false - no_record is reported but does not block.
147
26
  required: false
148
27
  default: 'false'
149
- require_remediation_push_success:
150
- description: 'Fail the action when remediation push is enabled but commit cannot be pushed'
28
+
29
+ require_signed_evidence:
30
+ description: >
31
+ Optional strict AI Change Record evidence mode. When true, fail if
32
+ .neurcode-ai-record/*.json is missing, invalid, or lacks a receipt that
33
+ the runner can verify with NEURCODE_AI_CHANGE_RECORD_SIGNING_SECRET and
34
+ NEURCODE_AI_CHANGE_RECORD_SIGNING_KEY_ID.
35
+ Default false keeps the Action advisory-only.
151
36
  required: false
152
37
  default: 'false'
153
- remediation_push_retries:
154
- description: 'Additional retries for remediation push on non-fast-forward races'
155
- required: false
156
- default: '2'
157
- remediation_push_retry_delay_seconds:
158
- description: 'Delay between remediation push retries in seconds'
159
- required: false
160
- default: '2'
161
- remediation_commit_message:
162
- description: 'Commit message used when remediation_commit=true'
163
- required: false
164
- default: 'chore(neurcode): auto-remediate verify failures'
165
- remediation_git_user_name:
166
- description: 'Git user.name for remediation commits'
38
+
39
+ max_artifacts:
40
+ description: 'Maximum number of .neurcode-admission/*.json files to process.'
167
41
  required: false
168
- default: 'neurcode-bot'
169
- remediation_git_user_email:
170
- description: 'Git user.email for remediation commits'
42
+ default: '256'
43
+
44
+ max_aggregate_bytes:
45
+ description: 'Maximum aggregate byte size of all artifact files (bytes).'
171
46
  required: false
172
- default: 'neurcode-bot@users.noreply.github.com'
47
+ default: '16777216'
173
48
 
174
49
  outputs:
175
- verdict:
176
- description: 'neurcode verify verdict'
177
- verify_mode:
178
- description: 'verification mode used by action (plan_aware|plan_enforced_explicit|policy_only|policy_only_fallback)'
179
- policy_only_fallback_used:
180
- description: 'true when action retried verify in policy-only mode due to missing plan context'
181
- grade:
182
- description: 'neurcode verify grade'
183
- score:
184
- description: 'neurcode verify score'
185
- violations:
186
- description: 'total violation count'
187
- risk_level:
188
- description: 'blast radius risk level'
189
- suspicious_change_flagged:
190
- description: 'whether suspicious change detector was triggered'
191
- governance_decision:
192
- description: 'governance decision matrix outcome'
193
- average_relevance_score:
194
- description: 'average per-file AI relevance score'
195
- ai_change_log_integrity_valid:
196
- description: 'true when signed/tamper checks passed for AI change log'
197
- ai_change_log_signed:
198
- description: 'true when AI change log is cryptographically signed'
199
- org_manual_approval_required:
200
- description: 'true when org governance requires manual approvals'
201
- org_minimum_manual_approvals:
202
- description: 'minimum distinct manual approvers required by org governance'
203
- policy_compilation_fingerprint:
204
- description: 'compiled policy fingerprint used during verify'
205
- policy_compilation_rule_count:
206
- description: 'deterministic rule count in compiled policy'
207
- change_contract_exists:
208
- description: 'true when a change contract artifact was present'
209
- change_contract_valid:
210
- description: 'true when evaluated change contract passed'
211
- change_contract_enforced:
212
- description: 'true when change contract drift was configured as hard-fail'
213
- change_contract_id:
214
- description: 'content-derived identifier of the active change contract'
50
+ # ── Layer 1: standalone effect inventory ─────────────────────────────────
51
+ effect_count:
52
+ description: 'Number of files in the committed PR delta (admission support artifacts excluded).'
53
+ subsystems:
54
+ description: 'Comma-separated list of top-level subsystems/directories touched.'
55
+ sensitive_surfaces:
56
+ description: 'Comma-separated sensitive surface categories detected (e.g. migrations,CI).'
57
+ sensitive_surface_count:
58
+ description: 'Number of distinct sensitive surface categories detected.'
59
+ codeowners_zones_crossed:
60
+ description: 'Number of distinct CODEOWNERS ownership zones crossed by this PR.'
61
+ codeowners_changed:
62
+ description: 'true when CODEOWNERS itself appears in the PR delta.'
63
+ review_attention:
64
+ description: 'Deterministic routing summary: simple, manual_routing, or needs_attention.'
65
+ maintainer_questions_count:
66
+ description: 'Number of deterministic maintainer questions generated in the step summary.'
67
+
68
+ # ── Layer 2: runtime-aware admission ─────────────────────────────────────
69
+ admission_verdict:
70
+ description: >
71
+ Admission verdict: self_attested_complete | self_attested_incomplete |
72
+ self_attested_inconsistent | no_record.
73
+ covered_paths_count:
74
+ description: 'Number of changed paths with strict-admissible governance coverage.'
75
+ uncovered_paths_count:
76
+ description: 'Number of changed paths without admission coverage.'
77
+ record_count:
78
+ description: 'Total .neurcode-admission/*.json files discovered.'
79
+ usable_record_count:
80
+ description: 'Records that passed bounded parsing and internal consistency checks.'
81
+ runtime_admission_found:
82
+ description: 'true when .neurcode-admission metadata was present in the PR head tree.'
83
+ runtime_admission_trust_level:
84
+ description: 'Runtime context trust level: none | unsigned_local | self_attested | backend_signed | mixed.'
85
+ runtime_admission_session_count:
86
+ description: 'Number of governed runtime sessions represented by usable admission records.'
87
+ runtime_admission_blocked_count:
88
+ description: 'Source-free count of paths blocked during represented runtime sessions.'
89
+ runtime_admission_approved_count:
90
+ description: 'Source-free count of exact paths approved during represented runtime sessions.'
91
+ runtime_admission_denied_count:
92
+ description: 'Source-free count of denied paths in represented runtime sessions.'
93
+ runtime_admission_receipt_status:
94
+ description: 'Source-free receipt posture: not_present | local_self_attested | valid | unverifiable | backend_signed | mixed.'
95
+ ai_change_record_found:
96
+ description: 'true when .neurcode-ai-record/*.json source-free AI Change Record evidence was discovered.'
97
+ ai_change_record_trust_level:
98
+ description: 'AI Change Record trust posture: none | self_attested | backend_signed_unverified | backend_signed_verified | backend_signed_invalid | mixed.'
99
+ ai_change_record_receipt_status:
100
+ description: 'AI Change Record receipt verification posture: not_present | valid | unverifiable | tampered | unsigned | mixed.'
101
+ runtime_blocked_paths_count:
102
+ description: 'Deprecated alias for runtime_admission_blocked_count.'
103
+ runtime_approved_paths_count:
104
+ description: 'Deprecated alias for runtime_admission_approved_count.'
105
+ runtime_denied_paths_count:
106
+ description: 'Deprecated alias for runtime_admission_denied_count.'
107
+
108
+ # ── Policy outcome ────────────────────────────────────────────────────────
109
+ action_blocked:
110
+ description: 'true only when policy=strict_self_attested and admission failed. Always false in advisory mode.'
215
111
 
216
112
  runs:
217
113
  using: 'node24'