Cane Agency · APP Seriesสถาบันอ้อย · ชุดเอกสาร APP
This is the OCSB — regulator office (สอน.) perspective of SPEC-APP for the ocsb capacity. Cross-cutting content lives in the master; the single source of truth is the graph. Re-homed and renamed by PROP-015 (v0.2.0) — formerly SPEC-APP-GOV at docs/gov/ocsb/.
นี่คือมุมมอง สำนักงานคณะกรรมการอ้อยและน้ำตาลทราย (สอน.) ของ SPEC-APP สำหรับ capacity ocsb เนื้อหาข้ามมุมมองอยู่ในเอกสารหลัก แหล่งความจริงเดียวคือ graph ย้ายและเปลี่ยนชื่อโดย PROP-015 (v0.2.0) — เดิมคือ SPEC-APP-GOV ที่ docs/gov/ocsb/
Rendered from the graph (v0.4.0, PROP-018 P3 — federation.entitlementMatrix · roles · requirements). A tenant's surface entitlement is the UNION over its active capacities and the compiled srf claim must equal it (NFR-15); the roles below are the role set grantable on this capacity's surfaces (one role per surface per membership), and the requirement index lists every functional requirement whose surfaces intersect this capacity's entitlement.
Render จาก graph (v0.4.0, PROP-018 P3 — federation.entitlementMatrix · roles · requirements) สิทธิ์ surface ของ tenant คือ UNION ของ capacity ที่ active และ claim srf ที่คอมไพล์ต้องเท่ากันเสมอ (NFR-15); role ด้านล่างคือชุด role ที่ให้ได้บน surface ของ capacity นี้ (หนึ่ง role ต่อ surface ต่อ membership) และดัชนีข้อกำหนดแสดง functional requirement ทุกข้อที่ surface ตัดกับสิทธิ์ของ capacity นี้
| Role id | Nameชื่อ | SurfacesSurface | Noteหมายเหตุ |
|---|---|---|---|
| owner | Owner (fixed-full role) · เจ้าของ | every entitled surfaceทุก surface ที่มีสิทธิ์ | Fixed-full role — holds every permission, undeletable.Role เต็มแบบตรึง — ถือทุกสิทธิ์ ลบไม่ได้ |
| regulator_officer | Regulator officer · เจ้าหน้าที่ สอน. | ocsb | — |
| FR | Requirementข้อกำหนด | SurfacesSurface | Priorityลำดับ |
|---|---|---|---|
| FR-10 | Reports & exports (CSV/PDF) | portal · ocsb | P1 |
| FR-11 | Bilingual UI (Thai default, English secondary) | website · portal · mobile · ocsb | P0 |
| FR-14 | Tenant provisioning & membership linking (org tenants + individual tenants, invitation/linking) — v6.0: superseded in substance by FR-60…63; retained for traceability | account · portal · website | P0 |
| FR-19 | Regulator portal: per-truck CCS audit, publishing Board-approved (กอน.) regional price announcements, oversight dashboards | ocsb | P1 |
| FR-20 | Central sugar bidding & distribution monitoring (concept) | ocsb | P2 |
| FR-31 | CCS audit trail: sampling, re-test capture, deviation findings, adjustment hooks | ocsb | P1 |
| FR-32 | Burnt-cane compliance reporting per mill per day (sliding deduction, breach flags) | ocsb · portal | P1 |
| FR-33 | Revenue account (70:30) drafting & publication driving price announcements | ocsb | P1 |
| FR-35 | Data-sharing consent (PDPA): scoped, time-boxed, revocable; enforced on every cross-tenant read | finance · account · mobile · portal | P0 |
| FR-44 | Contractor onboarding: contractor capacity on an individual or organization tenant (WF-24/25 branch); verification; capacity move keeps the record | dispatch · account · website | P0 |
| FR-60 | One federated sign-in per person (phone OTP + external OIDC providers); tenant-context switcher; exactly one active tenant per token; re-issue on switch | account · all | P0 |
| FR-61 | Tenant & capacity management: found tenant, request/grant/suspend/revoke capacities, per-capacity verification levels, exclusivity enforcement | account | P0 |
| FR-62 | Entitlement compiler: srf = union of the entitlement matrix over active capacities; surface switcher renders exactly the claim | account · all | P0 |
| FR-63 | Memberships & surface-role grants: invite by phone, one role per surface per membership, owner fixed-full, template role sets per capacity | account | P0 |
| FR-64 | Permission catalogs & role × permission matrix authoring per surface, owner column locked, locked chips for unreachable surfaces | account | P1 |
| FR-65 | Scope overrides: province / district / mill_zone / quota_network / field_set, equal-or-narrower enforced | account | P1 |
| FR-66 | ConsentGrant generalized to tenant↔tenant with capacity-aware scopes; grant/revoke UI on account surface | account · finance | P0 |
| FR-68 | Platform view-as sessions: permission-gated start, persistent banner, dual logging, session record | account · portal · dispatch | P1 |
| FR-69 | Migration & merge tooling: tenant→party and user→person mapping, phone-verified assisted person merge, full audit of every merge | account | P0 |
| FR-70 | Admission classes: capacities carry `admission` (self_serve | invitation); invitation-only capacities (mill, bank, government, operator) grantable ONLY against an open operator-issued Invitation; self-requests rejected with an explain-and-redirect state (WF-25/28) | admin · account | P0 |
| FR-73 | Representative → active conversion preserves mill_id, tenant_id and every quota/designation/plan link (continuity promise, WF-29) | admin · account | P0 |
| FR-84 | Confidentiality controls — hard wall from the government surface + ConsentGrant scope strategic_terms for private cross-tenant sharing | portal · account | P0 |
| FR-94 | Confidential inheritance — PROP-009 strategic postings visible in the owner's books but excluded from any statement shared to the government capacity | portal · account | P0 |
| FR-105 | Per-tenant accounting basis: BooksProfile.default_basis seeds each new FiscalPeriod (cash | accrual), editable by the books owner; a change applies to the next open period only, never a closed or in-flight one (reproducibility, NFR-25) | portal · mobile · account | P1 |
| FR-107 | Books editions — unified vs split AR/AP + cash surfaces: mill fixed split, grower fixed unified, quota & contractor upgradeable to split via the operator-granted books_split entitlement; books_edition is a derived read, not a data fork | portal · admin · account | P2 |
Full requirement definitions and the non-functional set live in SPEC-APP Sections 4–6 (unchanged addresses).
นิยามข้อกำหนดฉบับเต็มและชุด non-functional อยู่ใน SPEC-APP ข้อ 4–6 (ตำแหน่งเดิม)
| Revฉบับ | Dateวันที่ | Changeการเปลี่ยนแปลง |
|---|---|---|
| 0.2.0 | 2026-07-12 | PROP-015: renamed capacity government→ocsb and surface regulator→ocsb; re-homed to docs/app/gov/; folded the กอน. Board governance (Section 3) in from the retired SPEC-APP-BOARD. Redirect left at the old path.PROP-015: เปลี่ยนชื่อ capacity government→ocsb และ surface regulator→ocsb; ย้ายมา docs/app/gov/; ยุบการกำกับของ กอน. (Section 3) จาก SPEC-APP-BOARD ที่ยกเลิก มี redirect ที่พาธเดิม |
| 0.1.0 | 2026-07-11 | Initial split from the area master (PROP-014, spec v0.1.0).แยกจากเอกสารหลัก (PROP-014, spec v0.1.0) |
| 0.3.0 | 2026-07-13 | PROP-018 P3 (spec v0.4.0): generated Access contract (Section 4) — entitled surfaces, grantable role set and the functional-requirement index binding this capacity, rendered from the graph (federation.entitlementMatrix · roles · requirements).PROP-018 P3 (spec v0.4.0): เพิ่มสัญญาการเข้าถึงที่ generate (ข้อ 4) — surface ที่มีสิทธิ์ ชุด role ที่ให้ได้ และดัชนี functional requirement ที่ผูกพัน render จาก graph (federation.entitlementMatrix · roles · requirements) |
| 0.4.0 | 2026-08-03 | PROP-073 (spec v0.47.0): one word — Tenant. Party → Tenant, party_id (and every prefixed form) → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, party context/switcher → tenant context/switcher, cross-party → cross-tenant, organisation → organization, and ผู้เล่น retired as the Thai gloss (the Latin word tenant instead, R-THAI). Hold list untouched: counterparty · third party · tripartite working group · Person*/person_id; display codes and token claims were held by R-NULL for one release and then MOVED at v0.47.1 on client decision (C-1), because no token has ever been SIGNED — no auth exists in the built ocsb/ocsf prototypes — and the only printed codes were eight fixture strings in apps/ocsf/fund-shell.jsx, swept in the same pass: PTY- → TNT-, TCA- → TCA-, TQL- → TQL-, claim tnt → tnt, claim dep → dep. Carried in the same pass: the PROP-075 rectification — the retired directory noun domain becomes department (A-82 R-ONETREE), so one tree has one name.PROP-073 (spec v0.47.0): คำเดียว — Tenant Party → Tenant, party_id ทุกรูป → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, cross-party → cross-tenant และเลิกใช้ ผู้เล่น เป็นคำแทนวัตถุนี้ในภาษาไทย (ใช้คำละติน tenant ตาม R-THAI) รายการห้ามแตะไม่ถูกแตะ: คู่สัญญา · third party · คณะทำงานไตรภาคี · Person*/person_id; รหัสแสดงผลและ claim ถูก R-NULL คงไว้หนึ่งรุ่น แล้วย้ายที่ v0.47.1 ตามการตัดสินของลูกค้า (C-1) เพราะยังไม่มีโทเคนใดถูกลงนาม (ต้นแบบ ocsb/ocsf ที่สร้างแล้วไม่มีระบบ auth) และรหัสที่พิมพ์มีเพียงแปดสายใน apps/ocsf/fund-shell.jsx ซึ่งถูกกวาดในรอบเดียวกัน: PTY- → TNT-, TCA- → TCA-, TQL- → TQL-, claim tnt → tnt, claim dep → dep รอบเดียวกันแก้ค้างจาก PROP-075: คำนามไดเรกทอรีที่เลิกใช้ domain เปลี่ยนเป็น department (A-82 R-ONETREE) |
| 0.4.1 | 2026-08-03 | PROP-073 PATCH 1 (spec v0.47.1 / v0.47.2 / v0.47.3 as applicable): the identifiers v0.47.0 had held, moved on client decision. PTY-######## → TNT-######## · PCA-######## → TCA-######## · PQL-######## → TQL-######## · token claim pty → tnt · token claim dom → dep (v0.47.1, C-1 — R-NULL had held them as a stored VALUE and a wire format; reversed because no token has ever been signed and the only printed codes were fixture strings). quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2 — org is organization abbreviated, not a resemblance). The retired role LABEL swept as a phrase family and quota organization naming the tenant → quota group / กลุ่มโควตา (v0.47.3). All retired forms are in the FR-396 crosswalk and refused in new text by NFR-142.PROP-073 PATCH 1 (spec v0.47.1 / v0.47.2 / v0.47.3 ตามที่เกี่ยวข้อง): ตัวระบุที่ v0.47.0 คงไว้ ถูกย้ายตามการตัดสินของลูกค้า PTY- → TNT- · PCA- → TCA- · PQL- → TQL- · claim pty → tnt · claim dom → dep (v0.47.1, C-1) · quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2) · ป้ายชื่อบทบาทที่เลิกใช้และ องค์กรโควตา ที่เรียก tenant → กลุ่มโควตา (v0.47.3) ทุกรูปที่เลิกใช้อยู่ในตารางแปลง FR-396 |