Skip to content

Commit c98abc6

Browse files
hyperpolymathclaude
andcommitted
refactor(arch): architectural reconciliation — compose profiles, TOML parsers, SPDX, pipeline fix
- Split selur-compose.yml into two profiles: default (6 trust-pipeline services) and container-security (4 opt-in services: svalinn/selur/vordr/cerro-torre) - Delete duplicate native/pq_crypto NIF crate; canonical NIF is opsm_pq_nif - Replace naive line-splitting TOML parsers in 9 registry adapters (betlang, ephapax, tangle, wokelang, julia_the_viper, eclexia, my_lang, error_lang, oblibeny) with Opsm.Manifest.OpsmToml.parse/1 - Replace line-splitting parse_workspace_members/1 in cli.ex with Toml.decode/1 - Fix pre-existing crash in trust/pipeline.ex: get_in on {:info, tuple} fails for slsa_level and pq_signed fields; replace with extract_slsa_level/1 and extract_pq_signed/1 pattern-matching helpers - Retag NIF integration tests as :requires_nif; exclude from default test run - Fix 57 source files with bare PMPL-1.0 SPDX headers (missing -or-later) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0b0a8f4 commit c98abc6

101 files changed

Lines changed: 370 additions & 869 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

opsm_ex/lib/opsm/api/nickel.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.Api.Nickel do
33
@moduledoc """
44
Nickel decoding support for API payloads.

opsm_ex/lib/opsm/api/router.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.Api.Router do
33
@moduledoc """
44
Minimal REST API for OPSM UI integration.

opsm_ex/lib/opsm/api/server.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.Api.Server do
33
@moduledoc """
44
Local API server for OPSM UI integration.

opsm_ex/lib/opsm/application.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.Application do
33
@moduledoc """
44
OTP application entrypoint. Starts the registry gateway HTTP server.

opsm_ex/lib/opsm/cache.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.Cache do
33
@moduledoc """
44
ETS-based cache for registry responses.

opsm_ex/lib/opsm/cli.ex

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.CLI do
33
@moduledoc """
44
CLI entry point for OPSM - Odds-and-sods Package Manager.
@@ -2144,25 +2144,11 @@ defmodule Opsm.CLI do
21442144
end
21452145

21462146
# Parse the [workspace] members list from an opsm.toml content string.
2147-
# Returns ["member1", "member2", ...] from the `members = [...]` array.
21482147
defp parse_workspace_members(content) do
2149-
content
2150-
|> String.split("\n")
2151-
|> Enum.reduce({false, []}, fn line, {in_ws, acc} ->
2152-
stripped = String.trim(line)
2153-
cond do
2154-
stripped == "[workspace]" -> {true, acc}
2155-
String.starts_with?(stripped, "[") and stripped != "[workspace]" and in_ws -> {false, acc}
2156-
in_ws and String.starts_with?(stripped, "members") ->
2157-
# members = ["a", "b", "c"] — extract the values
2158-
values =
2159-
Regex.scan(~r/"([^"]+)"/, stripped)
2160-
|> Enum.map(fn [_, m] -> m end)
2161-
{true, acc ++ values}
2162-
true -> {in_ws, acc}
2163-
end
2164-
end)
2165-
|> elem(1)
2148+
case Toml.decode(content) do
2149+
{:ok, %{"workspace" => %{"members" => members}}} when is_list(members) -> members
2150+
_ -> []
2151+
end
21662152
end
21672153

21682154
# Parse "tool@version" or just "tool" (defaulting to "latest")

opsm_ex/lib/opsm/clients/checky_monkey.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.Clients.CheckyMonkey do
33
@moduledoc """
44
Client for Checky-Monkey code verification service.

opsm_ex/lib/opsm/clients/claim_forge.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.Clients.ClaimForge do
33
@moduledoc """
44
Client for Claim-Forge attestation generation service.

opsm_ex/lib/opsm/clients/palimpsest.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.Clients.Palimpsest do
33
@moduledoc """
44
Client for Palimpsest license analysis service.

opsm_ex/lib/opsm/config.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
defmodule Opsm.Config do
33
@moduledoc """
44
Configuration loading with TOML support.

0 commit comments

Comments
 (0)