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
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3455,6 +3455,38 @@ jobs:
path: ${{ runner.temp }}/benchmark-scorecard.json
retention-days: 90

# OX-01 (docs/notes/owen-extension-alpha-preregistration.md): the Owen extension substrate,
# with Typed Builder as extension #1. The gate packs Owen.Build (the generic host, with this
# platform's natively built Rust core) and Owen.TypedBuilder, then proves in a project OUTSIDE
# the checkout, with no Python / cargo / rustc / owen on PATH, that one PackageReference gives
# the generated API, CS errors, and OWN findings from `dotnet build` with canonical MSBuild
# coordinates; it replays the whole TB-MVP corpus and acceptance through the package, adds a
# second (synthetic) extension, and mutates the installed packages (M1-M7). Both platforms:
# MSBuild's Exec, the packed core and the paths all differ between them.
owen-extension:
name: Owen extension substrate (Owen.Build + Owen.TypedBuilder, isolated consumer)
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: "8.0.x"
- uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master, 2026-07-10
with:
toolchain: stable
- name: The extension gate (pack, isolated consumer A-H, mutations M1-M7)
run: python scripts/owen_extension_gate.py

# Alpha gate A (issue #202): the single delightful command, proven end-to-end
# on a clean runner — install -> check -> findings. Packaging only, no
# analysis-behaviour change: the underlying project stays OwnSharp.Cli
Expand Down
33 changes: 33 additions & 0 deletions docs/notes/alpha-readiness.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,39 @@ None of those is research; all are the difference between "interesting PoC" and
standing between here and the day 1–30 milestone being *literally* copy-paste
for a stranger.

## Update 2026-10-03: the extension path (OX-01)

**A second install path now exists beside A.** No `dotnet tool` and no command: a
`PackageReference`.

```
dotnet add package Owen.TypedBuilder
dotnet build
```

**What it does.**
- 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`.
- On every build it runs Owen once for every active Owen extension.
- 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.

The machine needs no Python, no Rust toolchain, no global tool and no checkout. The isolated
consumer gate proves it on Linux and Windows CI (`scripts/owen_extension_gate.py`).

**Extension #1 is the Typed Builder:**
- typed states and a typed builder generated from one annotated EF entity;
- illegal transitions are compiler errors;
- stale or copied states are `OWN` findings on build.

The contract a second extension uses is in [`spec/OwenExtension.md`](../../spec/OwenExtension.md). See
[`owen-extension-alpha-report.md`](owen-extension-alpha-report.md) for the evidence, and
[`owen-extension-ide-feasibility.md`](owen-extension-ide-feasibility.md) for live IDE diagnostics:
- E1 (one generic VSIX host) is the direction, not built here;
- E2 (a native Roslyn analyzer) was rejected.

**Still open.** Exactly the items that already gated A: nothing is published to nuget.org
yet, and there is no license. `Owen.Build` and `Owen.TypedBuilder` are 0.1.0 candidates packed
from source.

## The 20% rule (other stacks)

Other stacks are **proof of portability, not a second product.** Sanctioned now:
Expand Down
56 changes: 56 additions & 0 deletions docs/notes/owen-diagnostics-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Owen diagnostics: the model already exists (OX-01, P8)

**Question.** Is the renderer so tied to CLI strings that the extension substrate needs a new
internal diagnostic model before `msbuild`, `github`, `sarif`, a future Visual Studio host or a
future LSP can be served?

**Answer: no.** The model exists, it is the authoritative core's, and every surface is
already one function of it. OX-01 adds **no** diagnostic layer. It consumes the existing one.

## The model

`own_bridge::verdict::Finding` (Rust, authoritative since the P-022 Stage 3 cutover; the Python
reference mirrors it field for field):

| field | the brief's concept |
|---|---|
| `code` | code (`OWN001` …) |
| `severity` (+ `advisory`) | severity. The host's `--severity` changes only how a finding is **shown**, never the verdict |
| `message` | message |
| `file`, `line`, `column` (optional) | file, start line, start column |
| `related: Vec<Step>`, `flow: Vec<Step>` | related locations and the witness path |
| `kind` (`[resource: …]`), `component`, `event`, `handler` | the resource the finding is about |
| `ignore_reason` | suppression (`// own:ignore` …) |

**Renderers,** each a pure function of a `Finding`:

| function | output |
|---|---|
| `own_bridge::render_finding(f, "human" \| "github" \| "msbuild", severity)` | one line per surface |
| `own_bridge::build_sarif` | a SARIF 2.1.0 log |

`own-cli ownir --format {human,github,msbuild,sarif}` exposes all four. `BR-V9` pins the
bytes, and the CLI ledgers pin both engines.

## How OX-01 uses it

The build host (`owen build-check`) asks the core for `--format msbuild` and passes the lines
through. It changes exactly one thing: it makes the **origin path** absolute against the project
directory, so Visual Studio's Error List never has to guess a base. No message, code or
severity is re-rendered by the host.

The host's own conditions are the `OWENB` codes (spec/OwenExtension.md §4):
- a descriptor rejected;
- no engine for the platform;
- a refusal.

They are rendered by the host in the same canonical MSBuild shape. They are host
diagnostics, not analysis findings, and they never reuse an `OWN` code.

## Gaps, recorded and not changed here

- **No column on the `msbuild` line.** `render_msbuild` prints `file(line)` although `Finding` carries an optional `column`.
- **Effect:** the Error List navigates to the line, not the column.
- **Why not here:** changing the line is a change to the core's pinned bytes (BR-V9, the CLI ledgers), which is foundation work.
- **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.
- **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.
Loading
Loading