Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This file is the project's committed home for project-intrinsic agent knowledge:
- Version tags matching `package.json` publish through `.github/workflows/release.yml` only after `npm run release:check`; keep the packed-install smoke in that gate.
- Native packaging preparation is intentionally unsigned and non-publishing: run `npm run test:native-packaging` for CLT-safe validation, and treat `scripts/native-release/require-full-xcode.sh` plus final archive/sign/notarize/clean-install work as later release-host gates.
- `scripts/native-check.sh` builds the landed SwiftPM graph, validates both native manifests, runs every executable smoke, and generates the Xcode project; under Command Line Tools it reports XCTest and Xcode-only gates as explicitly remaining.
- `swift run --package-path native ReadTheCode` is the CLT-safe local demo launch; raw SwiftPM processes intentionally disable system notifications, and native IPC uses the UID-scoped short socket documented in `docs/native-architecture.md`.
- `native/Sources/RTCSettings` owns private, versioned app settings and must retain the loopback-only adapter validation and credential-lookup boundary.
- Native exports are constructed through the `RTCExport` allowlist and diagnostic preview/confirmation boundary; keep its caps, redaction rules, skill-v2 contract, and evidence-scoped public docs aligned through `RTCExportTests` and `scripts/validate-native-skill.swift`.

Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,18 @@ File review checkmarks are browser-local convenience state. Submitted comments,

## Development

### Native macOS demo

Command Line Tools can build and launch the current unsigned local app directly:

```bash
swift run --package-path native ReadTheCode
```

Choose **Open Repository…** to review that repository's latest committed change (`HEAD^` → `HEAD`). The app materializes the exact committed diff, persists review state outside the repository, and opens the Diff/Tour workspace with comments and the revision-scoped worker rail. The raw SwiftPM launch intentionally disables system notifications because it has no macOS application-bundle identity; notifications remain enabled for a generated `.app` build.

For the Xcode app target, run `./scripts/native-bootstrap.sh`, open `native/ReadTheCode.xcodeproj`, select the `ReadTheCode` scheme and **My Mac**, then click **Run**. Full-Xcode UI tests, signing, notarization, and final release qualification remain unrun.

```bash
npm install
npm run fixture # creates .test-state/example-repository
Expand Down
8 changes: 5 additions & 3 deletions docs/native-architecture.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Native source architecture

The native tree is a SwiftPM/XcodeGen module graph targeting macOS 14. The current source graph compiles with Command Line Tools; it is not yet the final composed or packaged product.
The native tree is a SwiftPM/XcodeGen module graph targeting macOS 14. The current source graph and demo application compile with Command Line Tools; it is not yet a signed, notarized, or release-qualified product.

```text
RTCContracts
Expand All @@ -15,6 +15,8 @@ RTCContracts

Diagnostic preparation adds typed per-field serialization and stages a directory bundle privately. `PendingDiagnosticExport` is an actor-isolated one-shot state machine. `DiagnosticExportIPCComposition` creates separate preparation and confirmation dispatchers with disjoint capabilities and a shared opaque pending registry. Only the confirmation handler owns the private short-lived, one-use approval authority. The staging root descriptor remains open from no-follow creation through leaf writes, atomic rename, publication, and cleanup; path replacement cannot redirect the operation. Publication uses a separately opened no-follow destination descriptor and exclusive rename. The module performs no upload.

`native/Package.swift` and `native/project.yml` register only the new `RTCExport` source and `RTCExportTests` executable in this slice. `scripts/validate-native-manifests.mjs` keeps both manifest dependency graphs synchronized. `scripts/validate-native-skill.swift` mechanically compares the portable skill with the native CLI parser surface.
`native/Package.swift` and `native/project.yml` keep the SwiftPM and XcodeGen app dependency graphs synchronized. `scripts/validate-native-manifests.mjs` validates both manifests, and `scripts/validate-native-skill.swift` mechanically compares the portable skill with the native CLI parser surface.

The `ReadTheCode` app target compiles `RTCExport`, and the two export IPC service dispatchers are implemented, but no socket listener, CLI execution path, confirmation UI, final feature composition, or signed packaging connects them yet. See the exact wire and export shapes in [protocol v2](protocol-v2.md) and current boundaries in [native security](native-security.md).
The `ReadTheCode` composition root starts the private ingest runtime and socket, renders the Inbox, and opens a stored exact revision through the existing diff, comment, deterministic tour, bounded-diagram, and durable conversation features. The local **Open Repository…** path resolves and reviews `HEAD^` → `HEAD`; submitted reviews use the same composition. Tour rendering resolves only from the immutable stored manifest, and every review mutation re-resolves the submitted refs and repository identity before it can append an event. The worker rail truthfully remains offline unless an external worker transport is connected.

A raw `swift run --package-path native ReadTheCode` process has no application-bundle proxy, so the composition root does not instantiate `UNUserNotificationCenter` there. Generated `.app` builds retain the system notification presenter. The private capability, spool, and database stay under Application Support; only the ephemeral Unix socket uses a deterministic, UID-scoped `/tmp` name so it remains within Darwin's short `sockaddr_un` limit. Same-UID authentication, mode-`0600` socket access, and the operation allowlist still guard every request. Export confirmation UI, worker-chat IPC routing, complete native CLI operations, full-Xcode UI checks, signing, notarization, and final packaging remain unimplemented or unverified as documented in [protocol v2](protocol-v2.md) and [native security](native-security.md).
Loading
Loading