Files
gptplus_machine/docs/superpowers/plans/2026-04-07-register-sentinel-live-fix.md

2.2 KiB

Register Sentinel Live Fix Implementation Plan

For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Replace static register sentinel tokens with live /backend-api/sentinel/req + turnstile.dx generation.

Architecture: Python keeps the HTTP registration flow. A local Node runner handles the current sentinel proof generation and VM execution. Python assembles the final sentinel header and injects it into register/create-account requests.

Tech Stack: Python 3.11+, curl_cffi, built-in unittest, Node.js CommonJS.


Task 1: Add failing tests for the new sentinel integration

Files:

  • Create: tests/test_sentinel_solver.py

  • Create: tests/test_register_live_sentinel.py

  • Step 1: Write failing tests for Python sentinel solving and register flow usage

  • Step 2: Run python -m unittest tests.test_sentinel_solver tests.test_register_live_sentinel -v and verify failure

Task 2: Add the Node VM / proof runner

Files:

  • Create: src/sentinel_vm.js

  • Create: src/sentinel_runner.js

  • Step 1: Add the VM executor and runner CLI

  • Step 2: Run a targeted local smoke command against the runner

Task 3: Add the Python sentinel solver

Files:

  • Create: src/sentinel_solver.py

  • Modify: pyproject.toml

  • Step 1: Implement SDK version discovery, Node subprocess calls, req fetch, and final token assembly

  • Step 2: Run sentinel solver unit tests and verify pass

Task 4: Wire register flow to the live solver

Files:

  • Modify: src/chatgpt_register_http_reverse.py

  • Step 1: Inject the sentinel solver into register flow and remove static fallback use

  • Step 2: Run register flow unit tests and verify pass

Task 5: Verify end-to-end targeted checks

Files:

  • Modify as needed based on failures from prior tasks

  • Step 1: Run python -m unittest tests.test_sentinel_solver tests.test_register_live_sentinel -v

  • Step 2: Run one targeted Node runner smoke command

  • Step 3: Summarize limitations and next checks