Skip to content

feat: define atomic capability contract v1 - #9

Closed
2233admin wants to merge 35 commits into
codex/code-intel-trust-boundaryfrom
codex/code-intel-atomic-model
Closed

feat: define atomic capability contract v1#9
2233admin wants to merge 35 commits into
codex/code-intel-trust-boundaryfrom
codex/code-intel-atomic-model

Conversation

@2233admin

Copy link
Copy Markdown
Owner

Stacked on #8. Establishes the Linux-style atomic control-plane contract without claiming runtime decomposition: a Draft-07 envelope schema, Artifact Ref and Snapshot Identity, Effect Boundary, outcome matrix, cross-envelope coherence, ADR/docs, and Windows/macOS/Linux CI guards. Runtime executor, cache, publication, and portable artifact work remain separate LM Wiki atoms.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de0eb895-ba24-414d-8357-af2897724a3b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the Atomic Capability Execution Model (ADR 0009) to establish a stable control-plane contract for independently executable capabilities, including JSON schemas and a PowerShell test script to validate envelope coherence. Feedback on the test script includes addressing cross-platform path compatibility, specifying PowerShell version requirements, preventing array unwrapping in JSON conversion, and correcting a missing comma in an array definition.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +63 to +71
$registryPath = Join-Path $root "orchestration\integrations.json"
$contractPath = Join-Path $root "orchestration\capability-contract.v1.json"
$schemaPath = Join-Path $root "orchestration\schemas\code-intel-capability-envelope.v1.schema.json"
$documentationPaths = @(
(Join-Path $root "CONTEXT.md"),
(Join-Path $root "docs\atomic-development-model.md"),
(Join-Path $root "docs\adr\0009-atomic-capability-execution-model.md"),
(Join-Path $root "docs\code-intel-architecture.md")
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using backslashes (\) in path strings passed to Join-Path will cause cross-platform failures on Linux and macOS, as the backslash is treated as a literal character in the filename rather than a directory separator. Since the PR description explicitly targets Windows, macOS, and Linux CI guards, please use forward slashes (/) in all path strings. PowerShell and .NET automatically normalize forward slashes to backslashes on Windows.

$registryPath = Join-Path $root "orchestration/integrations.json"
$contractPath = Join-Path $root "orchestration/capability-contract.v1.json"
$schemaPath = Join-Path $root "orchestration/schemas/code-intel-capability-envelope.v1.schema.json"
$documentationPaths = @(
    (Join-Path $root "CONTEXT.md"),
    (Join-Path $root "docs/atomic-development-model.md"),
    (Join-Path $root "docs/adr/0009-atomic-capability-execution-model.md"),
    (Join-Path $root "docs/code-intel-architecture.md")
)

Comment on lines +1 to +3
param(
[string]$RepoPath = $PSScriptRoot
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To ensure that this script is only executed in environments that support PowerShell Core (v7.2+), where cmdlets like Test-Json are natively available, it is highly recommended to add a #requires -Version 7.2 statement at the very top of the file. This prevents cryptic 'cmdlet not found' errors when run on older Windows PowerShell 5.1 environments.

#requires -Version 7.2
param(
    [string]$RepoPath = $PSScriptRoot
)

Comment on lines +13 to +16
function ConvertTo-CanonicalFixtureJson {
param([Parameter(Mandatory = $true)]$Value)
return ($Value | ConvertTo-Json -Depth 20 -Compress)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Piping $Value to ConvertTo-Json can cause PowerShell to unwrap single-element arrays, converting them to single JSON objects instead of JSON arrays. To preserve the exact structure of $Value (especially when dealing with collections), use the -InputObject parameter directly instead of the pipeline.

function ConvertTo-CanonicalFixtureJson {
    param([Parameter(Mandatory = $true)]$Value)
    return (ConvertTo-Json -InputObject $Value -Depth 20 -Compress)
}

Comment on lines +243 to +244
@{ name = "result snapshot mismatch"; apply = { param($d, $q, $r) $r.snapshotIdentity = "c" * 64 } }
@{ name = "output artifact snapshot mismatch"; apply = { param($d, $q, $r) $r.artifacts[0].consumedSnapshotIdentity = "c" * 64 } }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a missing comma at the end of line 243, which makes the array definition syntactically inconsistent with the other elements. Adding a comma ensures robust parsing and prevents issues if the array is ever reformatted or joined onto a single line.

    @{ name = "result snapshot mismatch"; apply = { param($d, $q, $r) $r.snapshotIdentity = "c" * 64 } },
    @{ name = "output artifact snapshot mismatch"; apply = { param($d, $q, $r) $r.artifacts[0].consumedSnapshotIdentity = "c" * 64 } }

@2233admin

Copy link
Copy Markdown
Owner Author

Closing after a merge-readiness review at main HEAD 384617f (2026-07-28).

Why close rather than merge:

Salvageable pieces (worth re-doing as small fresh PRs on top of main, if still wanted): the Windows sentrux-shim launch fixes, the doctor-require CLI flags, and the ci.yml fetch-depth tweak.

@2233admin 2233admin closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant