No description
Find a file
Patrick_Audley e0b01a4f5f
fix(source): require exact native instruction coverage (#160)
fix(source): admit exact native instruction counters

## What changed

Perf can display full coverage after rounding an incomplete sample. Delegate
admission to PurRDF's exact reader, capture unscaled counts and verbose metadata,
and retain both streams so enabled/running equality is checked before a count is
used. Remove the duplicated CSV grammar while preserving the whole-driver region,
shape inventory and numerical ceilings.

The example consumer, both existing counter/bounds cases, unmeasured demonstration
and 72 real capture/admission controls passed. The controls use true drivers and
do not establish resolver costs or equivalence. Independent combined review,
signed hooks, generated documentation and three renewed assessments passed.
Full make check passed, including release, MSRV and five fuzz targets at 5,000
runs each. All 24 hosted checks passed. Full feedback is addressed, with no
actionable findings or unresolved threads. The assessed base is the delivered
dependency update already incorporated by this branch, so the clean candidate
tree is the qualified feature tree.

The existing broader source-glob-cost record remains open; only its native
counter-admission item is implemented. Closes #157; parents #28 and #53 remain open.

## Commits squashed (1)

- `79fe59539` fix(source): admit exact native instruction counters

## Files

```
.../raf-source/examples/glob_instruction_gate.rs   | 55 ++++++++++------------
 crates/raf-source/tests/glob_instruction_gate.rs   | 35 ++++++++++----
 docs/capabilities/source-index.md                  | 21 +++++++--
 work/assessments/source-index-contract.md          |  2 +-
 work/assessments/source-index-examples.md          |  2 +-
 work/assessments/source-index-usage.md             |  2 +-
 work/changes/source-glob-cost.md                   |  3 ++
 7 files changed, 73 insertions(+), 47 deletions(-)
```

## Branch synchronization

- `origin/main`: fast_forward; 0 conflicting paths. Evidence: `sync/20261104T201631-301e7a1d65c3442b83359d7c103d193f/summary.md`; result: `cacf550048`.

Retain this selected Stage directory with ghprsq --stage-dir.

## Conflicts

None. Native synchronization fast-forwarded to the delivered dependency update
before the exact saved counter draft was restored.

Defect-Class: none



parent_hashes: 79fe595390

GhpRsq-Schema: 1
GhpRsq-Merge-Style: structured-squash
GhpRsq-GitHub-Repo: Blackcat-Informatics/rust-agentic-foundations
GhpRsq-GitHub-Pull-Request: 160
GhpRsq-GitHub-PR-URL: https://github.com/Blackcat-Informatics/rust-agentic-foundations/pull/160
GhpRsq-Base-Ref: main
GhpRsq-Base-OID: cacf550048
GhpRsq-Head-Ref: paudley/157-raf-source-admit-exact-native
GhpRsq-Head-OID: 79fe595390
GhpRsq-Result-Tree: ea822e4fc3
GhpRsq-Parent-Hashes: 79fe595390
GhpRsq-Squash-Notes-SHA256: 1fa399a14a0a1096ad72e42c4e6da055a33fcb10b8f121b5d77ffaf120f1e911
GhpRsq-Defect-Class: none
GhpRsq-Stage-Tree: c6566a631d
GhpRsq-Stage-Commit: 375401adf2
GhpRsq-Stage-Tag: refs/tags/ghprsq/artifacts/375401adf2afd8c5c712464b95e8e2e2f4d8b8cf
GhpRsq-Stage-Ref: refs/ghprsq/pr/160/stage
GhpRsq-Stage-Files: 3
GhpRsq-Stage-URL: 375401adf2
2026-11-04 15:38:39 -06:00
.githooks feat: enforce self-gates and remove Source's semver dependency (#126) 2026-10-28 01:23:33 -06:00
.github ci(test): split Source targets across two shards 2026-11-04 02:27:03 -06:00
.rtk fix(raf-workplan): pin the line report's tables and kinds, judge nested workspaces by a fixture, and refresh the assessments 2026-10-20 14:24:07 -06:00
crates fix(source): admit exact native instruction counters 2026-11-04 14:43:47 -06:00
docs fix(source): admit exact native instruction counters 2026-11-04 14:43:47 -06:00
examples feat(census): admit bounded registered index responses 2026-11-03 10:44:41 -06:00
fuzz build(deps): update PurRDF and use checked radix conversion 2026-11-04 12:43:10 -06:00
LICENSES docs(license): add licensing texts and REUSE metadata 2026-10-11 23:15:10 -06:00
src ci: bound validation jobs and remove repeated binding execution 2026-10-28 04:08:52 -06:00
tests feat(census): admit bounded registered index responses 2026-11-03 10:44:41 -06:00
work fix(source): admit exact native instruction counters 2026-11-04 14:43:47 -06:00
.deficiencies docs: add agent guide, contributing, conduct, security and GitHub templates 2026-10-11 23:28:19 -06:00
.gitignore fix(census): serialize debt evaluation and publication 2026-10-24 14:19:45 -06:00
AGENTS.md refactor(gates): use native TOML for manifest policy 2026-11-01 15:05:08 -06:00
Cargo.lock build(deps): update PurRDF and use checked radix conversion 2026-11-04 12:43:10 -06:00
Cargo.toml build(deps): update PurRDF and use checked radix conversion 2026-11-04 12:43:10 -06:00
census-debt.ttl refactor(source): integrate ranked discovery with observed lookups 2026-10-31 20:05:54 -06:00
CHANGELOG.md feat(workplan): enforce complete policy and adopt without debt 2026-10-22 16:02:46 -06:00
CITATION.cff docs: add agent guide, contributing, conduct, security and GitHub templates 2026-10-11 23:28:19 -06:00
CLAUDE.md Merge branch 'main' into paudley/16-raf-workplan-strict-mode-force-coverage 2026-10-20 22:29:36 -06:00
cliff.toml build(cliff): print each changelog entry once per release 2026-10-12 02:42:50 -06:00
clippy.toml test: the clock gate judges every crate from crates/* and refuses a clock name with a suffix 2026-10-18 18:35:36 -06:00
CODE_OF_CONDUCT.md docs: add agent guide, contributing, conduct, security and GitHub templates 2026-10-11 23:28:19 -06:00
CONTRIBUTING.md feat(census): admit bounded registered index responses 2026-11-03 10:44:41 -06:00
deny.toml build(deps): update PurRDF to current head 2026-11-04 01:03:36 -06:00
helpers-ledger.ttl feat(census): scan locked reference packages 2026-10-30 21:25:04 -06:00
LICENSE-APACHE docs(license): add licensing texts and REUSE metadata 2026-10-11 23:15:10 -06:00
LICENSE-MIT docs(license): add licensing texts and REUSE metadata 2026-10-11 23:15:10 -06:00
LICENSE-MULAN docs(license): add licensing texts and REUSE metadata 2026-10-11 23:15:10 -06:00
LICENSING.md build(deps): update PurRDF to current head 2026-11-04 01:03:36 -06:00
Makefile ci: retain hosted policy checks and local optimized fuzzing 2026-10-28 09:41:19 -06:00
README.md docs(policy): focus support on the primary Linux target through 0.9 2026-10-31 19:38:34 -06:00
REUSE.toml fix(workplan): identify unresolved model assessment inputs 2026-10-30 06:37:44 -06:00
rust-toolchain.toml build: scaffold RAF workspace 2026-10-11 23:11:16 -06:00
rustfmt.toml build: scaffold RAF workspace 2026-10-11 23:11:16 -06:00
SECURITY.md docs(security): describe native namespace containment 2026-11-03 13:00:33 -06:00

RAF: a black cat biting a toolbox with a wrench

RAF — Rust Agentic Foundations

RAF is a set of dev-dependency libraries and cargo subcommands, not yet published, that keep Rust repositories free of duplicated helpers and keep their documentation an accurate, current account of the system. A census finds near-duplicate helper code and ratchets recorded debt down; a spec-first workplan reconciles capability documents with the code, tests and examples that implement them. Both are built to be driven by humans and coding agents alike, and both fail hard with a message that says how to fix the problem.

Crates

Delivered contracts and the remaining Census designs are listed in the capability catalogue, with resolved bindings and generated verification matrices. This repository runs the workplan gate on itself (tests/self_workplan.rs) and runs the production Census gate over its workspace and fuzz roots (tests/self_census.rs). The canonical helpers-ledger.ttl and census-debt.ttl hold its policy and exact adopted duplication. The use-path resolution of raf-source is checked against rustc on generated programs (crates/raf-source/tests/rustc_oracle.rs). raf-workplan delivers its document model, generated documentation blocks, reconcile step, verify and completion gate, entity history, execution evidence and its claims, prose assessments, two-way coverage and the current-rationale check, and cargo-workplan runs check, status, docs sync|preview, change new|impact|reconcile|complete, verify, history, evidence record|claims|for, assess and coverage code|tests: their contract is stated in workplan-cli. The complete policy is delivered and applies to every check, reconciliation and completion. It enforces section content, package ownership, claims, line coverage and change outcomes, with explicit debt recording that can only shrink.

raf-census delivers normal form 1, fingerprints, grouping, canonical RDF reports, the strict ledger, the production Gate, counted debt and bounded migration. cargo-census supplies registered check, job, count and fingerprint queries, migrate and direct debt --write. Complete detector/provider execution retains its own capability state in the catalogue.

Crate Kind Purpose Status Specification
raf-okf library Reads and writes the RAF profile of OKF documents. delivered okf-profile
raf-rdf library Canonical ground RDF 1.2 reports over native PurRDF storage. delivered rdf-report-profile
raf-source library Indexes Rust source so tools can bind documents to code. delivered source-index
raf-census library The duplicate-helper census, strict ledger, counted debt, migration and Gate. delivered for the capabilities listed — not yet published census-normal-form, census-ledger, census-debt-ratchet, census-migration
cargo-census cargo subcommand Runs registered checks and native job, count and fingerprint queries, migrates ledgers and writes admitted debt through the production Gate. complete command interface delivered — not yet published census-migration, census-debt-ratchet, census-cli
raf-workplan library The workplan document model, generated documentation blocks, reconcile step, completion gate, entity history, evidence and claims, prose assessments, two-way coverage and current rationale. delivered for the capabilities listed — not yet published workplan-document-model, workplan-generated-docs, workplan-reconcile, workplan-complete-gate, workplan-entity-history, workplan-evidence-claims, workplan-prose-assessment, workplan-two-way-coverage, workplan-current-rationale
cargo-workplan cargo subcommand Runs the workplan from the command line. delivered — not yet published workplan-cli

Usage

A project consumes RAF as dev-dependencies. The workplan gate runs on this repository. A repository binary or xtask can install the Census Gate with its registered rules and extensions. For read-only registered checking, expose that Gate in an example and run cargo census check --package PACKAGE --example EXAMPLE. Native job, count and fingerprint queries use the same registered Gate. Migration and direct debt commands use the same library paths. The crates are not published yet.

[dev-dependencies]
raf-workplan = "0.1"
// tests/workplan.rs
#[test]
fn workplan_is_reconciled() {
    raf_workplan::Gate::workspace(env!("CARGO_MANIFEST_DIR"))
        .assert_clean();
}

The census gate, once built, takes the same shape:

[dev-dependencies]
raf-census = "0.1"
// tests/census.rs
#[test]
fn no_new_duplicate_helpers() {
    raf_census::Gate::workspace(env!("CARGO_MANIFEST_DIR"))
        .assert_clean();
}

Development

The supported target through the 0.9 release is the primary native Linux target. Additional targets are subject to reassessment after that release; see supported targets.

See CONTRIBUTING.md. Run make check before sending a change and make hooks once to install the pre-commit hook. Agents should also read AGENTS.md.

Licensing

Code is licensed MIT OR Apache-2.0 OR MulanPSL-2.0, and documentation is licensed CC-BY-4.0. See LICENSING.md for the full statement.

Brand

The name, logo and colour system are described in docs/BRAND.md.