photoncloud-monorepo/docs/por/T059-audit-fix/task.yaml
centra eaee9aad08 fix(creditservice): Replace non-existent txn() with compare_and_swap()
- Remove chainfire_client.txn() calls (method doesn't exist)
- Use compare_and_swap(key, 0, value) for atomic wallet creation
- Use put() for wallet updates (CAS on version deferred to later)
- Remove unused proto imports (TxnRequest, TxnResponse, etc.)
- Simplify error handling using CasOutcome.success

This fixes compilation errors found in audit. CreditService now
compiles successfully.

Refs: Audit Fix 1/3
2025-12-12 06:31:19 +09:00

33 lines
1.2 KiB
YAML

id: T059
name: Critical Audit Fix
goal: Fix 3 critical failures blocking MVP-Alpha (creditservice compile, chainfire tests, iam tests)
status: active
priority: P0
assigned: peerB
steps:
- id: S1
name: Fix creditservice chainfire_storage.rs
done: creditservice compiles (cargo check passes)
status: pending
notes: |
Lines 106, 140 call client.txn() but chainfire_client has no txn method.
Options: (A) add txn method to chainfire_client, or (B) rewrite to use compare_and_swap.
Recommended: Option B - use existing APIs.
- id: S2
name: Fix chainfire DELETE operation
done: chainfire integration tests pass (3/3)
status: pending
notes: |
Integration tests fail at integration_test.rs:91 - assertion failed: deleted.
Debug KvService.delete() implementation.
- id: S3
name: Fix iam module visibility
done: iam tests pass (tenant_path_integration)
status: pending
notes: |
iam_service module is private but tests import it.
Change to pub mod or re-export needed types.
- id: S4
name: Full test suite verification
done: All 11 workspaces compile AND tests pass
status: pending