# DigiDala Alpha 49.2 — Mandala cycles and first-class cell occupations

## Purpose

Harden the internal `pix` economy so a paid cell acquisition is identified by a
first-class occupation event scoped to a Mandala cycle rather than by the reusable
physical `cell_id`.

## Implementation scope

- Add `mandala_cycles` and `cell_occupations` via migration
  `008_mandala_cycles_and_occupations.sql`.
- Preserve existing legacy `pix_ledger` rows unchanged during migration.
- Do not reconstruct historical occupation events that were not recorded by the
  pre-Alpha.49.2 schema.
- Start a new active Mandala cycle whenever a reset/destruction reset completes.
- Create one occupation event for every new cell acquisition.
- Store the Pix price on the occupation event at acquisition time.
- Make new paid cell debits reference `occupation_id`, never `cell_id`.
- Keep occupation creation, Pix debit and live cell ownership in the same server
  transaction.
- Expose the active `cycle_id` and current `occupation_id` in Mandala state
  responses.
- Restore regression coverage for ordinary Sandbox occupation.

## Acceptance criteria

1. A user with zero Pix cannot acquire a paid Support cell, even when that
   physical cell had a debit in an earlier cycle.
2. A reset archives the previous cycle and creates a new active cycle.
3. The same physical cell can be acquired again in the new cycle and produces a
   new occupation and a new debit.
4. A failed debit leaves both the live cell and the new occupation rolled back.
5. Existing legacy ledger amounts, reference types and reference ids remain
   unchanged during migration.
6. Automated project checks remain fully green.

## Local verification

```text
Structure: OK
JavaScript syntax: OK
Unit: 10/10
Integration: 37/37
API: 15/15
Total: 62/62
```

## Release status

`v0.4.0-alpha.49.2` was subsequently committed, tagged, pushed and deployed as
part of the Alpha.49.x release sequence.

Release identity:

```text
Commit:
6428bd4

Tag:
v0.4.0-alpha.49.2
```

The release completed automated verification with 62/62 tests. Manual Telegram QA
was continued in follow-up Alpha.49.x releases.
