Repository navigation
feat(cli): skipContrastInMotion moves to HF_TOOL_CONTEXT check-review - #6400
Merged
Merged
Conversation
The --skip-contrast-in-motion flag and HYPERFRAMES_CHECK_SKIP_CONTRAST_IN_MOTION env give way to a check-review capability in HF_TOOL_CONTEXT, so only a harness turns it on. The skill text and manifest go back to main.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
6 tasks done
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 137 of thoseThe gate passes. Quarantined, measured but not gated (0) |
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head 8153246
Scope
- Parsing:
parseCheckReviewsets the switch only on strict=== true. A non-object capability (including an array) is dropped, a missing field or a field that is nottrue(1,"1") isfalse, and unknown fields are ignored. Bad JSON or a wrongversionstill returns{}. events/project-lock: the parsers and return spreads are unchanged.projectLock.tsstill reads its ownreadToolContext(). Withoutcheck-reviewthe returned object is the same as before, so the existingtoEqualcases still hold.- Propagation:
parseCheckOptionsis the only producer ofskipContrastInMotion.checkPipeline.ts:607andcheckBrowserconsume it unchanged. A grep finds no remaining references to the flag or the env var. - Default output: with no capability the key is absent, the same as base with the flag off.
- Compat: #6396 (
afdad4ea3) is in no release tag (v0.8.201 predates it), so removing the flag and env var breaks no shipped interface. Theskills/hyperframes-cli/tree matchesafdad4ea3~1, and the manifest hash is back to08a4a3a815d71988. - CI: every workflow on this head passed, including required Typecheck, Test, Windows, Skills manifest and edit-accuracy gate.
4 tasks done
4 tasks done
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.
What
The switch from #6396 that leaves out contrast failures measured mid-animation moves from a CLI flag and an
environment variable to a field in
HF_TOOL_CONTEXT:{ "version": 1, "capabilities": { "check-review": { "skipContrastInMotion": true } } }--skip-contrast-in-motionandHYPERFRAMES_CHECK_SKIP_CONTRAST_IN_MOTION.check-reviewcapability parsed byreadToolContext(). Its only field for now isskipContrastInMotion. A value that is nottrueis off, and unknown fields are ignored.contrastMotion.ts, the in-page read incheckBrowser.ts) is unchanged.Without the capability,
checkoutput is byte-identical to today's.Why
This switch is for harnesses that show check output to an agent, not for people at a terminal. As a flag it added
a row to
hyperframes check --help, to the CLI docs and to thehyperframes-cliskill, so every terminal user andevery agent reading the skill saw an option meant for one kind of caller.
HF_TOOL_CONTEXTis the documentedinterface a harness already uses to tell the CLI what it can do (
events,project-lock), so any harness can optin there and the CLI surface and skills stay as they were before #6396.
Related work
Follow-up to #6396 (merged as afdad4e). #6401, stacked on this one, adds a second
check-reviewfield,findingFrames.How
toolContext.ts:ToolContext.checkReviewandparseCheckReview, next to the existingeventsandproject-lockparsers.check.ts:parseCheckOptionsreadsreadToolContext().checkReview?.skipContrastInMotioninstead of theflag and env var. The flag definition and the
envFlagEnabledimport are gone.check-reviewsection indocs/developers/harness-tool-context.mdx. Indocs/packages/cli.mdxtheflag-table row is removed and the paragraph about the rule now points at the capability.
skills/hyperframes-cli/references/lint-validate-inspect.mdis reverted, andskills-manifest.jsongoes back to the pre-feat(cli): opt-in check flag that leaves out contrast measured mid-animation #6396 hash forhyperframes-cli.Test plan
check.test.tsturns the switch on throughHF_TOOL_CONTEXTinstead of the flag;toolContext.test.tscovers parsingcheck-reviewfields as booleans that default tofalse.vitest run src/commands/check.test.ts src/utils/toolContext.test.ts src/utils/contrastMotion.test.ts src/utils/checkBrowser.test.tsin
packages/cli: 4 files, 210 tests passed.tsc --noEmitinpackages/cli: clean.oxlintandoxfmt --checkon the changed files: clean.gen:skills-manifest --check: in sync.scripts/lint-skills.tsandcheck-skill-mirror.mjs: no issues.Not covered
checkrun on this commit; the motion rule's code is the same as feat(cli): opt-in check flag that leaves out contrast measured mid-animation #6396's, which wasexercised there.
HF_TOOL_CONTEXTby hand.