judicial-actions
judicial-actions records court decisions and orders signed on a magistrate's phone, and the police's replies to a court's status requests. Every action that changes a case calls fir-registry.ApplyCourtOutcome in the same transaction, so the order and the change to the case commit together, and the police app sees the court's outcome at once.
Courts cannot rewrite police records: they change a case only through the fir-registry state machine. Police cannot manufacture an order either, because every order carries a magistrate's signature, which both chaincodes verify.
- Chaincode-level endorsement: the judiciary and one state police organisation.
- Key-level policy of each record: the judiciary and the case's state police.
- Private data:
stateA_private,stateB_privateandjudiciary_private.
Records
| Record | Holds |
|---|---|
judicialAction | The order's type, case, court, outcome, court reference (for example CRL.M.C. 1234/2026), related referral, report or arrest, type-specific fields (CNR number, hearing time, custody type and days, target station, High Court case number, order date and hash), and the commitment of the reasons |
statusRequest | The court, the items asked, the days allowed, the due day, and the police reply once given |
The reasons for a decision are free text that may name people, so they are private: they sit in the case's state collection, readable by that state's police and the judiciary, with a public commitment on the ledger. A magistrate's working notes sit in judiciary_private, readable only by their author. Reasons must be at least 20 characters.
Actions
Unless stated otherwise, the signer is a magistrate presiding over a court with jurisdiction over the case's station, either directly or through an active link-court delegation.
| Action | What it does | Change to the case |
|---|---|---|
court.referral_decide CONFIRM_LINK | Decides that a referred complaint is the same incident as an existing case | REFERRED to LINKED |
court.referral_decide OVERRIDE | Decides it is a different incident and orders it registered | Back to its status before the referral; the police then register it |
court.referral_decide LINK or NOT_DUPLICATE | Decides a referral about an FIR that is already registered | None; records the link or closes the referral |
court.closure_decide ACCEPT | Accepts a closure report | CLOSURE_REPORT_FILED to DISPOSED |
court.closure_decide FURTHER_INVESTIGATION | Orders further investigation (BNSS s.193(9)) | Back to UNDER_INVESTIGATION |
court.cognizance | Takes cognizance of a chargesheet (s.210(1)(b)) with the CNR number | CHARGESHEET_FILED to IN_COURT |
court.remand | Police or judicial custody for at most 15 days per order. Any magistrate of the state may sign it (s.187(2)). | None; updates the arrest timeline and the default-bail clock |
court.bail | Grants or refuses bail, regular or default bail under s.187(3). The High Court registry may also record High Court bail orders. | None; a grant releases the accused |
court.remand, court.bail with superior | Records an order of a Sessions Court or the High Court received by the court below, which must name a registered court order document and cannot be dated in the future | As the court's own order |
court.quash_record | Records a High Court order quashing the FIR. Signed by the High Court registry, or by a magistrate recording the order received. The order document must be registered first. | Any status from ZERO_FIR_TRANSFERRED to IN_COURT, to QUASHED |
court.transfer | Transfers the investigation to another station in the court's transfer list | Same state: the station changes at once. Another state: a transfer order waits for the SHO's handover |
court.status_request | Asks the station why it is late, what is pending, or when it will file, with 3 or 7 days to reply (s.193(1)) | None |
police.status_reply | The SHO's or IO's reply | None; the request becomes REPLIED |
court.dispose | Records the outcome after trial: convicted, acquitted, discharged, compounded, abated or other | IN_COURT to DISPOSED |
court.erasure_order | Orders erasure of named classes of private data, for the data owners' registrars to carry out | None; recorded on the case |
court.notes | Saves the magistrate's private working notes | None |
Court actions may wait up to 30 days in the court app's offline queue before they are sent, so the maximum age of every court.* action is 30 days.
How a court order reaches the case
Queries
| Query | Purpose |
|---|---|
GetJudicialAction, ListJudicialActionsForCase, SearchJudicialActions | Orders and decisions |
GetStatusRequest, ListStatusRequestsForCase, OpenStatusRequests | Status requests and replies |
ReadPrivate, ReadPrivateBatch | Signed reads of reasons, request notes and replies; court notes only for their author |
Source: digifir-chaincode docs/SPEC.md section 5 and section 3.12.