Skip to content

Promote the lint-only language type work to main (#437-#440) - #441

Merged
ptr727 merged 5 commits into
mainfrom
develop
Jul 25, 2026
Merged

Promote the lint-only language type work to main (#437-#440)#441
ptr727 merged 5 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Promote develop to main

The lint-only language type work, slices 1-4 (doc/spec/registry only, no code path changes - no release):

Verification

  • spec/validate.py OK; spec/audit.py --selftest PASS.

🤖 Generated with Claude Code

ptr727 and others added 4 commits July 25, 2026 07:57
Slice 1 of the lint-only language type work: a durable model doc, before
the schema/registry/audit slices consume it (same rollout order as the
section and fidelity models).

## What

- New `spec/type-model.md` - companion to section-model.md /
fidelity-model.md. Defines: declaration (registry) is the source of
truth; detection validates it (the consistent / false-declaration /
discovery-advisory / ok matrix, with an explicit reason-carrying
`ignore`); language `profile` (build vs lint-only) with each check
naming its `minProfile`; codecov checks profile-aware; the `cpp`
lint-only type (clang-format); change-carries-review-weight.
- `project-types.json` note gains a pointer to it.

## Not yet (later slices)

Schema + cpp/profile in project-types.json + registry declarations
(slice 2), the audit engine - detection-as-validator, profile-aware
codecov, cpp check (slice 3), ESPHome-Config reclassification (slice 4).
Doc-only here, so the audit is unchanged.

## Verification

`spec/validate.py` OK; `project-types.json` valid JSON.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Slice 2 of the lint-only language type work (slice 1: the model doc,
merged). Vocabulary + schema + validation only - the audit does not
consume the new fields yet, so behavior is unchanged.

## What

- **`project-types.json`**: new **`cpp`** lint-only type
(`.clang-format`, style only - the downstream compile does
semantic/static analysis); `profiles` on `python` (`build`/`lint-only`)
and `csharp` (`build`); `minProfile: "build"` on the four
build-requiring checks (both `*.coverage.codecov`,
`python.uvlock.pinned`, `python.pyright.config`). Also splits the
pre-existing semicolons in those four asserts (touched lines).
- **`project-types.schema.json`**: `minProfile` on a check, `profiles`
on a type.
- **`registry/repos.schema.json`**: a `profiles` map property.
- **`validate.py`**: a declared profile must name one of the repo's
types and a profile that type allows.

## Design note

Declared profile is a **parallel `profiles` map** (`types` stays a
string list), not an object-or-string `types` entry: `audit.py` does
`set(entry.get("types"))` and `dict.get(t)`, which crash on an
unhashable dict. `validate.py` cross-checks the map against `types`, so
they cannot drift.

## Verification

`spec/validate.py` OK; both validation branches tested (bad type, bad
profile value); `spec/audit.py --selftest` PASS; JSON valid; no
semicolon splices in the diff.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Slice 3 of the lint-only language type work (slices 1-2 merged: the
model doc, the vocabulary + schema). This is the audit's profile
consumption - and the fix for the spurious codecov findings a lint-only
python subtree draws.

## What

Computes `coverage_active` (any declared type claims the `codecov`
mechanism at *build* profile) and gates both coverage requirements on
it:
- the `CODECOV_TOKEN` secret (per-type mechanism), and
- the `codecov.yml` file presence.

A lint-only language has no tests, so no coverage, so neither applies.

## Why

`spec/audit.py` enforces coverage only via that secret + file (the
project-types `minProfile` checks are human-judged contracts, not run
mechanically). Without profile-awareness, a lint-only python subtree -
e.g. ESPHome-Config's codegen tooling - draws a spurious `CODECOV_TOKEN`
DEFECT and `codecov.yml` LETTER. This unblocks reclassifying such a repo
cleanly (slice 4).

## Verification

- `spec/audit.py --selftest` PASS; `spec/validate.py` OK.
- End-to-end: a temp `python(lint-only)` declaration on ESPHome-Config
draws **no** codecov findings; `python(build)` still requires
`CODECOV_TOKEN`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Slice 4 of the lint-only language type work. Applies the model to the
config repos and records the devcontainer convention.

## What

- **Reclassify `ESPHome-Config`** in the registry: `source-only` ->
`source-only + python(lint-only) + cpp(lint-only)`, with a `profiles`
map and a driftNote (lint-only python codegen + cpp headers;
clang-format not yet added). Now that the type model supports lint-only
languages, its codegen tooling draws **no** spurious codecov findings
(the `CODECOV_TOKEN` DEFECT and `codecov.yml` LETTER a naive `+python`
produced are gone - verified).
- **Devcontainer convention** in `section-model.md`: a devcontainer is
optional and not required by any type. An operational live-config repo
is edited/deployed live and its Devcontainer section states none; a repo
that keeps one (a toolchain, or an offline-debug aid) describes it.

## Not this PR

`HomeAssistant-Config` needs **no** reclassification - it is pure YAML
config (no python/cpp), correctly `source-only`. Its convergence is
downstream (a shared issue). ESPHome-Config's own AGENTS re-vendor debt
is likewise downstream (#65).

## Verification

`spec/validate.py` OK; a live audit of ESPHome-Config with the
reclassification shows zero codecov findings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 17:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Promotes the lint-only language type work from develop to main by formalizing type/profile vocabulary in the spec, enforcing profile declarations in registry validation, and making the audit profile-aware for Codecov requirements so lint-only languages do not trigger coverage findings.

Changes:

  • Add a durable type-model document defining declaration vs detection and the build vs lint-only profile concept.
  • Extend the spec schemas and project-types.json to support profiles and per-check minProfile, including the new cpp lint-only type.
  • Update validate.py and audit.py to consume the new registry profiles map and gate coverage requirements (CODECOV_TOKEN + codecov.yml) based on build vs lint-only.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
spec/validate.py Validates registry/repos.json profiles map keys/values against declared repo types and allowed type profiles.
spec/type-model.md Introduces the durable model doc for type declaration, detection-as-validator, and build vs lint-only profiles.
spec/section-model.md Records the devcontainer-is-optional convention in the section model.
spec/project-types.schema.json Adds schema support for per-check minProfile and per-type profiles.
spec/project-types.json Adds cpp, introduces type profiles, and applies minProfile to build-only checks.
spec/audit.py Gates Codecov requirements (secret + codecov.yml) on build-profile language presence.
registry/repos.schema.json Adds profiles to the registry schema.
registry/repos.json Reclassifies ESPHome-Config to python/cpp with lint-only profiles and updates drift notes accordingly.

Comment thread spec/type-model.md Outdated
Routed from Copilot on the promotion #441: the model doc said every
check names its minProfile, but the field is optional (only build checks
set it) and omitting it means the check applies at every profile.
Clarify that default, and word the enforcement accurately - the audit
gates the coverage requirement on the declared profile, not by reading
minProfile (which is documentation), and only coverage is mechanically
gated, not packaging.

`spec/validate.py` OK.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 17:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged commit 6e8039b into main Jul 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants