Phase 0: bootstrap repository and freeze public contracts #1

Closed
opened 2026-08-03 07:46:52 +00:00 by lost-rob0t · 5 comments
lost-rob0t commented 2026-08-03 07:46:52 +00:00 (Migrated from github.com)

Source

Implements Phase 0 of STAR-DISCORD-001 cl-discord-self Runtime Architecture and the approved reusable-library boundary from STAR-RESEARCH-006.

Goal

Create the smallest reviewable repository skeleton that freezes the public package, native ABI, fixture, and compatibility contracts before any live network implementation exists.

Scope

  • add AGENTS.md with the issue-driven Forge Loop
  • add upstream MIT LICENSE, NOTICE, and PORTING.org
  • add flake.nix with pinned SBCL/toolchain inputs
  • add cl-discord-self.asd
  • define public packages and typed conditions
  • commit native/include/cldiscordcurl.h with ABI version 1, opaque handles, lifecycle, HTTP, WebSocket, poll, memory-ownership, and stable error contracts
  • define event, transport, transcript, and fixture schemas
  • add a compatibility manifest structure without inventing an upstream commit
  • establish unit/replay/compatibility/integration test directories

Constraints

  • no live Discord traffic
  • no Python production dependency
  • no RabbitMQ, CouchDB, StarIntel document, case-policy, or authorization imports
  • no unsolicited messaging, stealth rotation, challenge solving, or mass-account behavior
  • preserve missing/null/value distinctions in schema contracts

Exit gate

  • ASDF loads on SBCL
  • the C header compiles in a smoke test
  • fixture and manifest schemas validate
  • tests run deterministically without network access
  • every foreign allocation has a documented owner and release path
  • repository instructions require one issue, one branch, and one worker at a time
## Source Implements Phase 0 of `STAR-DISCORD-001 cl-discord-self Runtime Architecture` and the approved reusable-library boundary from `STAR-RESEARCH-006`. ## Goal Create the smallest reviewable repository skeleton that freezes the public package, native ABI, fixture, and compatibility contracts before any live network implementation exists. ## Scope - add `AGENTS.md` with the issue-driven Forge Loop - add upstream MIT `LICENSE`, `NOTICE`, and `PORTING.org` - add `flake.nix` with pinned SBCL/toolchain inputs - add `cl-discord-self.asd` - define public packages and typed conditions - commit `native/include/cldiscordcurl.h` with ABI version 1, opaque handles, lifecycle, HTTP, WebSocket, poll, memory-ownership, and stable error contracts - define event, transport, transcript, and fixture schemas - add a compatibility manifest structure without inventing an upstream commit - establish unit/replay/compatibility/integration test directories ## Constraints - no live Discord traffic - no Python production dependency - no RabbitMQ, CouchDB, StarIntel document, case-policy, or authorization imports - no unsolicited messaging, stealth rotation, challenge solving, or mass-account behavior - preserve missing/null/value distinctions in schema contracts ## Exit gate - ASDF loads on SBCL - the C header compiles in a smoke test - fixture and manifest schemas validate - tests run deterministically without network access - every foreign allocation has a documented owner and release path - repository instructions require one issue, one branch, and one worker at a time
lost-rob0t commented 2026-08-03 07:49:56 +00:00 (Migrated from github.com)

Ensure a solid flake.nix bootstrap. starting this now will make your work eaiser

Ensure a solid flake.nix bootstrap. starting this now will make your work eaiser
lost-rob0t commented 2026-08-03 07:50:01 +00:00 (Migrated from github.com)

Claiming the first Issue-Driven Agentic Development slice on codex/issue-1-phase-0-contracts-a1.

Initial slice:

  • add the legal/porting skeleton without claiming translated code that does not exist yet;
  • add the ASDF/package/condition skeleton;
  • commit ABI v1 header and fixture/manifest schemas before transport implementation;
  • add deterministic smoke validation with no network dependency.

Validation plan:

  • ASDF compile/load on SBCL;
  • C header compile smoke test;
  • JSON schema validation;
  • Nix evaluation/checks where available;
  • full diff review for secret exposure, StarIntel dependency leakage, unbounded defaults, and accidental write/automation APIs.

The root AGENTS.md bootstrap was committed directly to main as commit d5fac6f33c0d91178c84adf531bca9b7826e9f92 because the repository was empty and had no base commit from which an issue branch could be created.

Claiming the first Issue-Driven Agentic Development slice on `codex/issue-1-phase-0-contracts-a1`. Initial slice: - add the legal/porting skeleton without claiming translated code that does not exist yet; - add the ASDF/package/condition skeleton; - commit ABI v1 header and fixture/manifest schemas before transport implementation; - add deterministic smoke validation with no network dependency. Validation plan: - ASDF compile/load on SBCL; - C header compile smoke test; - JSON schema validation; - Nix evaluation/checks where available; - full diff review for secret exposure, StarIntel dependency leakage, unbounded defaults, and accidental write/automation APIs. The root `AGENTS.md` bootstrap was committed directly to `main` as commit `d5fac6f33c0d91178c84adf531bca9b7826e9f92` because the repository was empty and had no base commit from which an issue branch could be created.
lost-rob0t commented 2026-08-03 07:59:05 +00:00 (Migrated from github.com)

Phase 0 first pass is now in draft PR #12: https://github.com/lost-rob0t/cl-discord-self/pull/12

Current status:

  • 20-file repository/contract scaffold complete;
  • native ABI header compile smoke passed under strict C11 warnings;
  • all four JSON schema documents parsed successfully;
  • full diff reviewed for StarIntel dependency leakage, live credentials, unbounded defaults, and accidental write/automation APIs; none found;
  • SBCL/ASDF and nix flake check remain unrun because this execution environment has neither SBCL nor Nix.

The PR remains draft and unmerged pending those checks and independent ABI review.

Phase 0 first pass is now in draft PR #12: https://github.com/lost-rob0t/cl-discord-self/pull/12 Current status: - 20-file repository/contract scaffold complete; - native ABI header compile smoke passed under strict C11 warnings; - all four JSON schema documents parsed successfully; - full diff reviewed for StarIntel dependency leakage, live credentials, unbounded defaults, and accidental write/automation APIs; none found; - SBCL/ASDF and `nix flake check` remain unrun because this execution environment has neither SBCL nor Nix. The PR remains draft and unmerged pending those checks and independent ABI review.
lost-rob0t commented 2026-08-03 08:07:09 +00:00 (Migrated from github.com)

nix flake check exposed an SBCL portability bug in the Phase 0 scaffold.

Cause: src/core.lisp used DEFCONSTANT with a string value. Common Lisp only permits redefining a constant with an EQL value; separately loaded string literals are not guaranteed to be EQL, and SBCL rejects the compile/load redefinition during ASDF loading.

Fix pushed to codex/issue-1-phase-0-contracts-a1 as d8443a0a56bf5fa8fa6336437441b68687176450: use a documented DEFPARAMETER for the public version string.

Please rerun:

nix flake check -L

If another derivation fails, capture it with:

nix log "$(nix path-info --derivation .#checks.x86_64-linux.asdf-smoke)"
`nix flake check` exposed an SBCL portability bug in the Phase 0 scaffold. Cause: `src/core.lisp` used `DEFCONSTANT` with a string value. Common Lisp only permits redefining a constant with an `EQL` value; separately loaded string literals are not guaranteed to be `EQL`, and SBCL rejects the compile/load redefinition during ASDF loading. Fix pushed to `codex/issue-1-phase-0-contracts-a1` as `d8443a0a56bf5fa8fa6336437441b68687176450`: use a documented `DEFPARAMETER` for the public version string. Please rerun: ```sh nix flake check -L ``` If another derivation fails, capture it with: ```sh nix log "$(nix path-info --derivation .#checks.x86_64-linux.asdf-smoke)" ```
lost-rob0t commented 2026-08-03 08:16:31 +00:00 (Migrated from github.com)

Owner-authorized Phase 0 scope extension for this branch: add the first GitHub Actions CI workflow so the already-defined deterministic Nix checks run automatically on pull requests and main.

This remains part of Issue #1 because it enforces the existing exit gate; release publication is tracked separately in #13 and is blocked on Profile A (#8).

CI acceptance checks:

  • least-privilege contents: read permissions;
  • no Discord credentials or live network tests;
  • pinned flake.lock is not updated during CI;
  • nix flake check -L --no-update-lock-file runs on ubuntu-24.04;
  • concurrency cancels superseded runs;
  • workflow has an explicit timeout and can be manually dispatched.
Owner-authorized Phase 0 scope extension for this branch: add the first GitHub Actions CI workflow so the already-defined deterministic Nix checks run automatically on pull requests and `main`. This remains part of Issue #1 because it enforces the existing exit gate; release publication is tracked separately in #13 and is blocked on Profile A (#8). CI acceptance checks: - least-privilege `contents: read` permissions; - no Discord credentials or live network tests; - pinned `flake.lock` is not updated during CI; - `nix flake check -L --no-update-lock-file` runs on `ubuntu-24.04`; - concurrency cancels superseded runs; - workflow has an explicit timeout and can be manually dispatched.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/cl-discord-self#1
No description provided.