Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 58 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,17 @@ do not choose a new design merely to make a check pass.
## Required verification

Work in approved page/asset batches. During editing, run affected focused checks
and record a preview as an iteration, not a release candidate. Run the complete
`pnpm validate:development` gate for the exact final review candidate before
commit/PR and again on the integrated tree after conflicts. Use the same gate on
contributor and maintainer sides. This comprehensive runner remains an explicit
command; do not add it to ordinary build, development, or commit-hook commands.
Public builds keep their translation and shared-visual checks, and the commit
hook keeps attribution and staged lint checks. Avoid repeating the full gate
immediately before `pnpm build`.
and record a preview as an iteration, not a release candidate. Use the reviewed
combined test engine for the exact final candidate, with repository-owned tests
and supplemental checks discovered for that source revision. Use the same
source-specific scope on contributor and maintainer sides. The retired archived
comprehensive suite is not a second mandatory prebuild run. Compilation follows
passing tests and is a separate action; build guards remain required. Existing
public commands and commit hooks are not changed by these instructions. Inspect
their actual bindings and reconcile obsolete gate instructions explicitly before
integration; do not disable hooks or bypass a failure. Avoid repeating a complete
suite or production compile for an unchanged candidate merely because two stages
invoke it; report any still-required duplicate binding rather than hiding it.
Follow the fix-it audit too: prose instructions are not executable tests.
Inspect the plan/inventory for connected native/source/DOM/style suites; report
actual execution, counts, skips and exclusions separately from discovery.
Expand Down Expand Up @@ -102,6 +105,53 @@ collections, watchlists, or databases. A mocked provider pass is not a live
round-trip pass. Perform desktop/narrow and interaction review of changed roles;
John's visual acceptance remains a release gate for this interface work.

## Test-engine maintenance for contributors and maintainers

Read `tools/validation-engine/README.md` and the extracted engine setup guide
before using the saved engine. This is a preserved reusable implementation and
reference packet, not an automatically installed package command. Extract outside
test discovery paths. Do not copy archived test files over the chosen source.

The engine runs the repository's existing test files through their compatible
runners; tests do not need rewriting into an engine-specific format. On every
preview change or upstream merge:

1. Identify changed behavior and all affected test owners, fixtures, mocks,
selectors and shared contracts. Inspect workflow, package and runner discovery
too; a test not used by GitHub can still be required local coverage.
2. Maintain affected tests and fixtures with the implementation. Preserve valid
canonical GitHub assertions. When an approved behavior supersedes an obsolete
local expectation, document the replacement and retain meaningful positive
and negative coverage. Never change application styling or weaken a test merely
to obtain a pass. Update the Fix-it guide for a proven reusable failure mode.
3. Refresh and review discovery, ownership, expected case identities, dependency
impact mappings and source/lock/runtime/recipe pins for the actual candidate.
Add newly introduced tests; remove duplicates only with proved equivalent
coverage on our supplemental side. Do not reuse reference file counts, pass
receipts or a previous revision's inventory as current acceptance.
4. Run focused affected checks during development. For final verification, queue
independent files concurrently using detected effective CPU capacity and a
sealed worker budget, dependency-aware priorities and staggered setup types.
Preserve timing-sensitive/global-state barriers and per-file disposable
fixtures. Share only proven immutable cached inputs, never mutable databases,
mocks or test state. Unknown setup requirements keep the conservative path.
5. Queue genuine failures for an authorized agent or maintainer to diagnose and
repair. The engine does not itself invent fixes. Coordinate conflicting writes
per file, preserve unrelated edits, verify base/after hashes, then freeze a new
candidate and rerun failed tests plus transitive affected checks. Retain green
results only when complete input closures prove them unchanged; unknown impact
requires broader verification. Record raw failures and actual retest receipts.
6. Compile the unchanged passing candidate once at the authorized build gate.
Keep CSS/i18n/security/network guards and separate browser, CodeQL, platform,
packaging and deployment gates visible. A test-engine pass is not the entire
GitHub pipeline. Report files, cases, failures, skips, elapsed time, worker
budget, repairs and remaining gates; visual approval occurs during development
and review, not an exhaustive visual crawl before every compile.

The saved 3.48.1 reference packet does not establish acceptance of this preview or
a later merge. A version-specific compiler experiment is optional, not authority
to patch dependencies or transplant configuration into a different revision.

## Safe collaboration and records

Recommend a helper when an independent task can proceed while the user reviews
Expand Down
3 changes: 2 additions & 1 deletion bin/local-validation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function validateGovernanceSources(agents, hook) {
'docs/maintainers/ui-style-standard.md',
'docs/maintainers/ui-fix-it.md',
'docs/maintainers/ui-forward-merge-guide.md',
'pnpm validate:development',
'tools/validation-engine/README.md',
]) {
if (!agents.includes(route))
throw new Error(
Expand Down Expand Up @@ -187,6 +187,7 @@ export function preflight(
'docs/maintainers/ui-style-standard.md',
'docs/maintainers/ui-fix-it.md',
'docs/maintainers/ui-forward-merge-guide.md',
'tools/validation-engine/README.md',
])
requireFile(root, file);
validateGovernanceSources(
Expand Down
9 changes: 5 additions & 4 deletions bin/local-validation.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,17 @@ test('the comprehensive gate is an explicit package command while ordinary scrip
);
});

test('agent routes require the manual full gate while the normal hook stays bounded', () => {
test('agent routes require the current engine while the normal hook stays bounded', () => {
const agents =
'Read docs/maintainers/ui-style-standard.md docs/maintainers/ui-fix-it.md docs/maintainers/ui-forward-merge-guide.md and run pnpm validate:development';
'Read docs/maintainers/ui-style-standard.md docs/maintainers/ui-fix-it.md docs/maintainers/ui-forward-merge-guide.md and follow tools/validation-engine/README.md';
const hook =
'[ -n "$HUSKY_BYPASS" ] || pnpm attribution:check || exit $?\npnpm exec lint-staged || exit $?\n';
assert.doesNotThrow(() => validateGovernanceSources(agents, hook));
for (const missing of [
'docs/maintainers/ui-style-standard.md',
'docs/maintainers/ui-fix-it.md',
'docs/maintainers/ui-forward-merge-guide.md',
'pnpm validate:development',
'tools/validation-engine/README.md',
])
assert.throws(
() => validateGovernanceSources(agents.replace(missing, ''), hook),
Expand Down Expand Up @@ -376,7 +376,7 @@ test('runtime preflight rejects unsupported engines, dependency drift, and incom
);
f.write(
'AGENTS.md',
'docs/maintainers/ui-style-standard.md docs/maintainers/ui-fix-it.md docs/maintainers/ui-forward-merge-guide.md pnpm validate:development'
'docs/maintainers/ui-style-standard.md docs/maintainers/ui-fix-it.md docs/maintainers/ui-forward-merge-guide.md tools/validation-engine/README.md'
);
f.write(
'.husky/pre-commit',
Expand All @@ -386,6 +386,7 @@ test('runtime preflight rejects unsupported engines, dependency drift, and incom
'docs/maintainers/ui-style-standard.md',
'docs/maintainers/ui-fix-it.md',
'docs/maintainers/ui-forward-merge-guide.md',
'tools/validation-engine/README.md',
])
f.write(path, '# Required source document');
assert.doesNotThrow(() =>
Expand Down
40 changes: 20 additions & 20 deletions cypress/e2e/discover.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,21 @@ describe('Discover', () => {
});

it('loads a trending item', () => {
const movie = {
id: 438148,
mediaType: 'movie',
title: 'Minions: The Rise of Gru',
overview: '',
releaseDate: '2022-06-29',
posterPath: null,
};
cy.intercept('GET', '/api/v1/discover/trending*', {
page: 1,
totalPages: 1,
totalResults: 1,
results: [
{
id: 438148,
mediaType: 'movie',
title: 'Minions: The Rise of Gru',
overview: '',
releaseDate: '2022-06-29',
posterPath: null,
},
],
results: [movie],
});
stubTitleDetails('movie', movie);
cy.visit('/');
cy.contains('.slider-header', 'Trending').scrollIntoView();
cy.contains('[data-testid=title-card-title]', 'Minions: The Rise of Gru', {
Expand All @@ -76,21 +76,21 @@ describe('Discover', () => {
});

it('loads popular movies', () => {
const movie = {
id: 438148,
mediaType: 'movie',
title: 'Minions: The Rise of Gru',
overview: '',
releaseDate: '2022-06-29',
posterPath: null,
};
cy.intercept('GET', '/api/v1/discover/movies*', {
page: 1,
totalPages: 1,
totalResults: 1,
results: [
{
id: 438148,
mediaType: 'movie',
title: 'Minions: The Rise of Gru',
overview: '',
releaseDate: '2022-06-29',
posterPath: null,
},
],
results: [movie],
});
stubTitleDetails('movie', movie);
cy.visit('/');
cy.contains('.slider-header', 'Popular Movies').scrollIntoView();
cy.contains('[data-testid=title-card-title]', 'Minions: The Rise of Gru', {
Expand Down
13 changes: 11 additions & 2 deletions cypress/e2e/library-discover-parity.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,18 @@ describe('Books and Music discover parity', () => {
});

themePalettes.forEach((palette) => {
// Palettes now belong to the signed-in account. Save through the real
// preference API before reload; a legacy browser value must not win.
cy.request('/api/v1/auth/me').then(({ body: user }) => {
cy.request('POST', `/api/v1/user/${user.id}/settings/theme`, {
palette,
})
.its('body.themePalette')
.should('eq', palette);
});
cy.visit('/discover/movies', {
onBeforeLoad(win) {
win.localStorage.setItem('seerr-theme-palette', palette);
win.localStorage.setItem('seerr-theme-palette', 'classic');
win.localStorage.setItem('seerr-theme-mode', 'dark');
},
});
Expand All @@ -160,7 +169,7 @@ describe('Books and Music discover parity', () => {

cy.visit('/discover/movies', {
onBeforeLoad(win) {
win.localStorage.setItem('seerr-theme-palette', palette);
win.localStorage.setItem('seerr-theme-palette', 'classic');
win.localStorage.setItem('seerr-theme-mode', 'light');
},
});
Expand Down
60 changes: 60 additions & 0 deletions docs/maintainers/interface-integration-checkpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,63 @@ Fill these fields with observed facts; unknown means pending, never assumed.
The contributor and Keith's AI must use the same checked-in instructions and
gate, adapted to the newer target without discarding its valid security/backend
fixes. If the target advances, pin the new head and repeat invalidated checks.

## Preview merge and validation — October 4, 2026

This section supersedes earlier descriptions of the current command bindings and
publication authority; historical receipts above remain unchanged. John selected
the accepted preview and authorized integration with Keith's current main,
scoped Fix-it repairs, source-specific engine validation, separate guarded
compilation, and a laptop preview on port 5071 with an independent copy of the
5070 configuration/database. The final preview is shown only after those checks
complete. John's visual review remains required before any PR.

The pinned upstream base is `a96fafa07c77a2d6d95badeb9f60c32a6b4a47c9`
(3.48.3). The exact accepted working-byte checkpoint is
`d9338138acf269a37018d2fedc7b7daa8dce2d2d`, whose common ancestor with upstream
is `e7305281797cd7527c3b1c0a83ff144218ad506a`. The three-way inventory contains
311 accepted paths and 361 upstream paths, 308 overlapping paths, and eight
manual conflicts. The accepted screen semantics are already present upstream;
MediaSlider retains its newer TMDB stale/error retry notice and poster fallback.
Testing instructions are reconciled to the reviewed engine, while actual public
package commands and hooks preserve their existing bindings.

The reviewed combined engine uses this integrated candidate's existing tests and
supplemental checks with fresh inventory, case ledger and source/environment
pins. The archived comprehensive runner is not an additional mandatory test run.
`pnpm build` runs translation/shared-visual guards and compilation separately.
The saved 3.48.1 engine receipt remains historical and cannot certify this source.
All iterative source, dependencies, evidence, caches, test and compile work remain
in Docker-managed Linux storage. The original accepted preview remains preserved.

Current evidence and the bounded Fix-it repair ledger are being recorded in the
owned Linux evidence volume. Final tests, compile, deployment health and visual
acceptance remain pending until their actual receipts are verified. No live
provider writes are authorized by this validation.

## Theme adoption and publication authority — October 4, 2026

John subsequently requested a one-time switch to SeerrNG for new installations
and existing accounts upgrading to this build or a later build containing this
migration. The stable migration adds an account palette default and clears old
active advanced-theme overrides once. After login, another supported palette
can be selected and saved to that account. Later logins and upgrades retain that
choice; the migration is not a per-version or per-login reset. Appearance mode
and unrelated account preferences are preserved.

John explicitly authorized submission to `snapetech/seerrng` after passing tests,
using his previously approved AI disclosure, and automatic follow-up repairs
for relevant PR failures. This supersedes the earlier pending preview-review
publication gate. It does not certify new physical drag/touch, browser/Cypress,
live-provider or PostgreSQL-service testing. The accepted visual decisions remain
his; no new whole-site visual acceptance is claimed.

The pre-theme integrated tree passed the full reviewed engine (3,994 passed,
four existing conditional PostgreSQL skips, zero failures; 555 files) in
344.227 seconds. Its separate guarded compilation completed in 117.572 seconds,
after 11.150 seconds of prebuild guards. Those are historical receipts for tree
`473af0fd9c7479c9e58c043115e285727691ccd7`, not proof for the theme amendment.
John explicitly waived another compile and requested tests only for the amended
source. A fresh source-bound engine run and static checks must establish that
amendment's actual result before publication. No production deployment or merge
of Keith's PR is authorized by this overnight finalization request.
2 changes: 1 addition & 1 deletion docs/maintainers/ui-fix-it.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Use a suitable disposable toolchain and record its versions. Plan discovery
does not certify these external prerequisites. Missing inputs block finalization,
not permission to skip suites, change CI or install tools into the live preview.

1. Inspect `pnpm validate:development --plan`. During an approved edit batch run affected focused checks and label preview evidence as iterative. Run the full gate on the exact final review candidate before commit/PR and on the integrated tree after conflicts. The comprehensive runner is explicit; ordinary build/development scripts and the commit hook retain their existing lightweight checks. `pnpm build` runs translation and shared-visual checks before production compilation. Internal compile aliases are not finalization shortcuts. `pnpm test` shares test partitions only; `pnpm test:ci` is Vitest-only. Browser/Cypress checks are separate. Retain discovery and executed results separately, including counts/skips/platform exclusions; Linux is required for full POSIX tooling parity. Existing CI remains unchanged.
1. Read `tools/validation-engine/README.md` and the extracted engine setup instructions. Regenerate and review the selected source's test inventory, expected cases, ownership, dependency closure, source/dependency/runtime hashes and invocation packets. During repairs, run affected focused checks and label preview evidence as iterative. Run the reviewed combined engine against existing repository tests and source-specific supplemental checks on the exact final candidate and the integrated tree after conflicts. Keep mutable config/database fixtures in disposable scratch storage; preserve provider/network guards and global-state barriers. Queue failures for reviewed diagnosis and repair, then rerun failed checks and their affected dependency closure. The saved 3.48.1 receipt is historical evidence, not acceptance of this candidate. Compile after passing tests with required translation/shared-visual build guards. Public package commands and hooks remain unchanged; the archived comprehensive runner is not a redundant second mandatory run. Browser/Cypress and CI remain separate gates. Retain discovery and executed results separately, including counts/skips/platform exclusions; Linux is required for full POSIX tooling parity.
2. Run focused source/AST checks, effective CSS checks and behavioral tests for changed owners and affected consumers. Reuse existing focused tests instead of building a second verifier architecture or performing an unrelated whole-site audit.
3. Assertions target roles, relationships and actual behavior. Parse CSS correctly across grouped/nested rules; do not use stale utility-name assertions, naive first-brace extraction, or exact text examples as proof of styling.
4. Run proportional lint/type checking and compilation for changed source types/style owners. Check service health only after authorized publication. Compile/type/HTTP success is not human visual acceptance or a successful provider round trip.
Expand Down
14 changes: 8 additions & 6 deletions docs/maintainers/ui-forward-merge-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ workflows or waive required checks. Retain the source manifest and tool versions
1. Follow the fix-it audit against changed assets and their affected consumers,
including effective CSS cascade, structural ownership, dynamic/secondary class
props, hit areas, fixed headers versus scrollers, state, and narrow layouts.
Run `pnpm validate:development --plan` to inspect connected suites, then run
`pnpm validate:development` and one `pnpm build` on the exact integrated tree.
The full runner is explicit; `pnpm build` runs translation and shared-visual
checks before production compilation. Keep an unchanged-source receipt between
validation and build. Do not run the full gate twice. Any failed required
check blocks finalization; do not bypass a hook or redefine success.
Read `tools/validation-engine/README.md` and the extracted setup instructions.
Regenerate and review the source-specific inventory and invocation plan, then
run the combined engine on the exact integrated candidate. Preserve an
unchanged-source receipt, then run one guarded `pnpm build`. The current build
runs translation/shared-visual guards and compilation; it does not run the
engine. Do not repeat the archived comprehensive gate after engine acceptance.
Any failed required check blocks finalization; do not bypass a hook or redefine
success.
2. Retain validation and compilation results with the target's pinned
runtime/dependencies. If validation and compilation are separate phases,
retain an exact unchanged-source receipt before using `build:compile`;
Expand Down
Loading
Loading