Conversation
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>
Contributor
There was a problem hiding this comment.
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.jsonto supportprofilesand per-checkminProfile, including the newcpplint-only type. - Update
validate.pyandaudit.pyto consume the new registryprofilesmap 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. |
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>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promote develop to main
The lint-only language type work, slices 1-4 (doc/spec/registry only, no code path changes - no release):
spec/type-model.md: the durable model doc (declared-primary, detection-as-validator, build/lint-only profiles, the ignore mechanism).cpptype +build/lint-onlyprofile vocabulary + per-checkminProfileinproject-types.json/schemas +validate.pyenforcement; python profile names aligned to build/lint-only.audit.pygates the codecov requirement (CODECOV_TOKEN secret + codecov.yml file) on a build profile, so a lint-only language draws no coverage finding.source-only + python(lint-only) + cpp(lint-only); record the devcontainer-is-optional convention in the section model.Verification
spec/validate.pyOK;spec/audit.py --selftestPASS.🤖 Generated with Claude Code