WORKED SOLUTIONS — TRY THE WORKSHEET FIRST
Run code snippets from the extracted software-kit directory with Python.

1. Order('Z','web',0) succeeds. True/-1/'12000' fail ValueError. bool is an int subtype,
so exact type checking matters. frozen=True prevents ordinary reassignment, not malicious access.

2. Each __init__ creates its own dictionary. Changing summary()['by_channel']['web'] changes
only the returned copy. A repeated ID fails before mutation; original record stays intact.

3. Runnable structure solution:
from pathlib import Path
from collections import deque
from dch_orders import strict_json
rows = strict_json(Path('orders.json').read_text())['orders']
ids = [r['order_id'] for r in rows]
assert ids == ['F01','F02','F03','F04']
assert len(ids) == len(set(ids))
index = {r['order_id']: r['amount_cents'] for r in rows}
assert index['F03'] == 15000
assert {r['channel'] for r in rows} == {'web','store'}
queue = deque(ids)
assert queue.popleft() == 'F01'
A set is for membership, not FIFO or resolving conflicting source versions.

4. Comparison counts (list comparisons, set membership calls):
0:(0,0), 1:(0,1), 20:(190,20), 200:(19900,200).
Formula n(n-1)/2. Both indexes consume O(n) storage. Counts are not elapsed time.
Expected hash membership assumptions must be stated; no universal timing guarantee.

5. CLI valid: exit 0, JSON count4,total40000,web27000,store13000. Invalid fixture: exit2,
no stdout and generic rejection category on stderr. Missing import path differs from a bad input.
A source package is not a published distribution. Venv is not a security sandbox or dependency lock.

6. Real HTTP: health200, valid POST200 and known totals, unknown404. Use the printed port,
not a guessed fixed port. Close clients and stop the service. Test suite cleans up its own socket.

7. Add methods to tests/test_http.py inside HTTPTests:
    def test_boolean_money(self):
        self.assertEqual(self.post('{"orders":[{"order_id":"B","channel":"web","amount_cents":true}]}')[0],422)
    def test_repeated_json_key(self):
        self.assertEqual(self.post('{"orders":[],"orders":[]}')[0],400)
These distinguish schema validation from parsing ambiguity. Do not retry invalid inputs blindly.

8. Three commands appear in README and workflow. A wrong40001 expected total must fail.
Do not claim hosted CI ran from the presence of YAML. Optional workflow has no production deploy.

9. Runnable extension:
from pathlib import Path
from dch_orders import from_payload,strict_json,Order
ledger = from_payload(strict_json(Path('orders.json').read_text()))
ledger.add(Order('F05','store',2000))
assert ledger.summary() == {'count':5,'total_cents':42000,'by_channel':{'web':27000,'store':15000}}
try:
    ledger.add(Order('F05','store',2000))
except ValueError:
    pass
else:
    raise AssertionError('Duplicate should have failed')
assert ledger.summary()['total_cents'] == 42000

Handover example: We summarized five fictional completed-order observations in EUR cents.
The reference four-row baseline remained40000; our separately tested extension adds2000.
The model rejects duplicate IDs rather than overwriting them. We tested CLI and real loopback HTTP
with the documented environment. No public service, Linux permission drill, cloud deployment,
production financial claim or hosted CI execution is implied. Identify your own actual changes.
