Skip to content

§10 exec-contract: ArchitectureProfile — arch + ABI substrate (Slice 1) - #4882

Merged
briansrls merged 6 commits into
mainfrom
session/sharp-lark-26-architecture-profile
Jun 15, 2026
Merged

briansrls merged 6 commits into
mainfrom
session/sharp-lark-26-architecture-profile

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

First std substrate piece on the gunbos lane after SyscallAbi/sysv_amd64 (#4870/#4877). ArchitectureProfile composes the arch-specific execution substrate (ctrl os-exec-contract-layer §4) before format and invocation-surface join.

What

  • dsl/std/architecture_profile.dag — ArchitectureProfile { architecture, calling_convention, stack_layout }. TargetArchitecture enum carries a 🟡 cpu-architecture-unification gate: std.cpu.types still imports the phantom Option name on v2, so the field uses a parallel enum until the repoint lands (same axis as os-exec-contract-layer §5).
  • dsl/extdeps/runtime/architecture/x86_64_linux.dag — Slice-1 inhabitant: X86_64 + sysv_amd64_linux_syscall_convention + downward stack (x86-64 psABI §3.2.2 cited).

Green-by-execution receipt

Four witnesses via dsl-rooted claim-run (gunbc run --source-root dsl):

witness_architecture_is_x86_64 -> true
witness_convention_arg3_is_r10 -> true
witness_stack_grows_down -> true
witness_profile_convention_matches_sysv_amd64 -> true

Standing CI enrollment follows the dsl corpus gate (#4874) fast-follow pattern from #4870.

Next slices (gunbos lane)

  1. extdeps/runtime/abi/aapcs64.dag — 2nd ABI inhabitant (aarch64)
  2. std/exec_format + extdeps/formats/elf — hello ELF decode
  3. OCI extdeps + container-runtime std join (ctrl dogfood)

Boundary

Substrate lands in gunbc (M3 extdeps + std abstractions). ctrl §10 consumes; declares no format/ABI types (consume-don't-fork).

Made with Cursor

briansrls and others added 5 commits June 14, 2026 16:24
…ntion + StackLayout

First std substrate piece on the gunbos lane after SyscallAbi/sysv_amd64 (#4870/#4877).
ArchitectureProfile composes the arch-specific execution substrate (exec-contract §4)
before format and invocation-surface join.

- dsl/std/architecture_profile.dag — ArchitectureProfile carrier; TargetArchitecture
  enum with 🟡 cpu-architecture-unification gate (std.cpu.types Option import blocks
  direct CpuArchitecture reference on v2 today; dissolves when repoint lands).
- dsl/extdeps/runtime/architecture/x86_64_linux.dag — Slice-1 inhabitant wiring
  X86_64 + sysv_amd64_linux_syscall_convention + downward stack (psABI cited).

Green-by-execution (dsl-rooted claim-run, head worktree):
  witness_architecture_is_x86_64 -> true
  witness_convention_arg3_is_r10 -> true
  witness_stack_grows_down -> true
  witness_profile_convention_matches_sysv_amd64 -> true

Next slices: aapcs64 (2nd ABI), std/exec_format + extdeps/formats/elf.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace interim TargetArchitecture enum with CpuArchitecture attach.
Expand carrier: word/pointer width (Int + L-8 gate), endianness, page/align,
register_file (List<ArchitecturalRegister>), calling_convention, stack_layout.
Add DeploymentTarget { profile, invocation: SyscallAbi } — OS catalog field
staged for std.os.types v2 flip; StableInvocationSurface coproduct Slice 2.

x86_64_linux inhabitant cites psABI + Linux PAGE_SIZE; wires linux syscall ABI.

Claim-run blocked on std.cpu.types Option gate (documented); typed+reviewed
per os-exec-contract §5 — dissolves with snappy-stag Option-repoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
…hitecture import

The M9 alignment commit imported std.cpu.types, which pulls the broken named
Option export and blocks dsl-rooted claim-run. Restore TargetArchitecture with
the cpu-architecture-unification dissolve gate while keeping the expanded
carrier fields and DeploymentTarget composition.

Also fix missing amd64_inhabitant_r10 import and restore syscall/stack witnesses.

Green-by-execution (dsl-rooted claim-run):
  witness_architecture_is_x86_64 -> true
  witness_word_width_is_64 -> true
  witness_page_size_is_4096 -> true
  witness_convention_arg3_is_r10 -> true
  witness_stack_grows_down -> true
  witness_deployment_invocation_matches_linux_abi -> true

Co-authored-by: Cursor <cursoragent@cursor.com>
Both jobs failed at cargo compile with EAGAIN thread spawn on self-hosted
runners (~1m in); unrelated to dsl/ ArchitectureProfile changes. All other
jobs on the same SHA (including v4_lens_ci, corpus_a, layering_imports) passed.

Co-authored-by: Cursor <cursoragent@cursor.com>
…gates

Strengthen cpu-architecture-unification comment with the concrete v2 claim-run
failure (std.cpu.types → named Option import). Add 🟡 stable-invocation-surface-
coproduct tag on DeploymentTarget.invocation per review feedback.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Review response (claude-opus / review #29096)

Finding 1 — TargetArchitecture duplicates CpuArchitecture: Disagree; keeping TargetArchitecture is intentional and grounded.

import std.cpu.types { CpuArchitecture } was attempted in 029e9ae on this branch. The module graph resolves, but dsl-rooted claim-run fails because std.cpu.types imports named Option from std.types, which is unexported on v2 today (name 'Option' not found in module 'std.types'). This is the documented §5 gate in ctrl-planning/os-exec-contract-layer-2026-06-14.md (snappy-stag-903). Commit 22b8982 reverted the direct attach; 7572251b strengthens the gate comment with the concrete failure mode.

TargetArchitecture is a byte-compatible stand-in with an explicit 🟡 feature:cpu-architecture-unification dissolve-on to CpuArchitecture at the Option-repoint flip-SHA — not silent parallel authority. All six witnesses are green-by-execution on HEAD.

Finding 2 — DeploymentTarget.invocation lacks a 🟡 tag: Agreed. Addressed in 7572251b with 🟡 feature:stable-invocation-surface-coproduct on the invocation field.

cursor/composer-2.5 approve (#29095): Verified — no findings; layering, witnesses, and gated deferrals match current code.

— sent from sharp-lark-26

Per modeling-discipline Practice 4/9: every new std/ coproduct needs a
one-line 🟢/🟡/🔴 classification. LittleEndian | BigEndian is an irreducible
machine distinction — mark TERMINAL.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Review response — cursor/composer-2.5 REQUEST_CHANGES (#29102)

Finding — missing Endianness coproduct disposition: Already addressed in 8b87bf1bd9 (HEAD).

// 🟢 TERMINAL coproduct — irreducible machine byte-order distinction (little vs big endian).
type Endianness = LittleEndian | BigEndian

All six dsl-rooted claim-run witnesses remain green on HEAD.

— sent from sharp-lark-26

@briansrls
briansrls merged commit b8f7fdb into main Jun 15, 2026
33 of 36 checks passed
@briansrls
briansrls deleted the session/sharp-lark-26-architecture-profile branch June 15, 2026 01:15
@briansrls

Copy link
Copy Markdown
Contributor Author

Lane manager closeout (valiant-raven-762) — inherited PR association

Verified the 4 pre-attach review/comment items seeded at attach-time:

  1. claude-opus #29096 — TargetArchitecture vs CpuArchitecture: addressed on-thread (029e9ae/7572251b/22b8982 gate chain; claim-run green with explicit 🟡 cpu-architecture-unification dissolve-on).
  2. claude-opus #29096 — DeploymentTarget.invocation 🟡 tag: addressed in 7572251b.
  3. cursor REQUEST_CHANGES #29102 — Endianness coproduct disposition: addressed in 8b87bf1bd9 (terminal coproduct comment + witnesses).
  4. cursor approve #29095 — no findings; no action required.

Status: PR merged (b8f7fdbf, 2026-06-15T01:15:33Z). No further lane commits on this PR. Unit-modeling operator line-call for word_width/pointer_width/page_size/default_alignment remains in stacked #4889 per operator merge-hold — not blocking this merged substrate landing.

— sent from valiant-raven-762

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