| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-05-21 | 5.1 kB | |
| v4.2.4 -- Round 4 20-module deep improvements source code.tar.gz | 2026-05-21 | 248.7 MB | |
| v4.2.4 -- Round 4 20-module deep improvements source code.zip | 2026-05-21 | 251.3 MB | |
| Totals: 3 Items | 500.0 MB | 0 | |
Round 4 — 20-module deep improvements sweep. A single release bundling 20 parallel module-deep audit + fix passes on previously under-tested modules. Every module touched here got a baseline pytest file; combined ~140 new tests, no regressions.
Security (P0 / P1)
teams: critical RBAC bypass closed.create_team,add_member,remove_memberhad noverify_project_accessgate — any authenticated user could create teams in any project and self-elevate toowner/project_manager, inheriting elevated permissions. Service-layer project-access check + self-elevation block on elevated roles.architecture_map: critical information disclosure closed. WasDepends(get_current_user_id)only → every viewer / estimator could enumerate the full ERP architecture (table names, model columns, module deps). Now requiresarchitecture.readadmin permission.rfq_bidding: award role gate.award_bidonly requiredrfq.update(EDITOR) but the FSM declares admin / manager. Added service-layer 403 check on{admin, manager, owner}. Also: bid-submission state-escape blocked, past-deadline submissions 409.smart_views: federation read leak closed._can_readreturnedTrueblindly for federation scope. Closes backlog [#103] (federation visibility staleness on owner change) via new event subscriber onprojects.project.updated.opencde_api:$orderbyallowlist + LIKE-wildcard injection on labels filter.pipelines:create_pipelineIDOR (acceptedproject_idfrom body withoutverify_project_access).coordination_hub: silent write oncoordination.readGET (viewers were committing seed rows).compliance_docs+correspondence: magic-byte upload endpoints. Mirror v4.2.1 punchlist + v4.2.3 AI fixes.correspondence: CRLF subject sanitisation (email-header injection block).contacts: PII redaction in logs + import-error responses + duplicate-email race (IntegrityError → 409).erp_chat: history role / length sanitisation. Smuggledsystemrole inconversation_historynow dropped — kills prompt-injection via fake system turn.ai_agents: tool-context spoofing fix +Idempotency-Keyheader dedupes retries.clash_ai_triage: rate limit added to triage / batch / replay endpoints + 180 s wall-timeout + structured per-call cost log.enterprise_workflows: action_type whitelist + MAX_STEPS=32 cap + role validation.
Correctness
clash_cost_impact: Decimal-exact rollup (kills 0.005 × N drift on large projects) +ROUND_HALF_UPinstead of banker's even.coordination_hub: warn / error threshold invariant (inverted pairs could persist and silently break the elif-cascade).rfq_bidding: money / currency Decimal validation + 3-letter ISO normalisation + latentMissingGreenletfixed (ORM access afterexpire_all()— hidden in prod because priortry: except: passaudit-log catch swallowed it).markups+dwg_takeoff: Float → Numeric onmeasurement_value,pixels_per_unit,real_distance,scale_override,thickness,scale_denominator. Float precision drift no longer leaks into BOQ via takeoff / markups.dwg_takeoff: magic-byte validation moved pre-write.compliance_ai: was stub-only. BuiltPOST /from-nlwith auth + rate-limit + 2000-char input cap + 1024-token AI cap + structured verdict log +_log_failures-wrapped event publish. Fixed latent double-prefix bug.smart_views: federation views now appear inlist_visible_to_user(were excluded entirely).
Performance
opencde_api: N+1 increate_topic—len(list(...))over every project row →SELECT COUNT(*).project_intelligence: LLM LRU cache (sha256-keyed, 60 s TTL) + bounded state cache (was unbounded → memory leak on long-lived process).pipelines: max-nodes cap (256), per-nodeasyncio.wait_fortimeout (300 s), row-ids cap (5000) onsource.boq/transform.filterenvelopes.
Observability
- New structured cost / outcome logs across:
erp_chat,ai_agents,clash_ai_triage,project_intelligence,compliance_ai,pipelines,coordination_hub,teams,enterprise_workflows. Each emits a singlemodule.operationINFO record with relevant fields. architecture_mapwrites per-endpoint audit log of who's enumerating system architecture.teamspublishesteams.team.{created,updated,deleted}+teams.membership.{added,removed}for permission-cache invalidation.compliance_docspublishescompliance_docs.expiry.alerton status transitions.
DB migrations
v3097_markups_measurement_numeric(merges two heads)v3097_dwg_takeoff_decimal_quantitiesv3098_correspondence_attachments_column
Single head at v3098.
Tests
About 140 new tests across 20 module test files. No regressions in adjacent suites.
Notes
cost_match was found to be a stub-only module (matching logic lives in match_elements; cost_match is reserved for T12 assembly material-layer matching). Baseline tests pin current shape with a guard that fails when models.py lands.