Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved findings remain, including a critical persistence issue.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (5)
Concurrent saves can overwrite newer persisted state · New Inherited scenario keys produce invalid scores and wrong defaults · New Failed actions leave orphaned running records · New Null request bodies cause 500 errors instead of client errors · New Default bind address exposes control plane on all interfaces · New
What changed in this PR
Repairs the build path and adds a dependency-free, air-gapped Meteorium control plane with audit persistence and an operator console.
Changes:
- Adds authenticated dataset, simulation, and audit APIs.
- Adds hash-chained persistence and HTTP lifecycle tests.
- Adds a hardened, loopback-only Compose deployment.
| File | Reviewed changes and final findings |
|---|---|
docker-compose.airgap.yml |
Restricted Compose deployment. |
airgap/README.md |
Usage, deployment, and limitation documentation. |
airgap/Dockerfile |
Minimal Node.js container image. |
airgap/control-plane/server.mjs |
Control-plane, execution, persistence, and ledger logic. Findings: spoofable operator attribution (moderate, 1 vote); inherited-property and default handling (moderate, 2 votes); orphaned running records after validation failures (moderate, 3 votes); unsynchronized persistence writes causing data loss (critical, 3 votes); null request bodies causing 500 responses (moderate, 2 votes); default binding to all interfaces (moderate, 2 votes). |
airgap/control-plane/server.test.mjs |
End-to-end HTTP lifecycle tests. |
airgap/control-plane/public/terminal.html |
Operator console. |
airgap/control-plane/package.json |
Dependency-free Node.js project metadata and scripts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| run.completed_at = new Date().toISOString(); | ||
| run.output = output; | ||
| await store.appendEvent({ actor, action: `node.${nodeId}.${command}`, resource: run.id, metadata: { status: run.status } }); | ||
| await store.save(); |
Comment on lines
+172
to
+173
| const scenario = requireString(input?.scenario || "baseline", "scenario", 32).toLowerCase(); | ||
| if (!(scenario in SCENARIO_PREMIUM)) { |
Comment on lines
+225
to
+230
| store.state.runs.push(run); | ||
|
|
||
| let output; | ||
| if (nodeId === "meteorium-ingest") output = registerDataset(input, store.state); | ||
| if (nodeId === "meteorium-score") output = deterministicScore(input, store.state.datasets); | ||
| if (nodeId === "audit-ledger") output = verifyLedger(store.state.ledger); |
Comment on lines
+267
to
+268
| const body = await readJson(request); | ||
| const run = await executeRun(store, runMatch[1], body.command, body.input, actor); |
| if (process.argv[1] === fileURLToPath(import.meta.url)) { | ||
| const { server } = await createApp(); | ||
| const port = Number(process.env.PORT || 8787); | ||
| server.listen(port, "0.0.0.0", () => console.log(`Prexus air-gap control plane listening on ${port}`)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Verified changes
Verification performed
node --testpasses the full HTTP lifecycle: unauthorized request rejection, node discovery, offline dataset registration, simulation, audit verification, and run lookup.Not claimed / not tested
demonstration-only; it is not a calibrated climate-risk model or a replacement for a local, validated Meteorium data/model package.This is a reviewable foundational vertical slice, not a claim of parity with Palantir Foundry.