Repository navigation
fix(tier1): finish the author and metadata.id review round from #499 - #513
Merged
Merged
Conversation
#499 was squash-merged while this round of review fixes was still in flight, so these arrive separately from the code they correct. Two of them are live defects in main. The author character guard matched all of Unicode category C, which also covers ZWNJ (U+200C) and ZWJ (U+200D). Persian, Arabic and Devanagari names need those joiners to render, so a legitimate name failed SCHEMA.author_format at HIGH under both bundled profiles, as did a soft hyphen and any code point unassigned in the running interpreter's Unicode data -- which made the verdict depend on the interpreter's version rather than on the value, and made the message untrue of what it rejected. The guard now takes Cc/Cs/Co plus an explicit set of bidirectional marks, embeddings, overrides, isolates and the byte-order mark. The bare-email pattern required a dotted domain, so root@buildhost and jane@example took the plain-attribution path and were reported as "Author has no email address" -- plainly false of a value that is nothing but an address, and the opposite verdict from [email protected] for the same shape. The discriminator is now a word character on each side of the @, which keeps a social handle such as Jane Doe (@JDoe), a bare @JDoe and Platform Team @ Example clean, and also catches a non-ASCII local part that the old pattern's successor would have missed. Collection validation already preserved a passing skill's advisories, but carried the findings unchanged, so nothing said which member produced one. merge_advisories_with_prefix names the skill in the finding's location and in metadata.collection_skill, and never touches passed, so an advisory stays advisory. The per-skill roll-up no longer claims every check passed next to a list of that skill's advisories. A catalog-summary.json entry already carried the member verdict and the severity bump from a duplicate metadata.id, but a catalog validates each skill on its own, so nothing in that skill's output said what caused either. The entry now lists them under catalog_findings. Adds the two tests the review asked for with no behaviour change: a well-formed author outside an author_email_regex domain (the shape_ok=True half of that branch, which nothing covered), and the catalog failure dedup guard asserting "2/2 skills failed validation" rather than "3/2" when a skill carries both its own failure and a shared ID. docs/tier1-validation.mdx described neither the narrowed guard nor the report_verdict / report_scope shape #499 shipped; both are now documented. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Only CHANGELOG.md conflicted: main's new Unreleased Fixed entry from #509 and this branch's four entries were both inserted at the top of that section. Resolved by keeping main's entry in the position main gave it, with the branch entries following, so the diff against main stays purely additive. Every released section is byte-identical to main's copy. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
rng1995
requested review from
chrisknvidia,
mosheabr and
rmalani-nv
as code owners
November 13, 2026 19:13
…se half Review follow-up on #511. _expected_behaviors_verified settled an expectation whenever every checkable token it named was observed, so one that also asked for something only the final answer could show was settled by the artifact alone: "writes `report.py` and explains why each column was dropped" lifted the gate although the second half was never checked. That inverts the defect #511 set out to fix -- instead of discarding a score the evidence supports, it kept one the evidence does not. Every clause of an expectation must now name a checkable artifact of its own. Clauses are split on the ordinary joiners (and, then, also, plus, as well as, while, before, after, a semicolon, or a sentence break), never on a bare dot, so an artifact path keeps its extension. A clause naming nothing checkable keeps the gate, exactly as a wholly prose expectation already did. The split is deliberately generous: an unrecognized clause shape reads as prose and keeps the gate, which withholds a score. Lifting the gate wrongly keeps a score the evidence does not support, so the two errors are not symmetric and the ambiguous case belongs on the withholding side. Tests cover the pure-artifact, pure-prose, unobserved-artifact and mixed forms across each joiner, plus the end-to-end path through behavior_evidence_gap. Removing the clause check fails five of them. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
…nto naren/author-policy-followups
7 of 8 tasks
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.
Finishes the review round for #499, which was squash-merged as
be88fa81before these fixes landed — and whose branch GitHub deleted on merge, which is why these corrections arrive as a separate PR rather than as review commits on the original.Items 1 and 2 are live defects in released code, not polish.
1. A blocking HIGH on legitimate non-Latin author names
The guard rejected every character in Unicode category
C, which includesCf— the format category that holds the zero-width joiners ordinary Persian, Arabic and Devanagari names are written with. Onmaintoday, under both bundled profiles:author_formatis HIGH, so each of those blocks publication. The guard now rejectsCc/Cs/Coplus an explicit set of genuinely dangerous format characters — U+061C, U+200E/F, U+202A–U+202E, U+2066–U+2069, U+FEFF — built withchr(0x…)so no literal control characters sit in the source. The message is now true of what it rejects: "contains control, private-use, or bidirectional formatting characters". Bidi overrides, tabs, private-use and surrogates are still rejected.2. An intranet address reported as having no email address
_BARE_EMAIL_PATTERNrequired a dot in the domain, so an undotted intranet address never matched and fell through toauthor_without_email(INFO) — reported as "Author has no email address" when one is plainly present.root@buildhost,jane@exampleandops@localhostare nowauthor_formatHIGH.The pattern is
[^\s<>@]*\w@\w[^\s<>@]*rather than simply dropping the dot, because dropping it turns the social-handle form the docstring documents into a blocking finding.Jane Doe (@jdoe),Team (@org-handle),@jdoeandPlatform Team @ Exampleall stay clean.3. Documentation that main does not have
docs/tier1-validation.mdxsaid "underregistryeach skill that shares an ID fails", which is true only ofcatalog-summary.json. It now states what is true per surface: the run exits nonzero, each sharing member's entry is"passed": falsewith the conflict undercatalog_findingsand counted inseverity_counts, and the skill's own report keeps its single-skill verdict underreport_verdictbesidereport_scope: "single_skill". Main documented neither of those field names anywhere. The author bullet now also says that joiners are accepted and that an undotted intranet address counts as a bare address.4. Two uncovered branches
test_domain_restriction_rejects_well_formed_author_outside_the_domainpins theshape_ok=True/domain_ok=Falsehalf of the branch; the existing test only coveredshape_ok=False, which now also carries an explicitshape_ok is Falseassertion so the two halves are distinguished.test_a_skill_that_fails_on_its_own_keeps_its_reason_over_the_id_conflictasserts"2/2 skills failed validation", that"3/2"does not appear, and that a skill failing on its own keeps its own reason rather than the conflict one.Neither changes behaviour.
5. A carried advisory now says which skill it came from
The collection aggregator preserved a passing child's advisories with a bare
add_finding, so in a catalog of N skills the findings arrived as an unattributed pile.prefix_findingis extracted frommerge_with_prefix(behaviour-preserving) and a newmerge_advisories_with_prefixgives each carried advisory a[skill]location andmetadata.collection_skill. It never touchespassed, so an advisory from a passing child stays advisory.collection_skillis deliberately not added tomerge_with_prefixitself, which also prefixes rule, workflow andreference/…names where that key would be a lie.The per-skill roll-up message no longer reads "All schema and structure checks passed" directly above a list of advisory findings.
6.
catalog_findingsmakes the severity bump auditableA catalog entry recorded the severity bump from a duplicate-ID conflict without recording what caused it. Each matched conflict is now attached as
{category, check_name, severity, blocking, message}. Only added when the member actually has a conflict, so a clean entry's shape is unchanged. Main's application point inside_write_catalog_summaryis kept — one pass, no double counting — and main's parametrized matrix test is extended to assert the exact contents and"catalog_findings" not in entryfor the non-conflicting member, covering both the serial and parallel paths.Verification
Selection of 11 validator files plus
tests/models,tests/golden,tests/reporting,test_commands.py,test_catalog_discovery.pyandtest_catalog_results.py,-n 6:test_tier3_completed_agent_docs.py::test_validate_tier3_writes_the_same_report_pairbe88fa81Identical failure sets — nothing introduced. That test lives in
tests/reporting, untouched here, and failed on every baseline taken today. The +17 passes are the new cases.ruff checkclean; CHANGELOG entries under## Unreleasedonly, with zero deletions from released sections.Noted for whoever picks this up
merge_with_prefixstill does not tally severity counters, which is why the collection path needs atally_severityloop beside it. Every other caller — rules, workflows, plugin, quality, script-lint, rubric — still under-reportssummary.*_count;html.pycompensates by counting findings directly,json_reporter.pydoes not. Out of scope here, but it is the same class of inconsistency as the rest of this round.🤖 Generated with Claude Code