feat
BREAKING
security
task/stream-security-phase2
#1 / 1
feat(security): daily byte limit + accounting in stream path — Phase 2 of issue #51
Pre-check: wire_push_stream now accepts identity_id; on entry (after auth, before the frame loop) it reads musehub_daily_push_bytes for today and yields an ERROR frame (429-equivalent) if bytes_today >= bundle_daily_upload_limit_bytes.
Accounting: _stream_bytes_received accumulates len(raw_content) for every object frame accepted; record_bundle_bytes_uploaded is called on successful push completion so the counter reflects both presign and stream pushes.
The route (wire.py) passes claims.identity_id as the new keyword arg.
4 TDD tests green (test_stream_security_phase2.py); 70 regression tests (test_wire_push_stream + phase1) still pass.
sha256:f5873efcc9d23e7b1d00f7ddce5ab0b559959aaa1ccb05b5b7ec3bf86cdb37dd
sha
+36
~2
symbols
sha256:cef10b0b820cf9df274b6a5d5a0aea9d1854fc6de7b4772a24590506e12cdd4f
snapshot
+36
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
38 symbols
+
test_daily_limit_is_per_user_stream
function
async_function test_daily_limit_is_per_user_stream L284–324
+
test_stream_push_increments_daily_bytes
function
async_function test_stream_push_increments_daily_bytes L153–204
+
test_stream_push_over_daily_limit_yields_error
function
async_function test_stream_push_over_daily_limit_yields_error L208–244
+
test_stream_push_under_daily_limit_completes
function
async_function test_stream_push_under_daily_limit_completes L248–280
← Older
Oldest on task/stream-security-phase2
All commits
Newer →
Latest on task/stream-security-phase2
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:f5873efcc9d23e7b1d00f7ddce5ab0b559959aaa1ccb05b5b7ec3bf86cdb37dd --body "your comment"
No comments yet. Be the first to start the discussion.