fix(daemons): isolate ecosystem.config test from ambient Paperclip env #248

Merged
andrei merged 2 commits from agent/fullstack/pix-13437 into master 2026-07-10 07:48:32 +00:00
Owner

Зачем

ecosystem.config.test.mjs должен быть детерминированным в обычном shell и внутри Paperclip runtime. Сейчас ambient PAPERCLIP_* переменные переопределяют fallback-значения конфигурации и дают ложное падение теста.

Что сделано

Тест branch-drift-watchdog has Paperclip context for issue creation сохраняет и временно удаляет PAPERCLIP_API_URL, PAPERCLIP_RUN_ID, PAPERCLIP_COMPANY_ID и PAPERCLIP_PROJECT_ID, сбрасывает require.cache, затем восстанавливает исходное окружение.

Почему

Это устраняет cross-test/environment contamination. Runtime-код ecosystem.config.cjs не меняется.

План тестирования

  • pnpm exec vitest run scripts/daemons/ecosystem.config.test.mjs — 9 passed.
  • Полный scripts/daemons Vitest run в исходном PR — green.

Риски

Low: меняется только изоляция теста; production daemon behavior не затронут.

Model Used

OpenAI Codex GPT-5 with shell/tool execution.

  • Я поискал похожие PR и подтверждаю, что дубликатов нет
## Зачем ecosystem.config.test.mjs должен быть детерминированным в обычном shell и внутри Paperclip runtime. Сейчас ambient PAPERCLIP_* переменные переопределяют fallback-значения конфигурации и дают ложное падение теста. ## Что сделано Тест branch-drift-watchdog has Paperclip context for issue creation сохраняет и временно удаляет PAPERCLIP_API_URL, PAPERCLIP_RUN_ID, PAPERCLIP_COMPANY_ID и PAPERCLIP_PROJECT_ID, сбрасывает require.cache, затем восстанавливает исходное окружение. ## Почему Это устраняет cross-test/environment contamination. Runtime-код ecosystem.config.cjs не меняется. ## План тестирования - pnpm exec vitest run scripts/daemons/ecosystem.config.test.mjs — 9 passed. - Полный scripts/daemons Vitest run в исходном PR — green. ## Риски Low: меняется только изоляция теста; production daemon behavior не затронут. ## Model Used OpenAI Codex GPT-5 with shell/tool execution. - [x] Я поискал похожие PR и подтверждаю, что дубликатов нет
fix(daemons): isolate ecosystem.config test from ambient Paperclip env
Some checks failed
security/pr-scan No security concerns detected
PR Quality Gates / PR Quality Gates (pull_request_target) Failing after 5s
Agents CI / API Tests (pull_request) Has been cancelled
Agents CI / Typecheck and Build (pull_request) Has been cancelled
82530b200c
branch-drift-watchdog test hardcoded expected values for PAPERCLIP_API_URL/
RUN_ID/COMPANY_ID/PROJECT_ID but never cleared the ambient env vars before
requiring ecosystem.config.cjs, which only falls back to its defaults when a
var is unset. Any shell where these are already exported (e.g. Paperclip
agent runtimes, this repo's own daemon shells) made the test fail
intermittently. PIX-13437.

All checks passing — ready for review and maintainer approval.

— paperclip-gates

✅ All checks passing — ready for review and maintainer approval. — paperclip-gates
chore: retrigger PR gates after fixing PR body sections (PIX-13437)
All checks were successful
security/pr-scan No security concerns detected
PR Quality Gates / PR Quality Gates (pull_request_target) Successful in 7s
Agents CI / Typecheck and Build (pull_request) Successful in 6m25s
Agents CI / API Tests (pull_request) Successful in 19m18s
4057e3f5cb
Empty commit to fire the pull_request_target synchronize event so
"PR Quality Gates" re-runs against the corrected PR #248 body
(added missing ## Зачем section and dedup-search checkbox).
andrei merged commit 26218d4e69 into master 2026-07-10 07:48:32 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
europa-tech-srl/europa-tech-agents!248
No description provided.