Skip to content

Commit e889f8b

Browse files
authored
Merge pull request #397 from PhysShell/ccr-d3ed89e2-vnl6fk
feat(owen-ext): Owen extension substrate — Owen.Build host + Owen.TypedBuilder (OX-01)
2 parents 88cb8cc + 5479a51 commit e889f8b

36 files changed

Lines changed: 3371 additions & 412 deletions

‎.github/workflows/ci.yml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3455,6 +3455,38 @@ jobs:
34553455
path: ${{ runner.temp }}/benchmark-scorecard.json
34563456
retention-days: 90
34573457

3458+
# OX-01 (docs/notes/owen-extension-alpha-preregistration.md): the Owen extension substrate,
3459+
# with Typed Builder as extension #1. The gate packs Owen.Build (the generic host, with this
3460+
# platform's natively built Rust core) and Owen.TypedBuilder, then proves in a project OUTSIDE
3461+
# the checkout, with no Python / cargo / rustc / owen on PATH, that one PackageReference gives
3462+
# the generated API, CS errors, and OWN findings from `dotnet build` with canonical MSBuild
3463+
# coordinates; it replays the whole TB-MVP corpus and acceptance through the package, adds a
3464+
# second (synthetic) extension, and mutates the installed packages (M1-M7). Both platforms:
3465+
# MSBuild's Exec, the packed core and the paths all differ between them.
3466+
owen-extension:
3467+
name: Owen extension substrate (Owen.Build + Owen.TypedBuilder, isolated consumer)
3468+
strategy:
3469+
fail-fast: false
3470+
matrix:
3471+
os: [ubuntu-latest, windows-latest]
3472+
runs-on: ${{ matrix.os }}
3473+
defaults:
3474+
run:
3475+
shell: bash
3476+
steps:
3477+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3478+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
3479+
with:
3480+
python-version: "3.13"
3481+
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
3482+
with:
3483+
dotnet-version: "8.0.x"
3484+
- uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master, 2026-07-10
3485+
with:
3486+
toolchain: stable
3487+
- name: The extension gate (pack, isolated consumer A-H, mutations M1-M7)
3488+
run: python scripts/owen_extension_gate.py
3489+
34583490
# Alpha gate A (issue #202): the single delightful command, proven end-to-end
34593491
# on a clean runner — install -> check -> findings. Packaging only, no
34603492
# analysis-behaviour change: the underlying project stays OwnSharp.Cli

‎docs/notes/alpha-readiness.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,39 @@ None of those is research; all are the difference between "interesting PoC" and
6868
standing between here and the day 1–30 milestone being *literally* copy-paste
6969
for a stranger.
7070

71+
## Update 2026-10-03: the extension path (OX-01)
72+
73+
**A second install path now exists beside A.** No `dotnet tool` and no command: a
74+
`PackageReference`.
75+
76+
```
77+
dotnet add package Owen.TypedBuilder
78+
dotnet build
79+
```
80+
81+
**What it does.**
82+
- The package depends on **`Owen.Build`**, the generic build host. `Owen.Build` carries the same program as `Owen.Cli` (`owen`), its bundled extractor, and the Rust core for `linux-x64` and `win-x64`.
83+
- On every build it runs Owen once for every active Owen extension.
84+
- Findings are ordinary MSBuild diagnostics, so `dotnet build`, CI logs and Visual Studio's Error List all show them. They are `warning` by default and `OwenSeverity=error` to fail the build.
85+
86+
The machine needs no Python, no Rust toolchain, no global tool and no checkout. The isolated
87+
consumer gate proves it on Linux and Windows CI (`scripts/owen_extension_gate.py`).
88+
89+
**Extension #1 is the Typed Builder:**
90+
- typed states and a typed builder generated from one annotated EF entity;
91+
- illegal transitions are compiler errors;
92+
- stale or copied states are `OWN` findings on build.
93+
94+
The contract a second extension uses is in [`spec/OwenExtension.md`](../../spec/OwenExtension.md). See
95+
[`owen-extension-alpha-report.md`](owen-extension-alpha-report.md) for the evidence, and
96+
[`owen-extension-ide-feasibility.md`](owen-extension-ide-feasibility.md) for live IDE diagnostics:
97+
- E1 (one generic VSIX host) is the direction, not built here;
98+
- E2 (a native Roslyn analyzer) was rejected.
99+
100+
**Still open.** Exactly the items that already gated A: nothing is published to nuget.org
101+
yet, and there is no license. `Owen.Build` and `Owen.TypedBuilder` are 0.1.0 candidates packed
102+
from source.
103+
71104
## The 20% rule (other stacks)
72105

73106
Other stacks are **proof of portability, not a second product.** Sanctioned now:
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Owen diagnostics: the model already exists (OX-01, P8)
2+
3+
**Question.** Is the renderer so tied to CLI strings that the extension substrate needs a new
4+
internal diagnostic model before `msbuild`, `github`, `sarif`, a future Visual Studio host or a
5+
future LSP can be served?
6+
7+
**Answer: no.** The model exists, it is the authoritative core's, and every surface is
8+
already one function of it. OX-01 adds **no** diagnostic layer. It consumes the existing one.
9+
10+
## The model
11+
12+
`own_bridge::verdict::Finding` (Rust, authoritative since the P-022 Stage 3 cutover; the Python
13+
reference mirrors it field for field):
14+
15+
| field | the brief's concept |
16+
|---|---|
17+
| `code` | code (`OWN001` …) |
18+
| `severity` (+ `advisory`) | severity. The host's `--severity` changes only how a finding is **shown**, never the verdict |
19+
| `message` | message |
20+
| `file`, `line`, `column` (optional) | file, start line, start column |
21+
| `related: Vec<Step>`, `flow: Vec<Step>` | related locations and the witness path |
22+
| `kind` (`[resource: …]`), `component`, `event`, `handler` | the resource the finding is about |
23+
| `ignore_reason` | suppression (`// own:ignore` …) |
24+
25+
**Renderers,** each a pure function of a `Finding`:
26+
27+
| function | output |
28+
|---|---|
29+
| `own_bridge::render_finding(f, "human" \| "github" \| "msbuild", severity)` | one line per surface |
30+
| `own_bridge::build_sarif` | a SARIF 2.1.0 log |
31+
32+
`own-cli ownir --format {human,github,msbuild,sarif}` exposes all four. `BR-V9` pins the
33+
bytes, and the CLI ledgers pin both engines.
34+
35+
## How OX-01 uses it
36+
37+
The build host (`owen build-check`) asks the core for `--format msbuild` and passes the lines
38+
through. It changes exactly one thing: it makes the **origin path** absolute against the project
39+
directory, so Visual Studio's Error List never has to guess a base. No message, code or
40+
severity is re-rendered by the host.
41+
42+
The host's own conditions are the `OWENB` codes (spec/OwenExtension.md §4):
43+
- a descriptor rejected;
44+
- no engine for the platform;
45+
- a refusal.
46+
47+
They are rendered by the host in the same canonical MSBuild shape. They are host
48+
diagnostics, not analysis findings, and they never reuse an `OWN` code.
49+
50+
## Gaps, recorded and not changed here
51+
52+
- **No column on the `msbuild` line.** `render_msbuild` prints `file(line)` although `Finding` carries an optional `column`.
53+
- **Effect:** the Error List navigates to the line, not the column.
54+
- **Why not here:** changing the line is a change to the core's pinned bytes (BR-V9, the CLI ledgers), which is foundation work.
55+
- **The line and the wording of state-protocol findings.** A stale state token is reported at the region entry, and in the generic resource wording ("IDisposable local … disposed"). This is issue **#393**, unchanged here.
56+
- **For a future IDE host or LSP:** both consume the same `Finding`. `--format sarif` already carries everything they need: code, level, message, region, related locations, code flows. A future `Owen.VisualStudio` or language server should read SARIF, or a structured JSON of the same `Finding`, from the one core, and never re-derive a finding.

0 commit comments

Comments
 (0)