Repository navigation
chore: add optional advisory TinyNod review to pre-push - #3275
Merged
Merged
Conversation
Salesforce employees can opt in (git config dsr.tinynod.enabled true) to a local TinyNod AI review of the pushed commit, run by the husky pre-push hook after the snapshot check. It is off by default, prints nothing when not opted in, never blocks a push, and CI never runs it. Adapted from salesforce/zana's opt-in TinyNod hook. Adds the setup guide, a CONTRIBUTING section, and AGENTS.md rules so coding agents suggest it and report its result honestly. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Run scripts/tinynod-pre-push-review.ts with tsx, like release.ts, so `npm run typecheck` covers it. Document that new scripts in scripts/ are TypeScript. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
interactivellama
force-pushed
the
chore/tinynod-local-review
branch
from
November 2, 2026 19:11
422b4fd to
af438ba
Compare
4 of 10 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.
Infra/review only. Does not touch production code.
Additional description
Adds an opt-in, advisory TinyNod AI review to the husky
pre-pushhook for Salesforce employees, and tells coding agents (via AGENTS.md) to suggest it and report its result honestly. Modeled on salesforce/zana's TinyNod setup, much reduced: no snapshot worktree, lock or history ledger.Behavior
tinynod, so external contributors and CI are unaffected.git config --local dsr.tinynod.enabled true.DSR_TINYNOD_REVIEW=1|0overrides it for one push, andTINYNOD_SKIP_HOOK=1skips it.warning, neverclean.origin/master.tinynodor a version older than 2.5.0, pushes tomaster/tags, deletions, multi-commit pushes, a pushed commit that is notHEAD, and docs-only pushes.Files
scripts/tinynod-pre-push-review.ts: the adapter, run withtsxlikerelease.ts.husky/pre-push: captures the ref tuples, runs snapshots, then the adapter (|| true)AGENTS.md/docs/codebase-overview.md: new scripts inscripts/are TypeScript (.ts+tsx, type-checked bytsconfig.scripts.json)docs/tinynod-local-review.md: setup, opt-in/out, results, AI fix prompt, troubleshooting, data policyCONTRIBUTING.md: a short "Optional: Local TinyNod Review (Salesforce Employees)" sectionAGENTS.md: agents suggest it when it isn't configured, don't enable it themselves, report status/skip reasons, and never use skip flags to hide findingsscripts/__tests__/tinynod-pre-push-review.test.mjs: 16 tests. End-to-end runs use a stubtinynodin a throwaway repo, so nothing reaches the gateway.Hand-checked against the real hook, including a live TinyNod 2.5.1 review (6 low-value findings, all false positives): when opted out, only the snapshot check runs. When opted in with no
tinynodon PATH, it printsskipped: tinynod not found on PATHand the push continues.CONTRIBUTOR checklist (do not remove)
Please complete for every pull request.
Green gate — all of these must pass locally (CI runs the same):
npm run lintpasses with 0 errors (npm run lint:fixto auto-fix). Warnings are the tracked gradual-migration backlog; do not add new errors.npm run typecheckis clean (tsc --noEmit).npm test -- --runpasses — this runs both Vitest projects (jsdomunit+ real-browserbrowser) and the story HTML snapshots. If you changed rendered markup on purpose, update snapshots withnpm test -- --run -uand review the diff.npm run buildsucceeds (type-check + Vite library build +.d.ts+ entry shims). Fails onmastertoo, intest:exports(utilities/hooksis missing itsdefaultexport in ESM/CJS). Not related to this PR.Behavior & docs:
components/button/__tests__). New props and bug fixes should get a regression test. Tests that genuinely need a real browser (focus traversal, layout/measurement, canvas) go in a*.browser.test.jsxfile (thebrowserproject); everything else is jsdom.npm run storybook→ http://localhost:6007/. Confirm the story actually renders and behaves (deprecated Storyshots/Karma are gone; there is no separate browser-tests server). N/A, tooling only.content/visualPickerFigure, render props likerenderItem,iconprops,events), not assumptions — a common source of "component looks broken" reports has been stories authored against the wrong API. Cross-check againstcomponents/<name>/__examples__. N/A..d.ts(they're generated by the build); JS consumers rely on them via editor type-acquisition. N/A.REVIEWER checklist (do not remove)
CIworkflow: lint, typecheck, test, build). Chromatic visual review, if configured, has been checked.components/__tests__/__snapshots__/story-snapshots.test.jsx.snap).@salesforce/design-system-react/components/<name>and nested paths resolve for ESM, CJS, and types). Removing/renaming a public component or export is a breaking change →feat!:/BREAKING CHANGE:and a major version bump.