Skip to content

Fix startup crash on develop and add CI - #53

Merged
saihgupr merged 2 commits into
saihgupr:developfrom
Liquidmasl:fix/duplicate-assert-auto-managed
Nov 1, 2026
Merged

saihgupr merged 2 commits into
saihgupr:developfrom
Liquidmasl:fix/duplicate-assert-auto-managed

Conversation

@Liquidmasl

Copy link
Copy Markdown
Contributor

Problem

develop currently fails to start. 4233c03 added a second assertAutoManaged next to the one from #50, and since server.js is an ES module Node rejects it before anything runs:

SyntaxError: Identifier 'assertAutoManaged' has already been declared

npm test catches this (all 4 tests fail), but nothing runs the tests on push or PR yet.

Changes

  • server.js: keep a single assertAutoManaged, with the statusCode = 403 from 4233c03. The three retention endpoints now pass that status through like hard reset, soft reset and flush already do, instead of returning 500 in manual mode.
  • .github/workflows/ci.yml: on push to main/develop and on every PR: npm ci, node --check on the server sources, npm test.

Verification

  • On develop without this fix: npm test gives 0 passed, 4 failed (SyntaxError)
  • With this fix: 4 passed, and the CI steps pass on a clean checkout

Side note, not changed here

POST /api/retention/cleanup is registered twice (around lines 3315 and 3928). Express only ever runs the first handler, so the second one is dead code.

🤖 Generated with Claude Code

Liquidmasl and others added 2 commits October 31, 2026 02:01
4233c03 declared assertAutoManaged a second time. server.js is an ES
module, so Node rejects the duplicate and the add-on fails to start on
develop. Keep one definition, carrying statusCode 403, and let the
retention endpoints return it like the reset and flush endpoints do.

Add a CI workflow that syntax-checks the server sources and runs the
manual mode tests on pushes to main/develop and on pull requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@saihgupr
saihgupr merged commit 20515cd into saihgupr:develop Nov 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants