this nix flake is heavily based off of prior work i have done in one of my
repos. it comes with the following features:
- building sable: `nix build .#sable` or just `nix build`. creates a `result/`
dir with the built application.
- devshell: nix users now no longer need to do download and install all the
dependencies for sable by themselves. the devshell comes with all the
dependencies needed to develop sable
- checks: `nix flake check` is configured to perform all checks listed in
`CONTRIBUTING.md` (fmt:check, lint, typecheck, knip, test:run)
- formatting: `nix fmt` runs all the formatters pnpm would also call, but
provides a more familiar interface for nix users.
- pre-commit checks: nix users can benefit from having their changes checked for
before the commit goes through. yay :3
`.vscode/settings.json` was updated to include hints for VS Code users using the
"nix env selector" extension to auto-detect the nix dev environment, if you have
nix installed.
I had to change `oxfmt.config.ts` just a tiny bit to make it work with the nix
stuff, because `node_modules` does not exist inside the nix build sandbox. `pnpm
fmt` successfully runs, so nothing should have broken.
`flake-lock-fix.yml` is a small workflow heavily based on
<https://docs.determinate.systems/guides/fix-hashes/>, which triggers on pushes
to `dev` which change `pnpm-lock.yaml`. The workflow uses `determinate-nixd` to
fix hashes in the `flake.nix`, then pushes the changes to `dev` automatically.
### Description
This PR adds the requirement to disclose AI usage on the PR, asking for
an explanation of what any AI generated code does.
With this I hope the AI dramas can end, while also making sure that no
vibecoded bad PR gets through, only the good ones.
I'm open to discussion but let's keep it calm here...
(Oh also, this PR fixes the link at the top of the PR template to link
to our contributing page and not Cinny's.)
#### Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
### Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- Tag all Sentry events with PR number via VITE_SENTRY_PR env var
(instrument.ts: setTag('pr', prNumber) on global scope)
- cloudflare-web-preview.yml: inject Sentry DSN, environment=preview,
PR number, and source-map secrets into build env for PR runs
- New workflow sentry-preview-issues.yml: on every PR push, query Sentry
for unresolved issues tagged with the PR number and environment=preview;
create a GitHub issue per unique error (deduplicated by sentry-id marker),
labelled 'sentry-preview' + 'pr-{N}'; maintain a sticky PR comment
with a summary table; reopen closed issues on regression
- Labels allow filtering: -label:sentry-preview hides all automated issues