{
  "sourceCommit": "acd94767d0c691697ea611f3adc31d3499e537ce",
  "sources": [
    {
      "fileName": "icetakes/app/article-retrieval.bosatsu",
      "source": "package Icetakes/ArticleRetrieval\n\nfrom Bosatsu/Predef import (\n  String, Int, Bool, List, Option, Some, None, Unit,\n  True, False, EQ, cmp_Int, eq_String, concat_String, int_to_String\n)\nfrom Yichus/Access import Principal, AccessSpec, AccessRule, OwnerScoped, GuardedOrRoles, owner_key\nfrom Yichus/ArticleFetch import (\n  ArticleRequest, ArticleFetchResult, Fetched, Blocked, RetryableFailure,\n  PermanentFailure, TimedOut, fetch_article\n)\nfrom Yichus/Data import Db\nfrom Yichus/IO import IO, pure, flat_map\nfrom Yichus/Job import (\n  Job, LeaseToken, Claim, ClaimApplied, ClaimRefused,\n  JobError, JobResult, JobApplied, JobRefused, LeaseExpired, LeaseHeld, StaleLease, TerminalJob,\n  job_id, job_fencing_version,\n  lease_error, claim_transition, complete_transition, fail_transition,\n  permanent_fail_transition, expire_transition\n)\nfrom Yichus/Organize import FamilySpec, ReadingOrder, ReadingStep\nfrom Yichus/Service import ServiceDef, ReadPerm, CreatePerm, WritePerm, handler, role_route, service_def\nfrom Yichus/Transaction import (\n  Scope, TxTable, Txn, Outcome, Committed, Aborted, RetryExhausted, CommitUnknown,\n  tx_table, tx_pure, tx_bind, tx_abort, tx_read, tx_insert, tx_write,\n  tx_database_time_millis, transaction\n)\nfrom Icetakes/ContributionModel import (\n  ArticleSnapshot, snapshots_table, input_matches_job, Contribution, ContributionJob,\n  ContributionProgress, SubmissionError, contribution_ref, job_key, contributions_table,\n  jobs_table, validate_idempotency_key, contribution_progress\n)\nfrom Icetakes/Identity import (\n  site_id, frame\n)\n\nexport (\n  RetrieveContributionInput(), RetrievalOutcome(), RetrievalStatus(), RetrievalError(),\n  RetrievalCommand(), RetrievalExecution(), command_local_key, retrieve_contribution,\n  access_rules, api, retrieval_tables, retrieval_reading\n)\n\nexposes (\n  Yichus/Access, Yichus/ArticleFetch, Yichus/Data, Yichus/IO, Yichus/Job,\n  Yichus/Organize, Yichus/Service, Yichus/Transaction, Icetakes/ContributionModel\n)\n\nstruct RetrieveContributionInput(idempotency_key: String, contribution_id: String)\n\nenum RetrievalOutcome:\n  SnapshotReady(snapshot_ref: String, retrieved_at: Int)\n  FetchRejected(result: ArticleFetchResult, progress: ContributionProgress, finished_at: Int)\n  NotStarted(reason: JobError)\n  Abandoned(reason: JobError)\n\nenum RetrievalStatus:\n  RetrievalPending\n  RetrievalFinished(outcome: RetrievalOutcome)\n\nenum RetrievalError:\n  InvalidCommand(reason: SubmissionError)\n  CommandKeyReused\n  MissingContribution\n  MissingFetchJob\n  InputChanged\n  MissingCommand\n  SnapshotAlreadyExists\n  TransitionRejected(reason: JobError)\n\nstruct FetchContext(contribution: Contribution, token: LeaseToken, request: ArticleRequest)\n\nenum RetrievalExecution:\n  Active(context: FetchContext)\n  Finished(outcome: RetrievalOutcome)\n\nstruct RetrievalCommand(input: RetrieveContributionInput, execution: RetrievalExecution)\n\nenum Preparation:\n  StartFetch(context: FetchContext)\n  Observe(status: RetrievalStatus)\n\ndef commands_table[s](scope: Scope[s]) -> TxTable[s, RetrievalCommand]:\n  tx_table(scope, \"retrieval_commands\")\n\ndef command_local_key(input: RetrieveContributionInput) -> String:\n  RetrieveContributionInput(key, _) = input\n  concat_String([frame(site_id), frame(\"retrieve-contribution\"), frame(key)])\n\ndef same_command(left: RetrieveContributionInput, right: RetrieveContributionInput) -> Bool:\n  RetrieveContributionInput(left_key, left_id) = left\n  RetrieveContributionInput(right_key, right_id) = right\n  if eq_String(left_key, right_key): eq_String(left_id, right_id)\n  else: False\n\ndef contribution_id(contribution: Contribution) -> String:\n  Contribution(id, _, _, _, _, _, _, _) = contribution\n  id\n\ndef read_contribution[s](scope: Scope[s], id: String) -> Txn[s, RetrievalError, Contribution]:\n  found <- tx_bind(tx_read(contributions_table(scope), id))\n  match found:\n    case None: tx_abort(MissingContribution)\n    case Some(contribution): tx_pure(contribution)\n\ndef read_fetch_job[s](scope: Scope[s], id: String) -> Txn[s, RetrievalError, ContributionJob]:\n  found <- tx_bind(tx_read(jobs_table(scope), job_key(id)))\n  match found:\n    case None: tx_abort(MissingFetchJob)\n    case Some(job): tx_pure(job)\n\ndef checked_job[s](contribution: Contribution, queued: ContributionJob) -> Txn[s, RetrievalError, Job]:\n  if input_matches_job(contribution, queued):\n    ContributionJob(_, job) = queued\n    tx_pure(job)\n  else: tx_abort(InputChanged)\n\ndef persist_job[s](scope: Scope[s], contribution: Contribution, result: JobResult) -> Txn[s, RetrievalError, Job]:\n  match result:\n    case JobRefused(reason): tx_abort(TransitionRejected(reason))\n    case JobApplied(updated):\n      Contribution(id, _, _, author, _, _, _, _) = contribution\n      _ <- tx_bind(tx_write(jobs_table(scope), job_key(id), ContributionJob(author, updated)))\n      tx_pure(updated)\n\ndef finish_command[s](\n  scope: Scope[s], principal: Principal, input: RetrieveContributionInput, outcome: RetrievalOutcome\n) -> Txn[s, RetrievalError, RetrievalStatus]:\n  _ <- tx_bind(tx_write(commands_table(scope), owner_key(principal, command_local_key(input)), RetrievalCommand(input, Finished(outcome))))\n  tx_pure(RetrievalFinished(outcome))\n\ndef recover_active[s](\n  scope: Scope[s], principal: Principal, input: RetrieveContributionInput,\n  context: FetchContext, now: Int\n) -> Txn[s, RetrievalError, RetrievalStatus]:\n  Principal(worker, _) = principal\n  FetchContext(contribution, token, _) = context\n  queued <- tx_bind(read_fetch_job(scope, contribution_id(contribution)))\n  current <- tx_bind(checked_job(contribution, queued))\n  match lease_error(current, token, worker, now):\n    case None: tx_pure(RetrievalPending)\n    case Some(reason):\n      match reason:\n        case LeaseExpired(_):\n          _ <- tx_bind(persist_job(scope, contribution,\n            expire_transition(current, job_fencing_version(current), now)\n          ))\n          finish_command(scope, principal, input, Abandoned(reason))\n        case _: finish_command(scope, principal, input, Abandoned(reason))\n\ndef fetch_request(contribution: Contribution, claimed: Job) -> ArticleRequest:\n  Contribution(_, _, _, _, url, _, _, _) = contribution\n  ArticleRequest(\n    concat_String([frame(job_id(claimed)), frame(int_to_String(job_fencing_version(claimed)))]),\n    url, [\"text/html\", \"text/plain\"], 2097152, 5, 30000\n  )\n\ndef recover_before_claim[s](scope: Scope[s], contribution: Contribution, current: Job, now: Int) -> Txn[s, RetrievalError, Job]:\n  match expire_transition(current, job_fencing_version(current), now):\n    case JobApplied(updated): persist_job(scope, contribution, JobApplied(updated))\n    case JobRefused(reason):\n      match reason:\n        case LeaseHeld(_) | StaleLease | TerminalJob: tx_pure(current)\n        case _: tx_abort(TransitionRejected(reason))\n\ndef start_command[s](\n  scope: Scope[s], principal: Principal, input: RetrieveContributionInput, now: Int\n) -> Txn[s, RetrievalError, Preparation]:\n  Principal(worker, _) = principal\n  RetrieveContributionInput(_, id) = input\n  contribution <- tx_bind(read_contribution(scope, id))\n  if eq_String(contribution_id(contribution), id):\n    queued <- tx_bind(read_fetch_job(scope, id))\n    previous <- tx_bind(checked_job(contribution, queued))\n    current <- tx_bind(recover_before_claim(scope, contribution, previous, now))\n    match claim_transition(current, worker, now, 60000):\n      case ClaimRefused(reason):\n        status <- tx_bind(finish_command(scope, principal, input, NotStarted(reason)))\n        tx_pure(Observe(status))\n      case ClaimApplied(Claim(claimed, token)):\n        _ <- tx_bind(persist_job(scope, contribution, JobApplied(claimed)))\n        context = FetchContext(contribution, token, fetch_request(contribution, claimed))\n        _ <- tx_bind(tx_insert(commands_table(scope), owner_key(principal, command_local_key(input)), RetrievalCommand(input, Active(context))))\n        tx_pure(StartFetch(context))\n  else: tx_abort(InputChanged)\n\ndef prepare_plan[s](\n  scope: Scope[s], principal: Principal, input: RetrieveContributionInput\n) -> Txn[s, RetrievalError, Preparation]:\n  RetrieveContributionInput(key, _) = input\n  match validate_idempotency_key(key):\n    case Some(reason): tx_abort(InvalidCommand(reason))\n    case None:\n      previous <- tx_bind(tx_read(commands_table(scope), owner_key(principal, command_local_key(input))))\n      now <- tx_bind(tx_database_time_millis(scope))\n      match previous:\n        case None: start_command(scope, principal, input, now)\n        case Some(RetrievalCommand(previous_input, execution)):\n          if same_command(previous_input, input):\n            match execution:\n              case Finished(outcome): tx_pure(Observe(RetrievalFinished(outcome)))\n              case Active(context):\n                status <- tx_bind(recover_active(scope, principal, input, context, now))\n                tx_pure(Observe(status))\n          else: tx_abort(CommandKeyReused)\n\ndef fetch_transition(job: Job, token: LeaseToken, worker: String, result: ArticleFetchResult, now: Int, snapshot_ref: String) -> JobResult:\n  match result:\n    case Fetched(_, _, _, _, _, _): complete_transition(job, token, worker, snapshot_ref, now)\n    case Blocked(reason) | PermanentFailure(reason): permanent_fail_transition(job, token, worker, reason, now)\n    case RetryableFailure(reason): fail_transition(job, token, worker, reason, now, 30000)\n    case TimedOut(_): fail_transition(job, token, worker, \"article fetch timed out\", now, 30000)\n\ndef record_result[s](\n  scope: Scope[s], principal: Principal, input: RetrieveContributionInput,\n  context: FetchContext, result: ArticleFetchResult, updated: Job, now: Int\n) -> Txn[s, RetrievalError, RetrievalStatus]:\n  FetchContext(contribution, _, request) = context\n  snapshot_ref = contribution_ref(contribution_id(contribution))\n  match result:\n    case Fetched(final_url, chain, status, media, body, bytes):\n      existing <- tx_bind(tx_read(snapshots_table(scope), snapshot_ref))\n      match existing:\n        case Some(_): tx_abort(SnapshotAlreadyExists)\n        case None:\n          snapshot = ArticleSnapshot(contribution, request, final_url, chain, status, media, body, bytes, now)\n          _ <- tx_bind(tx_insert(snapshots_table(scope), snapshot_ref, snapshot))\n          finish_command(scope, principal, input, SnapshotReady(snapshot_ref, now))\n    case _: finish_command(scope, principal, input, FetchRejected(result, contribution_progress(updated), now))\n\ndef complete_active[s](\n  scope: Scope[s], principal: Principal, input: RetrieveContributionInput,\n  context: FetchContext, result: ArticleFetchResult\n) -> Txn[s, RetrievalError, RetrievalStatus]:\n  Principal(worker, _) = principal\n  FetchContext(contribution, token, _) = context\n  queued <- tx_bind(read_fetch_job(scope, contribution_id(contribution)))\n  current <- tx_bind(checked_job(contribution, queued))\n  now <- tx_bind(tx_database_time_millis(scope))\n  updated <- tx_bind(persist_job(scope, contribution,\n    fetch_transition(current, token, worker, result, now, contribution_ref(contribution_id(contribution)))\n  ))\n  record_result(scope, principal, input, context, result, updated, now)\n\ndef complete_plan[s](\n  scope: Scope[s], principal: Principal, input: RetrieveContributionInput, result: ArticleFetchResult\n) -> Txn[s, RetrievalError, RetrievalStatus]:\n  previous <- tx_bind(tx_read(commands_table(scope), owner_key(principal, command_local_key(input))))\n  match previous:\n    case None: tx_abort(MissingCommand)\n    case Some(RetrievalCommand(previous_input, execution)):\n      if same_command(previous_input, input):\n        match execution:\n          case Finished(outcome): tx_pure(RetrievalFinished(outcome))\n          case Active(context): complete_active(scope, principal, input, context, result)\n      else: tx_abort(CommandKeyReused)\n\ndef retrieve_contribution(\n  db: Db, principal: Principal, input: RetrieveContributionInput\n) -> IO[Outcome[RetrievalError, RetrievalStatus]]:\n  def prepare():\n    scope <- transaction(db)\n    prepare_plan(scope, principal, input)\n  prepared <- flat_map(prepare())\n  match prepared:\n    case Aborted(reason): pure(Aborted(reason))\n    case RetryExhausted: pure(RetryExhausted)\n    case CommitUnknown: pure(CommitUnknown)\n    case Committed(Observe(status)): pure(Committed(status))\n    case Committed(StartFetch(context)):\n      FetchContext(_, _, request) = context\n      result <- flat_map(fetch_article(request))\n      scope <- transaction(db)\n      complete_plan(scope, principal, input, result)\n\naccess_rules = AccessSpec([\n  AccessRule(\"retrieval_commands\", OwnerScoped),\n  AccessRule(\"article_snapshots\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n])\n\napi: ServiceDef = service_def(\"icetakes-retrieval\", [\n  role_route(\"/internal/contributions/retrieve\", handler(\"retrieve_contribution\", retrieve_contribution), [\"icetakes-job-manager\"], [\n    ReadPerm(\"contributions\"), ReadPerm(\"contribution_jobs\"), WritePerm(\"contribution_jobs\"),\n    ReadPerm(\"retrieval_commands\"), CreatePerm(\"retrieval_commands\"), WritePerm(\"retrieval_commands\"),\n    ReadPerm(\"article_snapshots\"), CreatePerm(\"article_snapshots\"),\n  ]),\n])\n\nretrieval_tables = FamilySpec(\"retrieval tables\", [\"commands_table\"])\n\nretrieval_reading = ReadingOrder([\n  ReadingStep(\"command_local_key\", \"binds delivery keys to the site and operation before owner_key scopes them to the caller\"),\n  ReadingStep(\"same_command\", \"rejects changed work under an existing delivery key\"),\n  ReadingStep(\"persist_job\", \"writes only a checked transition with its contribution owner\"),\n  ReadingStep(\"finish_command\", \"records the durable replay result\"),\n  ReadingStep(\"recover_active\", \"reports a live attempt or abandons a lost lease\"),\n  ReadingStep(\"fetch_request\", \"freezes the bounded fetch policy around the stored URL\"),\n  ReadingStep(\"recover_before_claim\", \"settles expired leases before selecting another attempt\"),\n  ReadingStep(\"start_command\", \"commits the claim and delivery record together\"),\n  ReadingStep(\"prepare_plan\", \"resolves duplicate delivery before starting external work\"),\n  ReadingStep(\"fetch_transition\", \"maps typed fetch outcomes to checked job transitions\"),\n  ReadingStep(\"record_result\", \"records an immutable snapshot or a typed rejection\"),\n  ReadingStep(\"complete_active\", \"checks the current lease before committing the result\"),\n  ReadingStep(\"complete_plan\", \"resolves a completion retry from the same delivery record\"),\n  ReadingStep(\"retrieve_contribution\", \"keeps the fetch between its claim and completion transactions\"),\n  ReadingStep(\"api\", \"restricts retrieval to verified job managers\"),\n])\n"
    },
    {
      "fileName": "icetakes/app/contribution-intake.bosatsu",
      "source": "package Icetakes/ContributionIntake\n\nfrom Bosatsu/Predef import (\n  String, Int, Bool, Option, Some, None, Unit,\n  True, False, LT, cmp_Int, eq_String,\n  concat_String\n)\nfrom Yichus/Access import (\n  Principal, AccessRule, AccessSpec, OwnerScoped, GuardedOrRoles,\n  owner_key\n)\nfrom Yichus/Data import Db, Table, table, db_read_opt\nfrom Yichus/Frontend import FrontendSpec, View, Form\nfrom Yichus/IO import IO, pure, flat_map\nfrom Yichus/Job import (\n  JobResult, JobApplied, JobRefused, new_job\n)\nfrom Yichus/Organize import FamilySpec, ReadingOrder, ReadingStep\nfrom Yichus/Service import (\n  ServiceDef, ReadPerm, CreatePerm,\n  handler, route, service_def\n)\nfrom Yichus/Transaction import (\n  Scope, TxTable, Txn, Outcome,\n  tx_table, tx_pure, tx_bind, tx_abort, tx_read,\n  tx_next_id, tx_insert, tx_database_time_millis, transaction\n)\n\nfrom Icetakes/Identity import site_id, frame\nfrom Icetakes/ContributionModel import (\n  Urgency, ContributionProgress, Contribution, ContributionJob, SubmissionError,\n  InvalidSubmission, IdempotencyKeyReused, InvalidDatabaseTime, JobCreationRejected,\n  fetch_stage, over_limit, validate_idempotency_key, contribution_ref, job_key,\n  contributions_table, jobs_table, job_rows, contribution_progress, same_content\n)\n\nexport (\n  SubmitContributionInput(), SubmissionStatusInput(), SubmissionReceipt(),\n  SubmissionStatus(), validate_submission, same_submission, can_read_contribution,\n  can_read_contribution_job, submit_contribution, contribution_status, access_rules, api,\n  frontend, intake_tables, intake_reading\n)\n\nexposes (\n  Yichus/Access, Yichus/Data, Yichus/Frontend, Yichus/IO,\n  Yichus/Organize, Yichus/Service, Yichus/Transaction, Icetakes/ContributionModel\n)\n\n# Icetakes starts with one server-selected site and charter. They are carried\n# in every durable row now so adding sites and charter revisions will not\n# require reinterpreting old submissions. A client never supplies either.\ncharter_version = 1\nfetch_max_attempts = 5\n\nstruct SubmitContributionInput(\n  idempotency_key: String,\n  url: String,\n  argument: String,\n  urgency: Urgency\n)\n\nstruct SubmissionStatusInput(idempotency_key: String)\n\nstruct SubmissionReceipt(\n  request: SubmitContributionInput,\n  contribution_id: String,\n  job_id: String,\n  accepted_at: Int\n)\n\nenum SubmissionStatus:\n  ContributionReceived(receipt: SubmissionReceipt, progress: ContributionProgress)\n  ContributionStateUnavailable(receipt: SubmissionReceipt)\n  ContributionUnknown\n  InvalidStatusKey(reason: SubmissionError)\n\ndef validate_submission(input: SubmitContributionInput) -> Option[SubmissionError]:\n  SubmitContributionInput(idempotency_key, url, argument, _) = input\n  match validate_idempotency_key(idempotency_key):\n    case Some(error): Some(error)\n    case None:\n      if eq_String(url, \"\"):\n        Some(InvalidSubmission(\"url\", \"must not be empty\"))\n      else:\n        if over_limit(url, 2048):\n          Some(InvalidSubmission(\"url\", \"must be at most 2048 characters\"))\n        else:\n          if eq_String(argument, \"\"):\n            Some(InvalidSubmission(\"argument\", \"must not be empty\"))\n          else:\n            if over_limit(argument, 10000):\n              Some(InvalidSubmission(\"argument\", \"must be at most 10000 characters\"))\n            else: None\n\ndef same_submission(left: SubmitContributionInput, right: SubmitContributionInput) -> Bool:\n  SubmitContributionInput(left_key, left_url, left_argument, left_urgency) = left\n  SubmitContributionInput(right_key, right_url, right_argument, right_urgency) = right\n  if eq_String(left_key, right_key):\n    same_content((left_url, left_argument, left_urgency), (right_url, right_argument, right_urgency))\n  else: False\n\n# Length framing keeps command identities injective even when a component\n# contains a colon or resembles another operation name.\ndef command_local_key(idempotency_key: String) -> String:\n  concat_String([frame(site_id), frame(\"submit-contribution\"), frame(idempotency_key)])\n\ndef receipts_table[s](scope: Scope[s]) -> TxTable[s, SubmissionReceipt]:\n  tx_table(scope, \"contribution_receipts\")\n\ndef receipt_rows(db: Db) -> Table[SubmissionReceipt]:\n  table(db, \"contribution_receipts\")\n\ndef can_read_contribution(user_id: String, contribution: Contribution) -> Bool:\n  Contribution(_, _, _, author_id, _, _, _, _) = contribution\n  eq_String(user_id, author_id)\n\ndef can_read_contribution_job(user_id: String, queued: ContributionJob) -> Bool:\n  ContributionJob(author_id, _) = queued\n  eq_String(user_id, author_id)\n\ndef create_submission[s](\n  scope: Scope[s],\n  principal: Principal,\n  input: SubmitContributionInput,\n  receipt_key: String\n) -> Txn[s, SubmissionError, SubmissionReceipt]:\n  Principal(author_id, _) = principal\n  contribution_id <- tx_bind(tx_next_id(contributions_table(scope)))\n  now <- tx_bind(tx_database_time_millis(scope))\n  if cmp_Int(now, 0) matches LT:\n    tx_abort(InvalidDatabaseTime(now))\n  else:\n    queued_job_id = job_key(contribution_id)\n    match new_job(\n      queued_job_id,\n      fetch_stage,\n      contribution_ref(contribution_id),\n      charter_version,\n      [],\n      fetch_max_attempts,\n      now\n    ):\n      case JobRefused(reason): tx_abort(JobCreationRejected(reason))\n      case JobApplied(job):\n        SubmitContributionInput(_, url, argument, urgency) = input\n        contribution = Contribution(\n          contribution_id, site_id, charter_version, author_id,\n          url, argument, urgency, now\n        )\n        receipt = SubmissionReceipt(input, contribution_id, queued_job_id, now)\n        _ <- tx_bind(tx_insert(contributions_table(scope), contribution_id, contribution))\n        _ <- tx_bind(tx_insert(jobs_table(scope), queued_job_id, ContributionJob(author_id, job)))\n        _ <- tx_bind(tx_insert(receipts_table(scope), receipt_key, receipt))\n        tx_pure(receipt)\n\ndef submit_plan[s](\n  scope: Scope[s],\n  principal: Principal,\n  input: SubmitContributionInput\n) -> Txn[s, SubmissionError, SubmissionReceipt]:\n  match validate_submission(input):\n    case Some(error): tx_abort(error)\n    case None:\n      SubmitContributionInput(idempotency_key, _, _, _) = input\n      receipt_key = owner_key(principal, command_local_key(idempotency_key))\n      previous <- tx_bind(tx_read(receipts_table(scope), receipt_key))\n      match previous:\n        case Some(receipt):\n          SubmissionReceipt(previous_request, _, _, _) = receipt\n          if same_submission(previous_request, input): tx_pure(receipt)\n          else: tx_abort(IdempotencyKeyReused(idempotency_key))\n        case None: create_submission(scope, principal, input, receipt_key)\n\ndef submit_contribution(\n  db: Db,\n  principal: Principal,\n  input: SubmitContributionInput\n) -> IO[Outcome[SubmissionError, SubmissionReceipt]]:\n  scope <- transaction(db)\n  submit_plan(scope, principal, input)\n\ndef contribution_status(\n  db: Db,\n  principal: Principal,\n  input: SubmissionStatusInput\n) -> IO[SubmissionStatus]:\n  Principal(user_id, _) = principal\n  SubmissionStatusInput(idempotency_key) = input\n  match validate_idempotency_key(idempotency_key):\n    case Some(error): pure(InvalidStatusKey(error))\n    case None:\n      receipt <- flat_map(db_read_opt(\n        receipt_rows(db),\n        owner_key(principal, command_local_key(idempotency_key))\n      ))\n      match receipt:\n        case None: pure(ContributionUnknown)\n        case Some(value):\n          SubmissionReceipt(_, _, queued_job_id, _) = value\n          queued <- flat_map(db_read_opt(job_rows(db), queued_job_id))\n          match queued:\n            case None: pure(ContributionStateUnavailable(value))\n            case Some(row):\n              ContributionJob(_, job) = row\n              if can_read_contribution_job(user_id, row):\n                pure(ContributionReceived(value, contribution_progress(job)))\n              else: pure(ContributionStateUnavailable(value))\n\naccess_rules = AccessSpec([\n  AccessRule(\"contribution_receipts\", OwnerScoped),\n  AccessRule(\"contributions\", GuardedOrRoles([\"can_read_contribution\"], [\"icetakes-job-manager\"])),\n  AccessRule(\n    \"contribution_jobs\",\n    GuardedOrRoles([\"can_read_contribution_job\"], [\"icetakes-job-manager\"])\n  ),\n])\n\napi: ServiceDef = service_def(\"icetakes\", [\n  route(\"/contributions\", handler(\"submit_contribution\", submit_contribution), [\n    ReadPerm(\"contribution_receipts\"),\n    CreatePerm(\"contribution_receipts\"),\n    CreatePerm(\"contributions\"),\n    CreatePerm(\"contribution_jobs\"),\n  ]),\n  route(\"/contributions/status\", handler(\"contribution_status\", contribution_status), [\n    ReadPerm(\"contribution_receipts\"),\n    ReadPerm(\"contribution_jobs\"),\n  ]),\n])\n\nfrontend = FrontendSpec(\"Icetakes\", [\n  View(\"/contributions\", \"Contribute a reading\", Form),\n  View(\"/contributions/status\", \"Check contribution status\", Form),\n])\n\nintake_tables = FamilySpec(\"intake tables\", [\n  \"receipts_table\"\n])\n\nintake_reading = ReadingOrder([\n  ReadingStep(\"validate_submission\", \"checks every client-controlled text field\"),\n  ReadingStep(\"same_submission\", \"defines exact idempotent replay without a hash assumption\"),\n  ReadingStep(\"command_local_key\", \"binds a client key to this site and operation\"),\n  ReadingStep(\"can_read_contribution\", \"states the contributor row guard\"),\n  ReadingStep(\"can_read_contribution_job\", \"states the queued-job contributor guard\"),\n  ReadingStep(\"contribution_status\", \"combines the caller-owned receipt with guarded, redacted progress\"),\n  ReadingStep(\"create_submission\", \"atomically creates the contribution, fetch job and receipt\"),\n  ReadingStep(\"submit_plan\", \"resolves exact replay before any new allocation\"),\n  ReadingStep(\"submit_contribution\", \"runs the complete intake decision at the database boundary\"),\n  ReadingStep(\"api\", \"publishes the authenticated intake routes and their exact permissions\"),\n])\n"
    },
    {
      "fileName": "icetakes/app/contribution-model.bosatsu",
      "source": "package Icetakes/ContributionModel\n\nfrom Yichus/Job import (\n  Job, JobState, Waiting, RetryWaiting, Leased, Succeeded, Failed, Cancelled, JobError,\n  job_stage, job_attempt, job_max_attempts, job_state, job_id, job_input_ref, job_input_revision\n)\nfrom Yichus/ArticleFetch import ArticleRequest\nfrom Yichus/Data import Db, Table, table\nfrom Yichus/Organize import FamilySpec, ReadingOrder, ReadingStep\nfrom Yichus/Transaction import Scope, TxTable, tx_table\nfrom Icetakes/Identity import site_id, frame\n\nexport (\n  Urgency(), ContributionProgressState(), ContributionProgress(), Contribution(),\n  ContributionJob(), SubmissionError(), ArticleSnapshot(), fetch_stage,\n  validate_idempotency_key, over_limit, contribution_ref, job_key, contributions_table,\n  jobs_table, job_rows, contribution_progress, snapshots_table, input_matches_job,\n  same_content, same_contribution, contribution_tables, contribution_reading\n)\n\nexposes (Yichus/Job, Yichus/ArticleFetch, Yichus/Data, Yichus/Transaction, Yichus/Organize)\n\n# Immutable contribution/source rows and the shared keys that identify them.\n# Field order, table names, and key encoding are unchanged by this extraction.\nenum Urgency:\n  Breaking\n  Timely\n  Timeless\n\n# This is the contributor-visible projection of the internal job. It omits\n# worker identity, lease fencing data, fetch error text and internal output\n# references while preserving enough state to explain whether work is queued,\n# active, retrying or terminal.\nenum ContributionProgressState:\n  FetchQueued\n  Fetching\n  FetchRetryQueued\n  FetchReady\n  FetchFailed\n  FetchCancelled\n\nstruct ContributionProgress(\n  stage: String,\n  attempt: Int,\n  max_attempts: Int,\n  state: ContributionProgressState\n)\n\nstruct Contribution(\n  id: String,\n  site: String,\n  charter: Int,\n  author_id: String,\n  url: String,\n  argument: String,\n  urgency: Urgency,\n  submitted_at: Int\n)\n\n# The author remains visible to the access guard while the checked Job state\n# machine stays intact. Worker authority is a separate platform contract; the\n# intake route only creates this row and cannot read or mutate it afterward.\nstruct ContributionJob(author_id: String, job: Job)\n\nenum SubmissionError:\n  InvalidSubmission(field: String, reason: String)\n  IdempotencyKeyReused(key: String)\n  InvalidDatabaseTime(value: Int)\n  JobCreationRejected(reason: JobError)\n\nfetch_stage = \"article-fetch-v1\"\n\ndef same_urgency(left: Urgency, right: Urgency) -> Bool:\n  match left:\n    case Breaking: right matches Breaking\n    case Timely: right matches Timely\n    case Timeless: right matches Timeless\n\ndef over_limit(value: String, limit: Int) -> Bool:\n  cmp_Int(length_String(value), limit) matches GT\n\ndef validate_idempotency_key(idempotency_key: String) -> Option[SubmissionError]:\n  if eq_String(idempotency_key, \"\"):\n    Some(InvalidSubmission(\"idempotency_key\", \"must not be empty\"))\n  else:\n    if over_limit(idempotency_key, 128):\n      Some(InvalidSubmission(\"idempotency_key\", \"must be at most 128 characters\"))\n    else: None\n\ndef contribution_ref(contribution_id: String) -> String:\n  concat_String([frame(site_id), frame(contribution_id)])\n\ndef job_key(contribution_id: String) -> String:\n  concat_String([frame(fetch_stage), frame(contribution_id)])\n\ndef contributions_table[s](scope: Scope[s]) -> TxTable[s, Contribution]:\n  tx_table(scope, \"contributions\")\n\ndef jobs_table[s](scope: Scope[s]) -> TxTable[s, ContributionJob]:\n  tx_table(scope, \"contribution_jobs\")\n\ndef job_rows(db: Db) -> Table[ContributionJob]:\n  table(db, \"contribution_jobs\")\n\ndef progress_state(state: JobState) -> ContributionProgressState:\n  match state:\n    case Waiting(_): FetchQueued\n    case RetryWaiting(_, _): FetchRetryQueued\n    case Leased(_, _, _): Fetching\n    case Succeeded(_, _): FetchReady\n    case Failed(_, _): FetchFailed\n    case Cancelled(_, _): FetchCancelled\n\ndef contribution_progress(job: Job) -> ContributionProgress:\n  ContributionProgress(\n    job_stage(job),\n    job_attempt(job),\n    job_max_attempts(job),\n    progress_state(job_state(job))\n  )\n\n# A snapshot preserves the fetched text and its request policy.\n# Article interpretation and judgment happen in later, separately versioned jobs.\nstruct ArticleSnapshot(\n  contribution: Contribution,\n  request: ArticleRequest,\n  final_url: String,\n  redirect_chain: List[String],\n  status_code: Int,\n  content_type: String,\n  body: String,\n  byte_count: Int,\n  retrieved_at: Int\n)\n\ndef snapshots_table[s](scope: Scope[s]) -> TxTable[s, ArticleSnapshot]:\n  tx_table(scope, \"article_snapshots\")\n\ndef input_matches_job(contribution: Contribution, queued: ContributionJob) -> Bool:\n  Contribution(id, site, charter, author, _, _, _, _) = contribution\n  ContributionJob(job_author, job) = queued\n  if eq_String(site, site_id):\n    if eq_String(author, job_author):\n      if eq_String(job_id(job), job_key(id)):\n        if eq_String(job_stage(job), fetch_stage):\n          if eq_String(job_input_ref(job), contribution_ref(id)):\n            cmp_Int(job_input_revision(job), charter) matches EQ\n          else: False\n        else: False\n      else: False\n    else: False\n  else: False\n\ndef same_content(left: (String, String, Urgency), right: (String, String, Urgency)) -> Bool:\n  (left_url, left_argument, left_urgency) = left\n  (right_url, right_argument, right_urgency) = right\n  if eq_String(left_url, right_url):\n    if eq_String(left_argument, right_argument): same_urgency(left_urgency, right_urgency)\n    else: False\n  else: False\n\ndef same_contribution(left: Contribution, right: Contribution) -> Bool:\n  Contribution(li, ls, lc, la, lu, larg, lurg, lt) = left\n  Contribution(ri, rs, rc, ra, ru, rarg, rurg, rt) = right\n  if eq_String(li, ri):\n    if eq_String(ls, rs):\n      if cmp_Int(lc, rc) matches EQ:\n        if eq_String(la, ra):\n          if cmp_Int(lt, rt) matches EQ:\n            same_content((lu, larg, lurg), (ru, rarg, rurg))\n          else: False\n        else: False\n      else: False\n    else: False\n  else: False\n\ncontribution_tables = FamilySpec(\"contribution tables\", [\n  \"contributions_table\", \"jobs_table\", \"snapshots_table\"\n])\n\ncontribution_reading = ReadingOrder([\n  ReadingStep(\"over_limit\", \"bounds text accepted from an untrusted client\"),\n  ReadingStep(\"validate_idempotency_key\", \"checks the shared command-key boundary\"),\n  ReadingStep(\"contribution_ref\", \"binds a job input to this site and contribution\"),\n  ReadingStep(\"job_key\", \"gives article retrieval one durable work identity\"),\n  ReadingStep(\"same_urgency\", \"compares the declared urgency vocabulary exactly\"),\n  ReadingStep(\"same_content\", \"compares editorial content without a command envelope\"),\n  ReadingStep(\"same_contribution\", \"compares every field of the frozen source\"),\n  ReadingStep(\"input_matches_job\", \"requires the fetch job to name this source and charter\"),\n  ReadingStep(\"progress_state\", \"projects internal job states into a contributor-safe vocabulary\"),\n  ReadingStep(\"contribution_progress\", \"omits worker, lease, error and output details from status\")\n])\n"
    },
    {
      "fileName": "icetakes/app/identity.bosatsu",
      "source": "package Icetakes/Identity\n\nexport (site_id, frame)\n\n# The site is selected by the server. This extraction does not add tenant input.\nsite_id = \"icetakes\"\n\n# Length framing preserves existing durable key bytes, including colons.\ndef frame(value: String) -> String:\n  concat_String([int_to_String(length_String(value)), \":\", value])\n"
    },
    {
      "fileName": "icetakes/app/judgment-completion.bosatsu",
      "source": "package Icetakes/JudgmentCompletion\n\nfrom Bosatsu/Predef import (\n  String, Int, Bool, List, Option, Some, None, Unit,\n  True, False, LT, cmp_Int, eq_Int, eq_String\n)\nfrom Yichus/Access import Principal\nfrom Yichus/Data import Db\nfrom Yichus/IO import IO\nfrom Yichus/Job import (\n  Job, LeaseToken, JobError, JobResult, JobApplied, JobRefused,\n  job_input_ref, job_input_revision,\n  complete_transition, fail_transition\n)\nfrom Yichus/Json import Decoded, DecodeError\nfrom Yichus/Organize import ReadingOrder, ReadingStep\nfrom Yichus/Transaction import (\n  Scope, TxTable, Txn, Outcome,\n  tx_pure, tx_bind, tx_abort, tx_read, tx_write,\n  tx_database_time_millis, transaction\n)\nfrom Icetakes/Judgment import (\n  Judgment, decode_judgment\n)\n\nfrom Icetakes/JudgmentStore import (\n  JudgmentTask, ModelCompletion, CompleteJudgmentInput, JudgmentArtifact,\n  AttemptDisposition, AcceptedJudgment, MalformedJudgment, JudgmentAttempt,\n  jobs_table, judgment_tasks_table, judgment_attempts_table, judgment_artifacts_table\n)\n\nexport (\n  CompletionError(),\n  complete_judgment,\n  completion_reading\n)\n\nexposes (\n  Yichus/Access, Yichus/Data, Yichus/IO, Yichus/Job,\n  Yichus/Organize, Yichus/Transaction, Icetakes/JudgmentStore\n)\n\nenum CompletionError:\n  MissingJob(job_id: String)\n  MissingJudgmentTask(input_ref: String)\n  JobRejected(reason: JobError)\n  InputReferenceChanged(expected: String, actual: String)\n  InputRevisionChanged(expected: Int, actual: Int)\n  AttemptKeyReused(attempt_id: String)\n  AcceptedArtifactExists(job_id: String)\n  InvalidCompletion(reason: String)\n\ndef nonnegative(value: Int) -> Bool:\n  match cmp_Int(value, 0):\n    case LT: False\n    case _: True\n\ndef validate_model_completion(response: ModelCompletion) -> Option[CompletionError]:\n  ModelCompletion(request_id, model, provider, _, prompt_tokens, completion_tokens) = response\n  if eq_String(request_id, \"\"): Some(InvalidCompletion(\"request_id must not be empty\"))\n  else:\n    if eq_String(model, \"\"): Some(InvalidCompletion(\"model must not be empty\"))\n    else:\n      if eq_String(provider, \"\"): Some(InvalidCompletion(\"provider must not be empty\"))\n      else:\n        match nonnegative(prompt_tokens):\n          case False: Some(InvalidCompletion(\"prompt_tokens must be nonnegative\"))\n          case True:\n            match nonnegative(completion_tokens):\n              case False: Some(InvalidCompletion(\"completion_tokens must be nonnegative\"))\n              case True: None\n\ndef validate_completion_input(input: CompleteJudgmentInput) -> Option[CompletionError]:\n  CompleteJudgmentInput(attempt_id, job_id, _, response) = input\n  if eq_String(attempt_id, \"\"): Some(InvalidCompletion(\"attempt_id must not be empty\"))\n  else:\n    if eq_String(job_id, \"\"): Some(InvalidCompletion(\"job_id must not be empty\"))\n    else: validate_model_completion(response)\n\ndef same_lease(left: LeaseToken, right: LeaseToken) -> Bool:\n  LeaseToken(left_job, left_revision, left_worker, left_fence, left_expiry) = left\n  LeaseToken(right_job, right_revision, right_worker, right_fence, right_expiry) = right\n  if eq_String(left_job, right_job):\n    if eq_Int(left_revision, right_revision):\n      if eq_String(left_worker, right_worker):\n        if eq_Int(left_fence, right_fence): eq_Int(left_expiry, right_expiry)\n        else: False\n      else: False\n    else: False\n  else: False\n\ndef same_model_completion(left: ModelCompletion, right: ModelCompletion) -> Bool:\n  ModelCompletion(left_request, left_model, left_provider, left_content, left_prompt, left_completion) = left\n  ModelCompletion(right_request, right_model, right_provider, right_content, right_prompt, right_completion) = right\n  if eq_String(left_request, right_request):\n    if eq_String(left_model, right_model):\n      if eq_String(left_provider, right_provider):\n        if eq_String(left_content, right_content):\n          if eq_Int(left_prompt, right_prompt): eq_Int(left_completion, right_completion)\n          else: False\n        else: False\n      else: False\n    else: False\n  else: False\n\ndef same_completion_input(left: CompleteJudgmentInput, right: CompleteJudgmentInput) -> Bool:\n  CompleteJudgmentInput(left_attempt, left_job, left_token, left_response) = left\n  CompleteJudgmentInput(right_attempt, right_job, right_token, right_response) = right\n  if eq_String(left_attempt, right_attempt):\n    if eq_String(left_job, right_job):\n      match same_lease(left_token, right_token):\n        case True: same_model_completion(left_response, right_response)\n        case False: False\n    else: False\n  else: False\n\ndef read_job[s](jobs: TxTable[s, Job], job_id: String) -> Txn[s, CompletionError, Job]:\n  found <- tx_bind(tx_read(jobs, job_id))\n  match found:\n    case Some(job): tx_pure(job)\n    case None: tx_abort(MissingJob(job_id))\n\ndef read_task[s](\n  tasks: TxTable[s, JudgmentTask], input_ref: String\n) -> Txn[s, CompletionError, JudgmentTask]:\n  found <- tx_bind(tx_read(tasks, input_ref))\n  match found:\n    case Some(task): tx_pure(task)\n    case None: tx_abort(MissingJudgmentTask(input_ref))\n\ndef require_task_matches_job[s](\n  task: JudgmentTask,\n  job_ref: String,\n  job_revision: Int\n) -> Txn[s, CompletionError, Unit]:\n  JudgmentTask(task_ref, task_revision, _, _, _) = task\n  if eq_String(task_ref, job_ref):\n    if eq_Int(task_revision, job_revision): tx_pure(())\n    else: tx_abort(InputRevisionChanged(job_revision, task_revision))\n  else: tx_abort(InputReferenceChanged(job_ref, task_ref))\n\ndef apply_job_result[s](result: JobResult) -> Txn[s, CompletionError, Job]:\n  match result:\n    case JobApplied(job): tx_pure(job)\n    case JobRefused(reason): tx_abort(JobRejected(reason))\n\ndef accepted_attempt[s](\n  scope: Scope[s],\n  current: Job,\n  task: JudgmentTask,\n  input: CompleteJudgmentInput,\n  worker_id: String,\n  judgment: Judgment,\n  now: Int\n) -> Txn[s, CompletionError, JudgmentAttempt]:\n  JudgmentTask(input_ref, input_revision, schema, _, _) = task\n  CompleteJudgmentInput(attempt_id, job_id, token, response) = input\n  ModelCompletion(request_id, model, provider, _, prompt_tokens, completion_tokens) = response\n  artifact = JudgmentArtifact(\n    job_id, input_ref, input_revision, schema, judgment, attempt_id,\n    request_id, model, provider, prompt_tokens, completion_tokens, now\n  )\n  updated <- tx_bind(apply_job_result(\n    complete_transition(current, token, worker_id, job_id, now)\n  ))\n  existing <- tx_bind(tx_read(judgment_artifacts_table(scope), job_id))\n  match existing:\n    case Some(_): tx_abort(AcceptedArtifactExists(job_id))\n    case None:\n      attempt = JudgmentAttempt(input, worker_id, now, AcceptedJudgment(artifact))\n      _ <- tx_bind(tx_write(judgment_artifacts_table(scope), job_id, artifact))\n      _ <- tx_bind(tx_write(judgment_attempts_table(scope), attempt_id, attempt))\n      _ <- tx_bind(tx_write(jobs_table(scope), job_id, updated))\n      tx_pure(attempt)\n\ndef malformed_attempt[s](\n  scope: Scope[s],\n  current: Job,\n  task: JudgmentTask,\n  input: CompleteJudgmentInput,\n  worker_id: String,\n  path: String,\n  reason: String,\n  now: Int\n) -> Txn[s, CompletionError, JudgmentAttempt]:\n  JudgmentTask(_, _, _, _, retry_delay) = task\n  CompleteJudgmentInput(attempt_id, job_id, token, _) = input\n  updated <- tx_bind(apply_job_result(\n    fail_transition(current, token, worker_id, \"malformed judgment\", now, retry_delay)\n  ))\n  attempt = JudgmentAttempt(input, worker_id, now, MalformedJudgment(path, reason))\n  _ <- tx_bind(tx_write(judgment_attempts_table(scope), attempt_id, attempt))\n  _ <- tx_bind(tx_write(jobs_table(scope), job_id, updated))\n  tx_pure(attempt)\n\ndef new_completion_attempt[s](\n  scope: Scope[s],\n  input: CompleteJudgmentInput,\n  worker_id: String\n) -> Txn[s, CompletionError, JudgmentAttempt]:\n  CompleteJudgmentInput(_, job_id, _, response) = input\n  ModelCompletion(_, _, _, content, _, _) = response\n  current <- tx_bind(read_job(jobs_table(scope), job_id))\n  job_ref = job_input_ref(current)\n  job_revision = job_input_revision(current)\n  task <- tx_bind(read_task(judgment_tasks_table(scope), job_ref))\n  _ <- tx_bind(require_task_matches_job(task, job_ref, job_revision))\n  now <- tx_bind(tx_database_time_millis(scope))\n  JudgmentTask(_, _, schema, allowed_evidence, _) = task\n  match decode_judgment(schema, content, allowed_evidence):\n    case Decoded(judgment):\n      accepted_attempt(scope, current, task, input, worker_id, judgment, now)\n    case DecodeError(path, reason):\n      malformed_attempt(scope, current, task, input, worker_id, path, reason, now)\n\ndef completion_attempt_plan[s](\n  scope: Scope[s],\n  input: CompleteJudgmentInput,\n  worker_id: String\n) -> Txn[s, CompletionError, JudgmentAttempt]:\n  CompleteJudgmentInput(attempt_id, _, _, _) = input\n  previous <- tx_bind(tx_read(judgment_attempts_table(scope), attempt_id))\n  match previous:\n    case Some(attempt):\n      JudgmentAttempt(previous_input, previous_worker, _, _) = attempt\n      match same_completion_input(previous_input, input):\n        case True:\n          if eq_String(previous_worker, worker_id): tx_pure(attempt)\n          else: tx_abort(AttemptKeyReused(attempt_id))\n        case False: tx_abort(AttemptKeyReused(attempt_id))\n    case None: new_completion_attempt(scope, input, worker_id)\n\ndef completion_plan[s](\n  scope: Scope[s],\n  input: CompleteJudgmentInput,\n  worker_id: String\n) -> Txn[s, CompletionError, JudgmentAttempt]:\n  match validate_completion_input(input):\n    case Some(error): tx_abort(error)\n    case None: completion_attempt_plan(scope, input, worker_id)\n\ndef complete_judgment(\n  db: Db,\n  principal: Principal,\n  input: CompleteJudgmentInput\n) -> IO[Outcome[CompletionError, JudgmentAttempt]]:\n  Principal(worker_id, _) = principal\n  scope <- transaction(db)\n  completion_plan(scope, input, worker_id)\n\ncompletion_reading = ReadingOrder([\n  ReadingStep(\"nonnegative\", \"checks bounded-count metadata before trusting a worker request\"),\n  ReadingStep(\"validate_model_completion\", \"requires provider identity and nonnegative usage metadata\"),\n  ReadingStep(\"validate_completion_input\", \"requires durable command and job identities\"),\n  ReadingStep(\"same_lease\", \"compares every authority-bearing lease field\"),\n  ReadingStep(\"same_model_completion\", \"compares every returned provider field including content\"),\n  ReadingStep(\"same_completion_input\", \"defines exact durable command replay\"),\n  ReadingStep(\"read_job\", \"requires the referenced durable job\"),\n  ReadingStep(\"read_task\", \"loads the frozen schema and evidence set\"),\n  ReadingStep(\"require_task_matches_job\", \"binds the frozen task reference and revision to the job\"),\n  ReadingStep(\"apply_job_result\", \"turns a refused checked transition into a transaction abort\"),\n  ReadingStep(\"accepted_attempt\", \"atomically writes one typed artifact, attempt and succeeded job\"),\n  ReadingStep(\"malformed_attempt\", \"atomically records rejection and advances bounded job failure\"),\n  ReadingStep(\"new_completion_attempt\", \"decodes under stored policy before selecting either write set\"),\n  ReadingStep(\"completion_attempt_plan\", \"recovers an exact replay or starts one fenced completion\"),\n  ReadingStep(\"completion_plan\", \"rejects malformed commands before reading durable state\"),\n  ReadingStep(\"complete_judgment\", \"derives worker identity from the verified principal\")\n])\n"
    },
    {
      "fileName": "icetakes/app/judgment-store.bosatsu",
      "source": "package Icetakes/JudgmentStore\n\nfrom Yichus/Job import Job, LeaseToken\nfrom Yichus/Organize import FamilySpec\nfrom Yichus/Transaction import Scope, TxTable, tx_table\nfrom Icetakes/Judgment import EvidenceRef, JudgmentSchema, Judgment\n\nexport (\n  JudgmentTask(), ModelCompletion(), CompleteJudgmentInput(),\n  JudgmentArtifact(), AttemptDisposition(), JudgmentAttempt(),\n  jobs_table, judgment_tasks_table, judgment_attempts_table, judgment_artifacts_table,\n  judgment_tables\n)\n\nexposes (Yichus/Job, Yichus/Organize, Yichus/Transaction, Icetakes/Judgment)\n\n# This immutable row freezes the decoder and evidence set for one job input.\n# Its key is input_ref. A job also stores that reference and revision, and the\n# completion transaction checks both before accepting model output.\nstruct JudgmentTask(\n  input_ref: String,\n  input_revision: Int,\n  schema: JudgmentSchema,\n  allowed_evidence: List[EvidenceRef],\n  retry_delay_millis: Int\n)\n\n# This is the successful transport result supplied by the worker. Transport\n# failures use the separate job-failure path; content remains untrusted until\n# decode_judgment accepts it inside the transaction.\nstruct ModelCompletion(\n  request_id: String,\n  model: String,\n  provider: String,\n  content: String,\n  prompt_tokens: Int,\n  completion_tokens: Int\n)\n\n# attempt_id is allocated before the provider call and reused after an unknown\n# commit outcome. The lease token and response are part of the durable command\n# identity, so changing either under the same key is rejected.\nstruct CompleteJudgmentInput(\n  attempt_id: String,\n  job_id: String,\n  token: LeaseToken,\n  response: ModelCompletion\n)\n\nstruct JudgmentArtifact(\n  job_id: String,\n  input_ref: String,\n  input_revision: Int,\n  schema: JudgmentSchema,\n  judgment: Judgment,\n  attempt_id: String,\n  request_id: String,\n  model: String,\n  provider: String,\n  prompt_tokens: Int,\n  completion_tokens: Int,\n  completed_at: Int\n)\n\nenum AttemptDisposition:\n  AcceptedJudgment(artifact: JudgmentArtifact)\n  MalformedJudgment(path: String, reason: String)\n\n# Attempts are private audit rows. Keeping the exact completion input makes an\n# ambiguous-commit retry decidable without hashing or trusting provider IDs.\nstruct JudgmentAttempt(\n  input: CompleteJudgmentInput,\n  worker_id: String,\n  finished_at: Int,\n  disposition: AttemptDisposition\n)\n\ndef jobs_table[s](scope: Scope[s]) -> TxTable[s, Job]:\n  tx_table(scope, \"jobs\")\n\ndef judgment_tasks_table[s](scope: Scope[s]) -> TxTable[s, JudgmentTask]:\n  tx_table(scope, \"judgment_tasks\")\n\ndef judgment_attempts_table[s](scope: Scope[s]) -> TxTable[s, JudgmentAttempt]:\n  tx_table(scope, \"judgment_attempts\")\n\ndef judgment_artifacts_table[s](scope: Scope[s]) -> TxTable[s, JudgmentArtifact]:\n  tx_table(scope, \"judgment_artifacts\")\n\njudgment_tables = FamilySpec(\"judgment tables\", [\n  \"jobs_table\",\n  \"judgment_tasks_table\",\n  \"judgment_attempts_table\",\n  \"judgment_artifacts_table\"\n])\n\n"
    },
    {
      "fileName": "icetakes/app/judgment.bosatsu",
      "source": "package Icetakes/Judgment\n\nfrom Bosatsu/Predef import (\n  String, Bool, Int, List, Unit, True, False, LT, GT,\n  eq_String, cmp_Int\n)\nfrom Yichus/Json import (\n  Json, JsonNull, ParseResult, Parsed, InvalidJson,\n  DecodeResult, Decoded, DecodeError, decode_bind,\n  parse_json, required_field, as_string, as_bool, as_int, as_array, as_object\n)\nfrom Yichus/Organize import FamilySpec, ReadingOrder, ReadingStep\n\nexport (\n  EvidenceRef(),\n  JudgmentSchema(),\n  Judgment(),\n  LawyerJudgment(),\n  EventTimeEstimate(),\n  UrgencyAssessment(),\n  DevilsAdvocateJudgment(),\n  TaxonomyJudgment(),\n  decode_judgment,\n  role_value_decoders,\n  judgment_reading\n)\n\nexposes (Yichus/Json, Yichus/Organize)\n\n# Evidence IDs identify immutable inputs supplied to this judgment attempt.\n# The decoder accepts only IDs in the caller's frozen evidence set.\nstruct EvidenceRef(id: String)\n\nenum JudgmentSchema:\n  DevilsAdvocateV1\n  TaxonomyV1\n  LawyerV1\n\nenum EventTimeEstimate:\n  UnknownEventTime\n  EstimatedEventTime(epoch_millis: Int)\n\nenum UrgencyAssessment:\n  SupportedUrgency\n  OverstatedUrgency\n  UnderstatedUrgency\n  UnclearUrgency\n\nstruct LawyerJudgment(\n  congruence_basis_points: Int,\n  congruence_reasoning: String,\n  event_time: EventTimeEstimate,\n  urgency_assessment: UrgencyAssessment,\n  urgency_reasoning: String,\n  brief_bullets: List[String],\n  evidence_refs: List[EvidenceRef]\n)\n\nstruct DevilsAdvocateJudgment(\n  has_fatal_flaw: Bool,\n  attack_argument: String,\n  evidence_refs: List[EvidenceRef]\n)\n\n# Agora's examples use topic-relative stance strings such as \"Skeptical\" and\n# \"Pro-Tariff\". A charter may constrain that vocabulary later; this syntax\n# contract does not silently collapse it to Burrora's Pro/Anti/Neutral summary.\nstruct TaxonomyJudgment(\n  topic: String,\n  stance: String,\n  evidence_refs: List[EvidenceRef]\n)\n\nenum Judgment:\n  DevilsAdvocate(value: DevilsAdvocateJudgment)\n  Taxonomy(value: TaxonomyJudgment)\n  Lawyer(value: LawyerJudgment)\n\ndef member_string(items: List[String], target: String) -> Bool:\n  loop items:\n    case []: False\n    case [item, *rest]:\n      match eq_String(item, target):\n        case True: True\n        case False: member_string(rest, target)\n\ndef member_evidence(refs: List[EvidenceRef], target: String) -> Bool:\n  loop refs:\n    case []: False\n    case [EvidenceRef(id), *rest]:\n      match eq_String(id, target):\n        case True: True\n        case False: member_evidence(rest, target)\n\ndef expected_fields(\n  allowed: List[String],\n  fields: List[(String, Json)]\n) -> DecodeResult[Unit]:\n  loop fields:\n    case []: Decoded(())\n    case [(name, _), *rest]:\n      match member_string(allowed, name):\n        case True: expected_fields(allowed, rest)\n        case False: DecodeError(name, \"unexpected field\")\n\ndef nonempty_string(path: String, value: Json) -> DecodeResult[String]:\n  text <- decode_bind(as_string(path, value))\n  match eq_String(text, \"\"):\n    case True: DecodeError(path, \"empty string\")\n    case False: Decoded(text)\n\ndef required_nonempty_string(name: String, value: Json) -> DecodeResult[String]:\n  field <- decode_bind(required_field(name, value))\n  nonempty_string(name, field)\n\ndef decode_evidence_ref(\n  value: Json,\n  allowed: List[EvidenceRef],\n  seen: List[EvidenceRef]\n) -> DecodeResult[EvidenceRef]:\n  id <- decode_bind(as_string(\"evidence_refs\", value))\n  match eq_String(id, \"\"):\n    case True: DecodeError(\"evidence_refs\", \"empty evidence reference\")\n    case False:\n      match member_evidence(allowed, id):\n        case False: DecodeError(\"evidence_refs\", \"unknown evidence reference\")\n        case True:\n          match member_evidence(seen, id):\n            case True: DecodeError(\"evidence_refs\", \"duplicate evidence reference\")\n            case False: Decoded(EvidenceRef(id))\n\ndef decode_evidence_refs(\n  values: List[Json],\n  allowed: List[EvidenceRef],\n  seen: List[EvidenceRef]\n) -> DecodeResult[List[EvidenceRef]]:\n  recur values:\n    case []: Decoded([])\n    case [value, *rest]:\n      match decode_evidence_ref(value, allowed, seen):\n        case DecodeError(path, reason): DecodeError(path, reason)\n        case Decoded(evidence):\n          match decode_evidence_refs(rest, allowed, [evidence, *seen]):\n            case DecodeError(path, reason): DecodeError(path, reason)\n            case Decoded(decoded_rest): Decoded([evidence, *decoded_rest])\n\ndef required_evidence_refs(\n  value: Json,\n  allowed: List[EvidenceRef]\n) -> DecodeResult[List[EvidenceRef]]:\n  field <- decode_bind(required_field(\"evidence_refs\", value))\n  values <- decode_bind(as_array(\"evidence_refs\", field))\n  match values:\n    case []: DecodeError(\"evidence_refs\", \"at least one evidence reference required\")\n    case [_, *_]: decode_evidence_refs(values, allowed, [])\n\ndef required_basis_points(value: Json) -> DecodeResult[Int]:\n  field <- decode_bind(required_field(\"congruence_basis_points\", value))\n  score <- decode_bind(as_int(\"congruence_basis_points\", field))\n  match (cmp_Int(score, 0), cmp_Int(score, 10000)):\n    case (LT, _) | (_, GT):\n      DecodeError(\"congruence_basis_points\", \"must be between 0 and 10000\")\n    case _: Decoded(score)\n\ndef required_event_time(value: Json) -> DecodeResult[EventTimeEstimate]:\n  field <- decode_bind(required_field(\"event_time_epoch_millis\", value))\n  match field:\n    case JsonNull: Decoded(UnknownEventTime)\n    case _:\n      epoch_millis <- decode_bind(as_int(\"event_time_epoch_millis\", field))\n      Decoded(EstimatedEventTime(epoch_millis))\n\ndef required_urgency_assessment(value: Json) -> DecodeResult[UrgencyAssessment]:\n  text <- decode_bind(required_nonempty_string(\"urgency_assessment\", value))\n  match text:\n    case \"supported\": Decoded(SupportedUrgency)\n    case \"overstated\": Decoded(OverstatedUrgency)\n    case \"understated\": Decoded(UnderstatedUrgency)\n    case \"unclear\": Decoded(UnclearUrgency)\n    case _: DecodeError(\"urgency_assessment\", \"unknown urgency assessment\")\n\ndef required_brief_bullets(value: Json) -> DecodeResult[List[String]]:\n  field <- decode_bind(required_field(\"brief_bullets\", value))\n  bullets <- decode_bind(as_array(\"brief_bullets\", field))\n  match bullets:\n    case [first, second, third]:\n      first_text <- decode_bind(nonempty_string(\"brief_bullets[0]\", first))\n      second_text <- decode_bind(nonempty_string(\"brief_bullets[1]\", second))\n      third_text <- decode_bind(nonempty_string(\"brief_bullets[2]\", third))\n      Decoded([first_text, second_text, third_text])\n    case _: DecodeError(\"brief_bullets\", \"exactly three bullets required\")\n\ndef decode_lawyer_value(\n  value: Json,\n  allowed: List[EvidenceRef]\n) -> DecodeResult[LawyerJudgment]:\n  fields <- decode_bind(as_object(\"$\", value))\n  _ <- decode_bind(expected_fields([\n    \"congruence_basis_points\", \"congruence_reasoning\",\n    \"event_time_epoch_millis\", \"urgency_assessment\",\n    \"urgency_reasoning\", \"brief_bullets\", \"evidence_refs\"\n  ], fields))\n  score <- decode_bind(required_basis_points(value))\n  congruence_reasoning <- decode_bind(required_nonempty_string(\"congruence_reasoning\", value))\n  event_time <- decode_bind(required_event_time(value))\n  urgency_assessment <- decode_bind(required_urgency_assessment(value))\n  urgency_reasoning <- decode_bind(required_nonempty_string(\"urgency_reasoning\", value))\n  brief_bullets <- decode_bind(required_brief_bullets(value))\n  evidence_refs <- decode_bind(required_evidence_refs(value, allowed))\n  Decoded(LawyerJudgment(\n    score, congruence_reasoning, event_time, urgency_assessment,\n    urgency_reasoning, brief_bullets, evidence_refs\n  ))\n\ndef decode_devils_advocate_value(\n  value: Json,\n  allowed: List[EvidenceRef]\n) -> DecodeResult[DevilsAdvocateJudgment]:\n  fields <- decode_bind(as_object(\"$\", value))\n  _ <- decode_bind(expected_fields([\"has_fatal_flaw\", \"attack_argument\", \"evidence_refs\"], fields))\n  fatal_field <- decode_bind(required_field(\"has_fatal_flaw\", value))\n  has_fatal_flaw <- decode_bind(as_bool(\"has_fatal_flaw\", fatal_field))\n  attack_argument <- decode_bind(required_nonempty_string(\"attack_argument\", value))\n  evidence_refs <- decode_bind(required_evidence_refs(value, allowed))\n  Decoded(DevilsAdvocateJudgment(has_fatal_flaw, attack_argument, evidence_refs))\n\ndef decode_taxonomy_value(\n  value: Json,\n  allowed: List[EvidenceRef]\n) -> DecodeResult[TaxonomyJudgment]:\n  fields <- decode_bind(as_object(\"$\", value))\n  _ <- decode_bind(expected_fields([\"topic\", \"stance\", \"evidence_refs\"], fields))\n  topic <- decode_bind(required_nonempty_string(\"topic\", value))\n  stance <- decode_bind(required_nonempty_string(\"stance\", value))\n  evidence_refs <- decode_bind(required_evidence_refs(value, allowed))\n  Decoded(TaxonomyJudgment(topic, stance, evidence_refs))\n\n\n# The OpenRouter adapter returns untrusted text. The expected versioned schema\n# comes from the claimed job, not the model response, and selects exactly one\n# role decoder.\n# Parsing and every schema check happen before a completion transaction may\n# persist the resulting Judgment.\ndef decode_judgment(\n  schema: JudgmentSchema,\n  source: String,\n  allowed: List[EvidenceRef]\n) -> DecodeResult[Judgment]:\n  match parse_json(source):\n    case InvalidJson(reason): DecodeError(\"$\", reason)\n    case Parsed(value):\n      match schema:\n        case DevilsAdvocateV1:\n          judgment <- decode_bind(decode_devils_advocate_value(value, allowed))\n          Decoded(DevilsAdvocate(judgment))\n        case TaxonomyV1:\n          judgment <- decode_bind(decode_taxonomy_value(value, allowed))\n          Decoded(Taxonomy(judgment))\n        case LawyerV1:\n          judgment <- decode_bind(decode_lawyer_value(value, allowed))\n          Decoded(Lawyer(judgment))\n\n\n# These declarations make the intended decomposition inspectable. Yichus\n# checks them against the compiled program; they do not alter the decoder.\nrole_value_decoders = FamilySpec(\"role value decoders\", [\n  \"decode_devils_advocate_value\",\n  \"decode_taxonomy_value\",\n  \"decode_lawyer_value\"\n])\n\njudgment_reading = ReadingOrder([\n  ReadingStep(\"member_string\", \"checks whether a field name belongs to a complete schema\"),\n  ReadingStep(\"expected_fields\", \"rejects every field outside the role's complete schema\"),\n  ReadingStep(\"nonempty_string\", \"accepts a string value and rejects empty text\"),\n  ReadingStep(\"required_nonempty_string\", \"requires one string field exactly once and rejects empty text\"),\n  ReadingStep(\"member_evidence\", \"checks an evidence ID against a typed evidence set\"),\n  ReadingStep(\"decode_evidence_ref\", \"accepts one nonempty known evidence ID exactly once\"),\n  ReadingStep(\"decode_evidence_refs\", \"preserves the validated evidence order\"),\n  ReadingStep(\"required_evidence_refs\", \"requires a nonempty array of evidence IDs\"),\n  ReadingStep(\"required_basis_points\", \"accepts exact congruence basis points in the closed range\"),\n  ReadingStep(\"required_event_time\", \"distinguishes an unknown event time from an exact epoch-millisecond estimate\"),\n  ReadingStep(\"required_urgency_assessment\", \"accepts only the declared urgency-assessment vocabulary\"),\n  ReadingStep(\"required_brief_bullets\", \"requires exactly three nonempty brief points\"),\n  ReadingStep(\"decode_devils_advocate_value\", \"builds the typed judgment only after every field is valid\"),\n  ReadingStep(\"decode_taxonomy_value\", \"builds the typed taxonomy only after every field is valid\"),\n  ReadingStep(\"decode_lawyer_value\", \"builds the typed Lawyer judgment only after every field is valid\"),\n  ReadingStep(\"decode_judgment\", \"parses untrusted text under the job's versioned schema\")\n])\n"
    },
    {
      "fileName": "icetakes/app/lawyer-policy.bosatsu",
      "source": "package Icetakes/LawyerPolicy\n\nfrom Bosatsu/Predef import (\n  String, Int, Bool, List, Option, Some, None, True, False,\n  LT, EQ, GT, cmp_Int, eq_String, concat_String, length_String, add\n)\nfrom Yichus/Access import Principal, AccessSpec, AccessRule, GuardedOrRoles\nfrom Yichus/Data import Db\nfrom Yichus/IO import IO\nfrom Yichus/OpenRouter import ProviderPolicy\nfrom Yichus/Organize import ReadingOrder, ReadingStep\nfrom Yichus/Service import ServiceDef, ReadPerm, CreatePerm, WritePerm, handler, role_route, service_def\nfrom Yichus/Transaction import (\n  Scope, TxTable, Txn, Outcome, tx_table, tx_pure, tx_bind, tx_abort,\n  tx_read, tx_insert, tx_write, transaction\n)\nfrom Icetakes/Identity import (\n  site_id, frame\n)\n\nexport (\n  VersionedPrompt(), LawyerPolicy(), PublishPolicyInput(), PolicyRevision(),\n  ActivatePolicyInput(), ActivePolicy(), PolicyError(), PolicyLookup(), ResolvedPolicy(),\n  publish_policy, activate_policy, read_active_policy, read_policy, policy_ref,\n  policies_table, active_policy_table, access_rules, api, policy_reading\n)\n\nexposes (Yichus/Access, Yichus/Data, Yichus/IO, Yichus/OpenRouter, Yichus/Organize, Yichus/Service, Yichus/Transaction)\n\nstruct VersionedPrompt(version: String, text: String)\n\n# LawyerV1 is the fixed response contract for this policy family. No sample\n# model is selected here. Provider IDs and model IDs require evaluation before\n# production activation; structural validation cannot establish their quality.\nstruct LawyerPolicy(\n  prompt: VersionedPrompt,\n  rubric_version: String,\n  model: String,\n  providers: List[String],\n  max_tokens: Int,\n  temperature_milli: Int,\n  timeout_millis: Int,\n  max_article_chars: Int\n)\nstruct PublishPolicyInput(revision: String, policy: LawyerPolicy)\nstruct PolicyRevision(site: String, revision: String, policy: LawyerPolicy)\nstruct ActivatePolicyInput(idempotency_key: String, expected_generation: Int, revision: String)\nstruct ActivePolicy(revision: String, generation: Int)\nstruct ActivationReceipt(request: ActivatePolicyInput, selected: ActivePolicy)\nstruct PolicyLookup(revision: String)\nstruct ResolvedPolicy(revision: PolicyRevision, provider_policy: ProviderPolicy)\n\nenum PolicyError:\n  InvalidPolicy\n  RevisionConflict\n  MissingPolicy\n  GenerationConflict\n  CommandConflict\n  InvalidActivation\n\n# All keys include the server-selected site; the API accepts no tenant claim.\ndef policy_ref(revision: String) -> String:\n  concat_String([frame(site_id), frame(revision)])\n\ndef policies_table[s](scope: Scope[s]) -> TxTable[s, PolicyRevision]:\n  tx_table(scope, \"lawyer_policies\")\n\ndef active_policy_table[s](scope: Scope[s]) -> TxTable[s, ActivePolicy]:\n  tx_table(scope, \"lawyer_active_policy\")\n\ndef activation_receipts_table[s](scope: Scope[s]) -> TxTable[s, ActivationReceipt]:\n  tx_table(scope, \"lawyer_policy_activations\")\n\ndef bounded_text(value: String, maximum: Int) -> Bool:\n  match cmp_Int(length_String(value), 0):\n    case GT: cmp_Int(length_String(value), maximum) matches (LT | EQ)\n    case _: False\n\ndef in_range(value: Int, low: Int, high: Int) -> Bool:\n  match cmp_Int(value, low):\n    case LT: False\n    case _: cmp_Int(value, high) matches (LT | EQ)\n\ndef all_true(values: List[Bool]) -> Bool:\n  loop values:\n    case []: True\n    case [True, *tail]: all_true(tail)\n    case [False, *_]: False\n\ndef valid_providers(values: List[String]) -> Bool:\n  loop values:\n    case []: False\n    case [only]: bounded_text(only, 200)\n    case [head, *tail]:\n      if bounded_text(head, 200): valid_providers(tail)\n      else: False\n\ndef same_providers(left: List[String], right: List[String]) -> Bool:\n  loop left:\n    case []: right matches []\n    case [head, *tail]:\n      match right:\n        case [other, *rest]:\n          if eq_String(head, other): same_providers(tail, rest)\n          else: False\n        case []: False\n\ndef same_policy(left: LawyerPolicy, right: LawyerPolicy) -> Bool:\n  LawyerPolicy(VersionedPrompt(lv, lp), lr, lm, lps, lt, ltemp, ltimeout, lc) = left\n  LawyerPolicy(VersionedPrompt(rv, rp), rr, rm, rps, rt, rtemp, rtimeout, rc) = right\n  all_true([\n    eq_String(lv, rv), eq_String(lp, rp), eq_String(lr, rr), eq_String(lm, rm),\n    same_providers(lps, rps), cmp_Int(lt, rt) matches EQ,\n    cmp_Int(ltemp, rtemp) matches EQ, cmp_Int(ltimeout, rtimeout) matches EQ,\n    cmp_Int(lc, rc) matches EQ,\n  ])\n\ndef valid_policy(input: PublishPolicyInput) -> Bool:\n  PublishPolicyInput(revision, LawyerPolicy(VersionedPrompt(version, prompt), rubric, model, providers, tokens, temperature, timeout, article_chars)) = input\n  # Operational ceilings bound stored configuration and future request sizes;\n  # they are not editorial scores or admission thresholds.\n  all_true([\n    bounded_text(revision, 100), bounded_text(version, 100), bounded_text(prompt, 50000),\n    bounded_text(rubric, 100), bounded_text(model, 200), valid_providers(providers),\n    in_range(tokens, 1, 100000), in_range(temperature, 0, 2000),\n    in_range(timeout, 1, 300000), in_range(article_chars, 1, 1000000),\n  ])\n\n# Routing for this first policy family requires parameter support and zero\n# data retention, disallows data collection, and never falls back beyond the\n# configured provider set. The request builder will consume this public value.\ndef provider_policy(policy: LawyerPolicy) -> ProviderPolicy:\n  LawyerPolicy(_, _, _, providers, _, _, _, _) = policy\n  ProviderPolicy(providers, False, True, False, True)\n\ndef publish_plan[s](scope: Scope[s], input: PublishPolicyInput) -> Txn[s, PolicyError, PolicyRevision]:\n  if valid_policy(input):\n    PublishPolicyInput(revision, policy) = input\n    key = policy_ref(revision)\n    existing <- tx_bind(tx_read(policies_table(scope), key))\n    match existing:\n      case Some(stored):\n        PolicyRevision(site, id, prior) = stored\n        if all_true([eq_String(site, site_id), eq_String(id, revision), same_policy(prior, policy)]): tx_pure(stored)\n        else: tx_abort(RevisionConflict)\n      case None:\n        stored = PolicyRevision(site_id, revision, policy)\n        _ <- tx_bind(tx_insert(policies_table(scope), key, stored))\n        tx_pure(stored)\n  else: tx_abort(InvalidPolicy)\n\ndef publish_policy(db: Db, principal: Principal, input: PublishPolicyInput) -> IO[Outcome[PolicyError, PolicyRevision]]:\n  _ = principal\n  scope <- transaction(db)\n  publish_plan(scope, input)\n\ndef same_activation(left: ActivatePolicyInput, right: ActivatePolicyInput) -> Bool:\n  ActivatePolicyInput(lk, lg, lr) = left\n  ActivatePolicyInput(rk, rg, rr) = right\n  all_true([eq_String(lk, rk), cmp_Int(lg, rg) matches EQ, eq_String(lr, rr)])\n\ndef active_generation(current: Option[ActivePolicy]) -> Int:\n  match current:\n    case None: 0\n    case Some(ActivePolicy(_, generation)): generation\n\ndef select_policy[s](scope: Scope[s], input: ActivatePolicyInput) -> Txn[s, PolicyError, ActivePolicy]:\n  ActivatePolicyInput(key, expected, revision) = input\n  policy <- tx_bind(tx_read(policies_table(scope), policy_ref(revision)))\n  match policy:\n    case None: tx_abort(MissingPolicy)\n    case Some(PolicyRevision(site, id, _)):\n      if all_true([eq_String(site, site_id), eq_String(id, revision)]):\n        current <- tx_bind(tx_read(active_policy_table(scope), site_id))\n        if cmp_Int(active_generation(current), expected) matches EQ:\n          selected = ActivePolicy(revision, add(expected, 1))\n          _ <- tx_bind(tx_write(active_policy_table(scope), site_id, selected))\n          _ <- tx_bind(tx_insert(activation_receipts_table(scope), policy_ref(key), ActivationReceipt(input, selected)))\n          tx_pure(selected)\n        else: tx_abort(GenerationConflict)\n      else: tx_abort(MissingPolicy)\n\ndef activate_plan[s](scope: Scope[s], input: ActivatePolicyInput) -> Txn[s, PolicyError, ActivePolicy]:\n  ActivatePolicyInput(key, expected, revision) = input\n  if all_true([bounded_text(key, 100), bounded_text(revision, 100), in_range(expected, 0, 9007199254740990)]):\n    prior <- tx_bind(tx_read(activation_receipts_table(scope), policy_ref(key)))\n    match prior:\n      case Some(ActivationReceipt(request, selected)):\n        if same_activation(request, input): tx_pure(selected)\n        else: tx_abort(CommandConflict)\n      case None: select_policy(scope, input)\n  else: tx_abort(InvalidActivation)\n\ndef activate_policy(db: Db, principal: Principal, input: ActivatePolicyInput) -> IO[Outcome[PolicyError, ActivePolicy]]:\n  _ = principal\n  scope <- transaction(db)\n  activate_plan(scope, input)\n\ndef read_active_policy(db: Db, principal: Principal) -> IO[Outcome[PolicyError, Option[ActivePolicy]]]:\n  _ = principal\n  scope <- transaction(db)\n  tx_read(active_policy_table(scope), site_id)\n\ndef lookup_plan[s](scope: Scope[s], input: PolicyLookup) -> Txn[s, PolicyError, Option[ResolvedPolicy]]:\n  PolicyLookup(revision) = input\n  stored <- tx_bind(tx_read(policies_table(scope), policy_ref(revision)))\n  match stored:\n    case None: tx_pure(None)\n    case Some(value):\n      PolicyRevision(site, id, policy) = value\n      if all_true([eq_String(site, site_id), eq_String(id, revision)]):\n        tx_pure(Some(ResolvedPolicy(value, provider_policy(policy))))\n      else: tx_abort(MissingPolicy)\n\ndef read_policy(db: Db, principal: Principal, input: PolicyLookup) -> IO[Outcome[PolicyError, Option[ResolvedPolicy]]]:\n  _ = principal\n  scope <- transaction(db)\n  lookup_plan(scope, input)\n\naccess_rules = AccessSpec([\n  AccessRule(\"lawyer_policies\", GuardedOrRoles([], [\"icetakes-policy-reader\"])),\n  AccessRule(\"lawyer_active_policy\", GuardedOrRoles([], [\"icetakes-policy-reader\"])),\n  AccessRule(\"lawyer_policy_activations\", GuardedOrRoles([], [\"icetakes-policy-manager\"])),\n])\n\napi: ServiceDef = service_def(\"icetakes-lawyer-policy\", [\n  role_route(\"/internal/lawyer/policies/publish\", handler(\"publish_policy\", publish_policy), [\"icetakes-policy-reader\", \"icetakes-policy-manager\"], [\n    ReadPerm(\"lawyer_policies\"), CreatePerm(\"lawyer_policies\"),\n  ]),\n  role_route(\"/internal/lawyer/policies/activate\", handler(\"activate_policy\", activate_policy), [\"icetakes-policy-reader\", \"icetakes-policy-manager\"], [\n    ReadPerm(\"lawyer_policies\"), ReadPerm(\"lawyer_active_policy\"), WritePerm(\"lawyer_active_policy\"),\n    ReadPerm(\"lawyer_policy_activations\"), CreatePerm(\"lawyer_policy_activations\"),\n  ]),\n  role_route(\"/internal/lawyer/policies/active\", handler(\"read_active_policy\", read_active_policy), [\"icetakes-policy-reader\"], [\n    ReadPerm(\"lawyer_active_policy\"),\n  ]),\n  role_route(\"/internal/lawyer/policies/read\", handler(\"read_policy\", read_policy), [\"icetakes-policy-reader\"], [\n    ReadPerm(\"lawyer_policies\"),\n  ]),\n])\n\npolicy_reading = ReadingOrder([\n  ReadingStep(\"valid_policy\", \"bounds configured inputs without selecting a model or editorial threshold\"),\n  ReadingStep(\"same_policy\", \"compares every policy field before accepting a revision replay\"),\n  ReadingStep(\"publish_plan\", \"creates an immutable site revision or checks its existing value\"),\n  ReadingStep(\"select_policy\", \"checks the expected generation and commits pointer plus receipt together\"),\n  ReadingStep(\"activate_plan\", \"recovers the original selection after retries without undoing later selections\"),\n  ReadingStep(\"api\", \"separates configuration authority from worker and contributor roles\"),\n])\n"
    },
    {
      "fileName": "icetakes/app/lawyer-preparation.bosatsu",
      "source": "package Icetakes/LawyerPreparation\n\nfrom Bosatsu/Predef import (\n  String, Bool, Some, None, False, EQ, cmp_Int, eq_String,\n  concat_String\n)\nfrom Yichus/Access import Principal, AccessSpec, AccessRule, GuardedOrRoles\nfrom Yichus/Data import Db\nfrom Yichus/IO import IO\nfrom Yichus/Job import (\n  Job, JobError, JobApplied, JobRefused, Succeeded,\n  new_job, job_id, job_stage, job_input_ref, job_input_revision, job_state\n)\nfrom Yichus/Organize import ReadingOrder, ReadingStep\nfrom Yichus/Service import ServiceDef, ReadPerm, CreatePerm, WritePerm, handler, role_route, service_def\nfrom Yichus/Transaction import (\n  Scope, Txn, Outcome, tx_pure, tx_bind, tx_abort, tx_read, tx_insert,\n  tx_database_time_millis, transaction\n)\nfrom Icetakes/ContributionModel import (\n  same_contribution, Contribution, ContributionJob, contribution_ref, job_key,\n  contributions_table, jobs_table as fetch_jobs_table, ArticleSnapshot, snapshots_table,\n  input_matches_job\n)\nfrom Icetakes/Identity import (\n  frame\n)\n\nfrom Icetakes/Judgment import EvidenceRef, LawyerV1\nfrom Icetakes/JudgmentCompletion import (\n  complete_judgment\n)\nfrom Icetakes/JudgmentStore import (\n  JudgmentTask, jobs_table, judgment_tasks_table\n)\n\nexport (\n  PrepareLawyerInput(), LawyerPrepared(), PreparationError(), prepare_lawyer, lawyer_ref,\n  lawyer_stage, access_rules, api, preparation_reading\n)\n\nexposes (\n  Yichus/Access, Yichus/Data, Yichus/IO, Yichus/Job,\n  Yichus/Organize, Yichus/Service, Yichus/Transaction\n)\n\nstruct PrepareLawyerInput(contribution_id: String)\nstruct LawyerPrepared(job_id: String, input_ref: String, snapshot_ref: String)\n\nenum PreparationError:\n  MissingContribution\n  MissingSnapshot\n  MissingFetchJob\n  SourceChanged\n  FetchNotComplete\n  PreparationConflict\n  JobCreationRejected(reason: JobError)\n\n# Operational bounds, not admission thresholds. No AI request is made here.\nlawyer_stage = \"lawyer-v1\"\nlawyer_attempts = 5\nlawyer_retry_millis = 30000\ninput_revision = 1\n\n# One logical preparation per immutable contribution and stage, independent\n# of delivery or worker identity. Retrying cannot create another candidate.\ndef lawyer_ref(id: String) -> String:\n  concat_String([frame(lawyer_stage), frame(contribution_ref(id))])\n\ndef require_source[s](\n  current: Contribution, snapshot: ArticleSnapshot, queued: ContributionJob, id: String\n) -> Txn[s, PreparationError, String]:\n  ArticleSnapshot(frozen, _, _, _, _, _, _, _, _) = snapshot\n  Contribution(current_id, _, _, _, _, _, _, _) = current\n  if eq_String(current_id, id):\n    if same_contribution(current, frozen):\n      if input_matches_job(current, queued):\n        ContributionJob(_, job) = queued\n        match job_state(job):\n          case Succeeded(output_ref, _):\n            if eq_String(output_ref, contribution_ref(id)): tx_pure(output_ref)\n            else: tx_abort(SourceChanged)\n          case _: tx_abort(FetchNotComplete)\n      else: tx_abort(SourceChanged)\n    else: tx_abort(SourceChanged)\n  else: tx_abort(SourceChanged)\n\ndef source_ready[s](scope: Scope[s], id: String) -> Txn[s, PreparationError, String]:\n  current <- tx_bind(tx_read(contributions_table(scope), id))\n  match current:\n    case None: tx_abort(MissingContribution)\n    case Some(contribution):\n      snapshot <- tx_bind(tx_read(snapshots_table(scope), contribution_ref(id)))\n      match snapshot:\n        case None: tx_abort(MissingSnapshot)\n        case Some(frozen):\n          queued <- tx_bind(tx_read(fetch_jobs_table(scope), job_key(id)))\n          match queued:\n            case None: tx_abort(MissingFetchJob)\n            case Some(job): require_source(contribution, frozen, job, id)\n\ndef same_preparation(job: Job, task: JudgmentTask, key: String, snapshot_ref: String) -> Bool:\n  JudgmentTask(ref, revision, schema, evidence, delay) = task\n  if eq_String(job_id(job), key):\n    if eq_String(job_stage(job), lawyer_stage):\n      if eq_String(job_input_ref(job), key):\n        if cmp_Int(job_input_revision(job), input_revision) matches EQ:\n          if eq_String(ref, key):\n            if cmp_Int(revision, input_revision) matches EQ:\n              if schema matches LawyerV1:\n                if cmp_Int(delay, lawyer_retry_millis) matches EQ:\n                  match evidence:\n                    case [EvidenceRef(evidence_id)]: eq_String(evidence_id, snapshot_ref)\n                    case _: False\n                else: False\n              else: False\n            else: False\n          else: False\n        else: False\n      else: False\n    else: False\n  else: False\n\ndef create_preparation[s](scope: Scope[s], key: String, snapshot_ref: String) -> Txn[s, PreparationError, LawyerPrepared]:\n  now <- tx_bind(tx_database_time_millis(scope))\n  match new_job(key, lawyer_stage, key, input_revision, [], lawyer_attempts, now):\n    case JobRefused(error): tx_abort(JobCreationRejected(error))\n    case JobApplied(job):\n      task = JudgmentTask(key, input_revision, LawyerV1, [EvidenceRef(snapshot_ref)], lawyer_retry_millis)\n      _ <- tx_bind(tx_insert(judgment_tasks_table(scope), key, task))\n      _ <- tx_bind(tx_insert(jobs_table(scope), key, job))\n      tx_pure(LawyerPrepared(key, key, snapshot_ref))\n\ndef prepare_plan[s](scope: Scope[s], input: PrepareLawyerInput) -> Txn[s, PreparationError, LawyerPrepared]:\n  PrepareLawyerInput(id) = input\n  snapshot_ref <- tx_bind(source_ready(scope, id))\n  key = lawyer_ref(id)\n  job <- tx_bind(tx_read(jobs_table(scope), key))\n  task <- tx_bind(tx_read(judgment_tasks_table(scope), key))\n  match (job, task):\n    case (None, None): create_preparation(scope, key, snapshot_ref)\n    case (Some(existing_job), Some(existing_task)):\n      if same_preparation(existing_job, existing_task, key, snapshot_ref):\n        tx_pure(LawyerPrepared(key, key, snapshot_ref))\n      else: tx_abort(PreparationConflict)\n    case _: tx_abort(PreparationConflict)\n\ndef prepare_lawyer(db: Db, principal: Principal, input: PrepareLawyerInput) -> IO[Outcome[PreparationError, LawyerPrepared]]:\n  # Authority is enforced by role_route. Preparation identity is independent\n  # of which authorized worker delivers this command.\n  _ = principal\n  scope <- transaction(db)\n  prepare_plan(scope, input)\n\naccess_rules = AccessSpec([\n  AccessRule(\"jobs\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n  AccessRule(\"judgment_tasks\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n  AccessRule(\"judgment_attempts\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n  AccessRule(\"judgment_artifacts\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n])\n\napi: ServiceDef = service_def(\"icetakes-lawyer-preparation\", [\n  role_route(\"/internal/contributions/prepare-lawyer\", handler(\"prepare_lawyer\", prepare_lawyer), [\"icetakes-job-manager\"], [\n    ReadPerm(\"contributions\"), ReadPerm(\"article_snapshots\"), ReadPerm(\"contribution_jobs\"),\n    ReadPerm(\"jobs\"), CreatePerm(\"jobs\"), ReadPerm(\"judgment_tasks\"), CreatePerm(\"judgment_tasks\"),\n  ]),\n  role_route(\"/internal/judgments/complete\", handler(\"complete_judgment\", complete_judgment), [\"icetakes-job-manager\"], [\n    ReadPerm(\"jobs\"), WritePerm(\"jobs\"), ReadPerm(\"judgment_tasks\"),\n    ReadPerm(\"judgment_attempts\"), WritePerm(\"judgment_attempts\"),\n    ReadPerm(\"judgment_artifacts\"), WritePerm(\"judgment_artifacts\"),\n  ]),\n])\n\npreparation_reading = ReadingOrder([\n  ReadingStep(\"lawyer_ref\", \"names one stage input per immutable contribution\"),\n  ReadingStep(\"require_source\", \"requires the matching fetch job to have committed this snapshot\"),\n  ReadingStep(\"source_ready\", \"reads the source and fetch outcome in the preparation transaction\"),\n  ReadingStep(\"same_preparation\", \"recognizes an existing task without resetting its job\"),\n  ReadingStep(\"create_preparation\", \"commits the task and new job together\"),\n  ReadingStep(\"prepare_plan\", \"replays existing preparation or rejects inconsistent state\"),\n  ReadingStep(\"prepare_lawyer\", \"runs preparation through the atomic boundary\"),\n  ReadingStep(\"api\", \"requires verified job-manager authority\"),\n])\n"
    }
  ],
  "view": {
    "schemaVersion": "implementation-view-1",
    "question": "Which shared operations should Icetakes expose before adding Lawyer execution and reconsideration?",
    "pins": [
      "Icetakes/ArticleRetrieval::start_command",
      "Icetakes/LawyerPreparation::create_preparation",
      "Icetakes/JudgmentCompletion::new_completion_attempt",
      "Icetakes/LawyerPolicy::activate_plan"
    ],
    "groups": [
      {
        "id": "shared",
        "label": "Shared domain and storage contracts",
        "members": []
      },
      {
        "id": "ingestion",
        "label": "Contribution and source ingestion",
        "members": []
      },
      {
        "id": "judging",
        "label": "Judgment preparation and completion",
        "members": []
      },
      {
        "id": "policy",
        "label": "Versioned editorial policy",
        "members": []
      },
      {
        "id": "Identity",
        "label": "Identity",
        "parent": "shared",
        "members": [
          "Icetakes/Identity::frame",
          "Icetakes/Identity::site_id"
        ]
      },
      {
        "id": "ContributionModel",
        "label": "ContributionModel",
        "parent": "shared",
        "members": [
          "Icetakes/ContributionModel::contribution_reading",
          "Icetakes/ContributionModel::contribution_tables",
          "Icetakes/ContributionModel::contributions_table",
          "Icetakes/ContributionModel::fetch_stage",
          "Icetakes/ContributionModel::job_rows",
          "Icetakes/ContributionModel::jobs_table",
          "Icetakes/ContributionModel::over_limit",
          "Icetakes/ContributionModel::progress_state",
          "Icetakes/ContributionModel::same_urgency",
          "Icetakes/ContributionModel::snapshots_table",
          "Icetakes/ContributionModel::contribution_progress",
          "Icetakes/ContributionModel::contribution_ref",
          "Icetakes/ContributionModel::job_key",
          "Icetakes/ContributionModel::same_content",
          "Icetakes/ContributionModel::validate_idempotency_key",
          "Icetakes/ContributionModel::input_matches_job",
          "Icetakes/ContributionModel::same_contribution"
        ]
      },
      {
        "id": "JudgmentStore",
        "label": "JudgmentStore",
        "parent": "shared",
        "members": [
          "Icetakes/JudgmentStore::jobs_table",
          "Icetakes/JudgmentStore::judgment_artifacts_table",
          "Icetakes/JudgmentStore::judgment_attempts_table",
          "Icetakes/JudgmentStore::judgment_tables",
          "Icetakes/JudgmentStore::judgment_tasks_table"
        ]
      },
      {
        "id": "ContributionIntake",
        "label": "ContributionIntake",
        "parent": "ingestion",
        "members": [
          "Icetakes/ContributionIntake::access_rules",
          "Icetakes/ContributionIntake::can_read_contribution",
          "Icetakes/ContributionIntake::can_read_contribution_job",
          "Icetakes/ContributionIntake::charter_version",
          "Icetakes/ContributionIntake::fetch_max_attempts",
          "Icetakes/ContributionIntake::frontend",
          "Icetakes/ContributionIntake::intake_reading",
          "Icetakes/ContributionIntake::intake_tables",
          "Icetakes/ContributionIntake::receipt_rows",
          "Icetakes/ContributionIntake::receipts_table",
          "Icetakes/ContributionIntake::command_local_key",
          "Icetakes/ContributionIntake::contribution_status",
          "Icetakes/ContributionIntake::create_submission",
          "Icetakes/ContributionIntake::same_submission",
          "Icetakes/ContributionIntake::validate_submission",
          "Icetakes/ContributionIntake::submit_plan",
          "Icetakes/ContributionIntake::submit_contribution",
          "Icetakes/ContributionIntake::api"
        ]
      },
      {
        "id": "ArticleRetrieval",
        "label": "ArticleRetrieval",
        "parent": "ingestion",
        "members": [
          "Icetakes/ArticleRetrieval::access_rules",
          "Icetakes/ArticleRetrieval::commands_table",
          "Icetakes/ArticleRetrieval::contribution_id",
          "Icetakes/ArticleRetrieval::fetch_transition",
          "Icetakes/ArticleRetrieval::retrieval_reading",
          "Icetakes/ArticleRetrieval::retrieval_tables",
          "Icetakes/ArticleRetrieval::same_command",
          "Icetakes/ArticleRetrieval::command_local_key",
          "Icetakes/ArticleRetrieval::fetch_request",
          "Icetakes/ArticleRetrieval::read_contribution",
          "Icetakes/ArticleRetrieval::finish_command",
          "Icetakes/ArticleRetrieval::persist_job",
          "Icetakes/ArticleRetrieval::read_fetch_job",
          "Icetakes/ArticleRetrieval::checked_job",
          "Icetakes/ArticleRetrieval::record_result",
          "Icetakes/ArticleRetrieval::recover_before_claim",
          "Icetakes/ArticleRetrieval::complete_active",
          "Icetakes/ArticleRetrieval::recover_active",
          "Icetakes/ArticleRetrieval::start_command",
          "Icetakes/ArticleRetrieval::complete_plan",
          "Icetakes/ArticleRetrieval::prepare_plan",
          "Icetakes/ArticleRetrieval::retrieve_contribution",
          "Icetakes/ArticleRetrieval::api"
        ]
      },
      {
        "id": "Judgment",
        "label": "Judgment",
        "parent": "judging",
        "members": [
          "Icetakes/Judgment::judgment_reading",
          "Icetakes/Judgment::member_evidence",
          "Icetakes/Judgment::member_string",
          "Icetakes/Judgment::nonempty_string",
          "Icetakes/Judgment::required_basis_points",
          "Icetakes/Judgment::required_event_time",
          "Icetakes/Judgment::role_value_decoders",
          "Icetakes/Judgment::decode_evidence_ref",
          "Icetakes/Judgment::expected_fields",
          "Icetakes/Judgment::required_brief_bullets",
          "Icetakes/Judgment::required_nonempty_string",
          "Icetakes/Judgment::decode_evidence_refs",
          "Icetakes/Judgment::required_urgency_assessment",
          "Icetakes/Judgment::required_evidence_refs",
          "Icetakes/Judgment::decode_devils_advocate_value",
          "Icetakes/Judgment::decode_lawyer_value",
          "Icetakes/Judgment::decode_taxonomy_value",
          "Icetakes/Judgment::decode_judgment"
        ]
      },
      {
        "id": "JudgmentCompletion",
        "label": "JudgmentCompletion",
        "parent": "judging",
        "members": [
          "Icetakes/JudgmentCompletion::apply_job_result",
          "Icetakes/JudgmentCompletion::completion_reading",
          "Icetakes/JudgmentCompletion::nonnegative",
          "Icetakes/JudgmentCompletion::read_job",
          "Icetakes/JudgmentCompletion::read_task",
          "Icetakes/JudgmentCompletion::require_task_matches_job",
          "Icetakes/JudgmentCompletion::same_lease",
          "Icetakes/JudgmentCompletion::same_model_completion",
          "Icetakes/JudgmentCompletion::accepted_attempt",
          "Icetakes/JudgmentCompletion::malformed_attempt",
          "Icetakes/JudgmentCompletion::same_completion_input",
          "Icetakes/JudgmentCompletion::validate_model_completion",
          "Icetakes/JudgmentCompletion::validate_completion_input",
          "Icetakes/JudgmentCompletion::new_completion_attempt",
          "Icetakes/JudgmentCompletion::completion_attempt_plan",
          "Icetakes/JudgmentCompletion::completion_plan",
          "Icetakes/JudgmentCompletion::complete_judgment"
        ]
      },
      {
        "id": "LawyerPreparation",
        "label": "LawyerPreparation",
        "parent": "judging",
        "members": [
          "Icetakes/LawyerPreparation::access_rules",
          "Icetakes/LawyerPreparation::input_revision",
          "Icetakes/LawyerPreparation::lawyer_attempts",
          "Icetakes/LawyerPreparation::lawyer_retry_millis",
          "Icetakes/LawyerPreparation::lawyer_stage",
          "Icetakes/LawyerPreparation::preparation_reading",
          "Icetakes/LawyerPreparation::create_preparation",
          "Icetakes/LawyerPreparation::same_preparation",
          "Icetakes/LawyerPreparation::lawyer_ref",
          "Icetakes/LawyerPreparation::require_source",
          "Icetakes/LawyerPreparation::source_ready",
          "Icetakes/LawyerPreparation::prepare_plan",
          "Icetakes/LawyerPreparation::prepare_lawyer",
          "Icetakes/LawyerPreparation::api"
        ]
      },
      {
        "id": "LawyerPolicy",
        "label": "LawyerPolicy",
        "parent": "policy",
        "members": [
          "Icetakes/LawyerPolicy::access_rules",
          "Icetakes/LawyerPolicy::activation_receipts_table",
          "Icetakes/LawyerPolicy::active_generation",
          "Icetakes/LawyerPolicy::active_policy_table",
          "Icetakes/LawyerPolicy::all_true",
          "Icetakes/LawyerPolicy::bounded_text",
          "Icetakes/LawyerPolicy::in_range",
          "Icetakes/LawyerPolicy::policies_table",
          "Icetakes/LawyerPolicy::policy_reading",
          "Icetakes/LawyerPolicy::provider_policy",
          "Icetakes/LawyerPolicy::same_providers",
          "Icetakes/LawyerPolicy::policy_ref",
          "Icetakes/LawyerPolicy::read_active_policy",
          "Icetakes/LawyerPolicy::same_activation",
          "Icetakes/LawyerPolicy::same_policy",
          "Icetakes/LawyerPolicy::valid_providers",
          "Icetakes/LawyerPolicy::lookup_plan",
          "Icetakes/LawyerPolicy::select_policy",
          "Icetakes/LawyerPolicy::valid_policy",
          "Icetakes/LawyerPolicy::activate_plan",
          "Icetakes/LawyerPolicy::publish_plan",
          "Icetakes/LawyerPolicy::read_policy",
          "Icetakes/LawyerPolicy::activate_policy",
          "Icetakes/LawyerPolicy::publish_policy",
          "Icetakes/LawyerPolicy::api"
        ]
      }
    ],
    "roles": [
      {
        "id": "identity",
        "label": "Site and framed identity",
        "references": [
          "Icetakes/Identity::site_id",
          "Icetakes/Identity::frame",
          "Icetakes/ContributionModel::job_key"
        ]
      },
      {
        "id": "storage",
        "label": "Task and immutable evidence storage",
        "references": [
          "Icetakes/ContributionModel::jobs_table",
          "Icetakes/JudgmentStore::jobs_table",
          "Icetakes/ContributionModel::snapshots_table",
          "Icetakes/JudgmentStore::judgment_tasks_table",
          "Icetakes/JudgmentStore::judgment_attempts_table",
          "Icetakes/LawyerPolicy::active_policy_table"
        ]
      },
      {
        "id": "decoding",
        "label": "Untrusted judgment decoding",
        "references": [
          "Icetakes/Judgment::decode_judgment"
        ]
      }
    ]
  },
  "artifact": {
    "schemaVersion": "implementation-comparison-1",
    "snapshot": "54ff11ba98719d71ca543a47c00b291f5a759761c69ef2dff033dbce4e7f5cb4",
    "question": "Which shared operations should Icetakes expose before adding Lawyer execution and reconsideration?",
    "order": [],
    "pins": [
      "Icetakes/ArticleRetrieval::start_command",
      "Icetakes/LawyerPreparation::create_preparation",
      "Icetakes/JudgmentCompletion::new_completion_attempt",
      "Icetakes/LawyerPolicy::activate_plan"
    ],
    "nodes": [
      {
        "id": "Icetakes/ArticleRetrieval::access_rules",
        "name": "access_rules",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "Yichus/Access::AccessSpec",
        "signatureId": "Yichus/Access::AccessSpec",
        "exported": true,
        "location": {
          "file": "article_retrieval",
          "start": 12534,
          "end": 12679,
          "label": "article_retrieval:275:16",
          "source": "AccessSpec([\n  AccessRule(\"retrieval_commands\", OwnerScoped),\n  AccessRule(\"article_snapshots\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::api",
        "name": "api",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "Yichus/Service::ServiceDef",
        "signatureId": "Yichus/Service::ServiceDef",
        "exported": true,
        "location": {
          "file": "article_retrieval",
          "start": 12699,
          "end": 13142,
          "label": "article_retrieval:280:19",
          "source": "service_def(\"icetakes-retrieval\", [\n  role_route(\"/internal/contributions/retrieve\", handler(\"retrieve_contribution\", retrieve_contribution), [\"icetakes-job-manager\"], [\n    ReadPerm(\"contributions\"), ReadPerm(\"contribution_jobs\"), WritePerm(\"contribution_jobs\"),\n    ReadPerm(\"retrieval_commands\"), CreatePerm(\"retrieval_commands\"), WritePerm(\"retrieval_commands\"),\n    ReadPerm(\"article_snapshots\"), CreatePerm(\"article_snapshots\"),\n  ]),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::checked_job",
        "name": "checked_job",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Contribution, ContributionJob) -> Yichus/Transaction::Txn[a, RetrievalError, Yichus/Job::Job]",
        "signatureId": "forall a: *. (Icetakes/ContributionModel::Contribution, Icetakes/ContributionModel::ContributionJob) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Yichus/Job::Job]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 4300,
          "end": 4428,
          "label": "article_retrieval:112:3",
          "source": "if input_matches_job(contribution, queued):\n    ContributionJob(_, job) = queued\n    tx_pure(job)\n  else: tx_abort(InputChanged)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::command_local_key",
        "name": "command_local_key",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "RetrieveContributionInput -> String",
        "signatureId": "Icetakes/ArticleRetrieval::RetrieveContributionInput -> Bosatsu/Predef::String",
        "exported": true,
        "location": {
          "file": "article_retrieval",
          "start": 3156,
          "end": 3275,
          "label": "article_retrieval:86:3",
          "source": "RetrieveContributionInput(key, _) = input\n  concat_String([frame(site_id), frame(\"retrieve-contribution\"), frame(key)])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::commands_table",
        "name": "commands_table",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, RetrievalCommand]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ArticleRetrieval::RetrievalCommand]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 3048,
          "end": 3085,
          "label": "article_retrieval:83:3",
          "source": "tx_table(scope, \"retrieval_commands\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::complete_active",
        "name": "complete_active",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, FetchContext, Yichus/ArticleFetch::ArticleFetchResult) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::FetchContext, Yichus/ArticleFetch::ArticleFetchResult) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 10657,
          "end": 11155,
          "label": "article_retrieval:234:3",
          "source": "Principal(worker, _) = principal\n  FetchContext(contribution, token, _) = context\n  queued <- tx_bind(read_fetch_job(scope, contribution_id(contribution)))\n  current <- tx_bind(checked_job(contribution, queued))\n  now <- tx_bind(tx_database_time_millis(scope))\n  updated <- tx_bind(persist_job(scope, contribution,\n    fetch_transition(current, token, worker, result, now, contribution_ref(contribution_id(contribution)))\n  ))\n  record_result(scope, principal, input, context, result, updated, now)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::complete_plan",
        "name": "complete_plan",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, Yichus/ArticleFetch::ArticleFetchResult) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Yichus/ArticleFetch::ArticleFetchResult) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 11329,
          "end": 11816,
          "label": "article_retrieval:247:3",
          "source": "previous <- tx_bind(tx_read(commands_table(scope), owner_key(principal, command_local_key(input))))\n  match previous:\n    case None: tx_abort(MissingCommand)\n    case Some(RetrievalCommand(previous_input, execution)):\n      if same_command(previous_input, input):\n        match execution:\n          case Finished(outcome): tx_pure(RetrievalFinished(outcome))\n          case Active(context): complete_active(scope, principal, input, context, result)\n      else: tx_abort(CommandKeyReused)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::contribution_id",
        "name": "contribution_id",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "Contribution -> String",
        "signatureId": "Icetakes/ContributionModel::Contribution -> Bosatsu/Predef::String",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 3623,
          "end": 3680,
          "label": "article_retrieval:96:3",
          "source": "Contribution(id, _, _, _, _, _, _, _) = contribution\n  id"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::fetch_request",
        "name": "fetch_request",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "(Contribution, Yichus/Job::Job) -> Yichus/ArticleFetch::ArticleRequest",
        "signatureId": "(Icetakes/ContributionModel::Contribution, Yichus/Job::Job) -> Yichus/ArticleFetch::ArticleRequest",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 6114,
          "end": 6342,
          "label": "article_retrieval:151:3",
          "source": "Contribution(_, _, _, _, url, _, _, _) = contribution\n  ArticleRequest(\n    concat_String([frame(job_id(claimed)), frame(int_to_String(job_fencing_version(claimed)))]),\n    url, [\"text/html\", \"text/plain\"], 2097152, 5, 30000\n  )"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::fetch_transition",
        "name": "fetch_transition",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "(Yichus/Job::Job, Yichus/Job::LeaseToken, String, Yichus/ArticleFetch::ArticleFetchResult, Int, String) -> Yichus/Job::JobResult",
        "signatureId": "(Yichus/Job::Job, Yichus/Job::LeaseToken, Bosatsu/Predef::String, Yichus/ArticleFetch::ArticleFetchResult, Bosatsu/Predef::Int, Bosatsu/Predef::String) -> Yichus/Job::JobResult",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 9075,
          "end": 9483,
          "label": "article_retrieval:207:3",
          "source": "match result:\n    case Fetched(_, _, _, _, _, _): complete_transition(job, token, worker, snapshot_ref, now)\n    case Blocked(reason) | PermanentFailure(reason): permanent_fail_transition(job, token, worker, reason, now)\n    case RetryableFailure(reason): fail_transition(job, token, worker, reason, now, 30000)\n    case TimedOut(_): fail_transition(job, token, worker, \"article fetch timed out\", now, 30000)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::finish_command",
        "name": "finish_command",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, RetrievalOutcome) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::RetrievalOutcome) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 5012,
          "end": 5187,
          "label": "article_retrieval:128:3",
          "source": "_ <- tx_bind(tx_write(commands_table(scope), owner_key(principal, command_local_key(input)), RetrievalCommand(input, Finished(outcome))))\n  tx_pure(RetrievalFinished(outcome))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::persist_job",
        "name": "persist_job",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Contribution, Yichus/Job::JobResult) -> Yichus/Transaction::Txn[a, RetrievalError, Yichus/Job::Job]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/ContributionModel::Contribution, Yichus/Job::JobResult) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Yichus/Job::Job]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 4547,
          "end": 4838,
          "label": "article_retrieval:118:3",
          "source": "match result:\n    case JobRefused(reason): tx_abort(TransitionRejected(reason))\n    case JobApplied(updated):\n      Contribution(id, _, _, author, _, _, _, _) = contribution\n      _ <- tx_bind(tx_write(jobs_table(scope), job_key(id), ContributionJob(author, updated)))\n      tx_pure(updated)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::prepare_plan",
        "name": "prepare_plan",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput) -> Yichus/Transaction::Txn[a, RetrievalError, Preparation]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::Preparation]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 8101,
          "end": 8931,
          "label": "article_retrieval:189:3",
          "source": "RetrieveContributionInput(key, _) = input\n  match validate_idempotency_key(key):\n    case Some(reason): tx_abort(InvalidCommand(reason))\n    case None:\n      previous <- tx_bind(tx_read(commands_table(scope), owner_key(principal, command_local_key(input))))\n      now <- tx_bind(tx_database_time_millis(scope))\n      match previous:\n        case None: start_command(scope, principal, input, now)\n        case Some(RetrievalCommand(previous_input, execution)):\n          if same_command(previous_input, input):\n            match execution:\n              case Finished(outcome): tx_pure(Observe(RetrievalFinished(outcome)))\n              case Active(context):\n                status <- tx_bind(recover_active(scope, principal, input, context, now))\n                tx_pure(Observe(status))\n          else: tx_abort(CommandKeyReused)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::read_contribution",
        "name": "read_contribution",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], String) -> Yichus/Transaction::Txn[a, RetrievalError, Contribution]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ContributionModel::Contribution]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 3779,
          "end": 3947,
          "label": "article_retrieval:100:3",
          "source": "found <- tx_bind(tx_read(contributions_table(scope), id))\n  match found:\n    case None: tx_abort(MissingContribution)\n    case Some(contribution): tx_pure(contribution)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::read_fetch_job",
        "name": "read_fetch_job",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], String) -> Yichus/Transaction::Txn[a, RetrievalError, ContributionJob]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ContributionModel::ContributionJob]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 4046,
          "end": 4192,
          "label": "article_retrieval:106:3",
          "source": "found <- tx_bind(tx_read(jobs_table(scope), job_key(id)))\n  match found:\n    case None: tx_abort(MissingFetchJob)\n    case Some(job): tx_pure(job)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::record_result",
        "name": "record_result",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, FetchContext, Yichus/ArticleFetch::ArticleFetchResult, Yichus/Job::Job, Int) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::FetchContext, Yichus/ArticleFetch::ArticleFetchResult, Yichus/Job::Job, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 9706,
          "end": 10456,
          "label": "article_retrieval:217:3",
          "source": "FetchContext(contribution, _, request) = context\n  snapshot_ref = contribution_ref(contribution_id(contribution))\n  match result:\n    case Fetched(final_url, chain, status, media, body, bytes):\n      existing <- tx_bind(tx_read(snapshots_table(scope), snapshot_ref))\n      match existing:\n        case Some(_): tx_abort(SnapshotAlreadyExists)\n        case None:\n          snapshot = ArticleSnapshot(contribution, request, final_url, chain, status, media, body, bytes, now)\n          _ <- tx_bind(tx_insert(snapshots_table(scope), snapshot_ref, snapshot))\n          finish_command(scope, principal, input, SnapshotReady(snapshot_ref, now))\n    case _: finish_command(scope, principal, input, FetchRejected(result, contribution_progress(updated), now))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::recover_active",
        "name": "recover_active",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, FetchContext, Int) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::FetchContext, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 5369,
          "end": 6031,
          "label": "article_retrieval:135:3",
          "source": "Principal(worker, _) = principal\n  FetchContext(contribution, token, _) = context\n  queued <- tx_bind(read_fetch_job(scope, contribution_id(contribution)))\n  current <- tx_bind(checked_job(contribution, queued))\n  match lease_error(current, token, worker, now):\n    case None: tx_pure(RetrievalPending)\n    case Some(reason):\n      match reason:\n        case LeaseExpired(_):\n          _ <- tx_bind(persist_job(scope, contribution,\n            expire_transition(current, job_fencing_version(current), now)\n          ))\n          finish_command(scope, principal, input, Abandoned(reason))\n        case _: finish_command(scope, principal, input, Abandoned(reason))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::recover_before_claim",
        "name": "recover_before_claim",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Contribution, Yichus/Job::Job, Int) -> Yichus/Transaction::Txn[a, RetrievalError, Yichus/Job::Job]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/ContributionModel::Contribution, Yichus/Job::Job, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Yichus/Job::Job]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 6475,
          "end": 6800,
          "label": "article_retrieval:158:3",
          "source": "match expire_transition(current, job_fencing_version(current), now):\n    case JobApplied(updated): persist_job(scope, contribution, JobApplied(updated))\n    case JobRefused(reason):\n      match reason:\n        case LeaseHeld(_) | StaleLease | TerminalJob: tx_pure(current)\n        case _: tx_abort(TransitionRejected(reason))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::retrieval_reading",
        "name": "retrieval_reading",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "location": {
          "file": "article_retrieval",
          "start": 13235,
          "end": 14612,
          "label": "article_retrieval:290:21",
          "source": "ReadingOrder([\n  ReadingStep(\"command_local_key\", \"binds delivery keys to the site and operation before owner_key scopes them to the caller\"),\n  ReadingStep(\"same_command\", \"rejects changed work under an existing delivery key\"),\n  ReadingStep(\"persist_job\", \"writes only a checked transition with its contribution owner\"),\n  ReadingStep(\"finish_command\", \"records the durable replay result\"),\n  ReadingStep(\"recover_active\", \"reports a live attempt or abandons a lost lease\"),\n  ReadingStep(\"fetch_request\", \"freezes the bounded fetch policy around the stored URL\"),\n  ReadingStep(\"recover_before_claim\", \"settles expired leases before selecting another attempt\"),\n  ReadingStep(\"start_command\", \"commits the claim and delivery record together\"),\n  ReadingStep(\"prepare_plan\", \"resolves duplicate delivery before starting external work\"),\n  ReadingStep(\"fetch_transition\", \"maps typed fetch outcomes to checked job transitions\"),\n  ReadingStep(\"record_result\", \"records an immutable snapshot or a typed rejection\"),\n  ReadingStep(\"complete_active\", \"checks the current lease before committing the result\"),\n  ReadingStep(\"complete_plan\", \"resolves a completion retry from the same delivery record\"),\n  ReadingStep(\"retrieve_contribution\", \"keeps the fetch between its claim and completion transactions\"),\n  ReadingStep(\"api\", \"restricts retrieval to verified job managers\"),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::retrieval_tables",
        "name": "retrieval_tables",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "location": {
          "file": "article_retrieval",
          "start": 13163,
          "end": 13213,
          "label": "article_retrieval:288:20",
          "source": "FamilySpec(\"retrieval tables\", [\"commands_table\"])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::retrieve_contribution",
        "name": "retrieve_contribution",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, RetrieveContributionInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[RetrievalError, RetrievalStatus]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]]",
        "exported": true,
        "location": {
          "file": "article_retrieval",
          "start": 11963,
          "end": 12517,
          "label": "article_retrieval:260:3",
          "source": "def prepare():\n    scope <- transaction(db)\n    prepare_plan(scope, principal, input)\n  prepared <- flat_map(prepare())\n  match prepared:\n    case Aborted(reason): pure(Aborted(reason))\n    case RetryExhausted: pure(RetryExhausted)\n    case CommitUnknown: pure(CommitUnknown)\n    case Committed(Observe(status)): pure(Committed(status))\n    case Committed(StartFetch(context)):\n      FetchContext(_, _, request) = context\n      result <- flat_map(fetch_article(request))\n      scope <- transaction(db)\n      complete_plan(scope, principal, input, result)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::same_command",
        "name": "same_command",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "(RetrieveContributionInput, RetrieveContributionInput) -> Bool",
        "signatureId": "(Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::RetrieveContributionInput) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 3372,
          "end": 3560,
          "label": "article_retrieval:90:3",
          "source": "RetrieveContributionInput(left_key, left_id) = left\n  RetrieveContributionInput(right_key, right_id) = right\n  if eq_String(left_key, right_key): eq_String(left_id, right_id)\n  else: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ArticleRetrieval::start_command",
        "name": "start_command",
        "package": "Icetakes/ArticleRetrieval",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, Int) -> Yichus/Transaction::Txn[a, RetrievalError, Preparation]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::Preparation]",
        "exported": false,
        "location": {
          "file": "article_retrieval",
          "start": 6952,
          "end": 7960,
          "label": "article_retrieval:168:3",
          "source": "Principal(worker, _) = principal\n  RetrieveContributionInput(_, id) = input\n  contribution <- tx_bind(read_contribution(scope, id))\n  if eq_String(contribution_id(contribution), id):\n    queued <- tx_bind(read_fetch_job(scope, id))\n    previous <- tx_bind(checked_job(contribution, queued))\n    current <- tx_bind(recover_before_claim(scope, contribution, previous, now))\n    match claim_transition(current, worker, now, 60000):\n      case ClaimRefused(reason):\n        status <- tx_bind(finish_command(scope, principal, input, NotStarted(reason)))\n        tx_pure(Observe(status))\n      case ClaimApplied(Claim(claimed, token)):\n        _ <- tx_bind(persist_job(scope, contribution, JobApplied(claimed)))\n        context = FetchContext(contribution, token, fetch_request(contribution, claimed))\n        _ <- tx_bind(tx_insert(commands_table(scope), owner_key(principal, command_local_key(input)), RetrievalCommand(input, Active(context))))\n        tx_pure(StartFetch(context))\n  else: tx_abort(InputChanged)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::access_rules",
        "name": "access_rules",
        "package": "Icetakes/ContributionIntake",
        "signature": "Yichus/Access::AccessSpec",
        "signatureId": "Yichus/Access::AccessSpec",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 7859,
          "end": 8146,
          "label": "contribution_intake:209:16",
          "source": "AccessSpec([\n  AccessRule(\"contribution_receipts\", OwnerScoped),\n  AccessRule(\"contributions\", GuardedOrRoles([\"can_read_contribution\"], [\"icetakes-job-manager\"])),\n  AccessRule(\n    \"contribution_jobs\",\n    GuardedOrRoles([\"can_read_contribution_job\"], [\"icetakes-job-manager\"])\n  ),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::api",
        "name": "api",
        "package": "Icetakes/ContributionIntake",
        "signature": "Yichus/Service::ServiceDef",
        "signatureId": "Yichus/Service::ServiceDef",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 8166,
          "end": 8599,
          "label": "contribution_intake:218:19",
          "source": "service_def(\"icetakes\", [\n  route(\"/contributions\", handler(\"submit_contribution\", submit_contribution), [\n    ReadPerm(\"contribution_receipts\"),\n    CreatePerm(\"contribution_receipts\"),\n    CreatePerm(\"contributions\"),\n    CreatePerm(\"contribution_jobs\"),\n  ]),\n  route(\"/contributions/status\", handler(\"contribution_status\", contribution_status), [\n    ReadPerm(\"contribution_receipts\"),\n    ReadPerm(\"contribution_jobs\"),\n  ]),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::can_read_contribution",
        "name": "can_read_contribution",
        "package": "Icetakes/ContributionIntake",
        "signature": "(String, Contribution) -> Bool",
        "signatureId": "(Bosatsu/Predef::String, Icetakes/ContributionModel::Contribution) -> Bosatsu/Predef::Bool",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 4251,
          "end": 4342,
          "label": "contribution_intake:114:3",
          "source": "Contribution(_, _, _, author_id, _, _, _, _) = contribution\n  eq_String(user_id, author_id)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::can_read_contribution_job",
        "name": "can_read_contribution_job",
        "package": "Icetakes/ContributionIntake",
        "signature": "(String, ContributionJob) -> Bool",
        "signatureId": "(Bosatsu/Predef::String, Icetakes/ContributionModel::ContributionJob) -> Bosatsu/Predef::Bool",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 4427,
          "end": 4497,
          "label": "contribution_intake:118:3",
          "source": "ContributionJob(author_id, _) = queued\n  eq_String(user_id, author_id)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::charter_version",
        "name": "charter_version",
        "package": "Icetakes/ContributionIntake",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "location": {
          "file": "contribution_intake",
          "start": 1955,
          "end": 1956,
          "label": "contribution_intake:52:19",
          "source": "1"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::command_local_key",
        "name": "command_local_key",
        "package": "Icetakes/ContributionIntake",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": false,
        "location": {
          "file": "contribution_intake",
          "start": 3873,
          "end": 3958,
          "label": "contribution_intake:105:3",
          "source": "concat_String([frame(site_id), frame(\"submit-contribution\"), frame(idempotency_key)])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::contribution_status",
        "name": "contribution_status",
        "package": "Icetakes/ContributionIntake",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, SubmissionStatusInput) -> Yichus/IO::IO[SubmissionStatus]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/ContributionIntake::SubmissionStatusInput) -> Yichus/IO::IO[Icetakes/ContributionIntake::SubmissionStatus]",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 6921,
          "end": 7842,
          "label": "contribution_intake:187:3",
          "source": "Principal(user_id, _) = principal\n  SubmissionStatusInput(idempotency_key) = input\n  match validate_idempotency_key(idempotency_key):\n    case Some(error): pure(InvalidStatusKey(error))\n    case None:\n      receipt <- flat_map(db_read_opt(\n        receipt_rows(db),\n        owner_key(principal, command_local_key(idempotency_key))\n      ))\n      match receipt:\n        case None: pure(ContributionUnknown)\n        case Some(value):\n          SubmissionReceipt(_, _, queued_job_id, _) = value\n          queued <- flat_map(db_read_opt(job_rows(db), queued_job_id))\n          match queued:\n            case None: pure(ContributionStateUnavailable(value))\n            case Some(row):\n              ContributionJob(_, job) = row\n              if can_read_contribution_job(user_id, row):\n                pure(ContributionReceived(value, contribution_progress(job)))\n              else: pure(ContributionStateUnavailable(value))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::create_submission",
        "name": "create_submission",
        "package": "Icetakes/ContributionIntake",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, SubmitContributionInput, String) -> Yichus/Transaction::Txn[a, SubmissionError, SubmissionReceipt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ContributionIntake::SubmitContributionInput, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/ContributionModel::SubmissionError, Icetakes/ContributionIntake::SubmissionReceipt]",
        "exported": false,
        "location": {
          "file": "contribution_intake",
          "start": 4675,
          "end": 5814,
          "label": "contribution_intake:127:3",
          "source": "Principal(author_id, _) = principal\n  contribution_id <- tx_bind(tx_next_id(contributions_table(scope)))\n  now <- tx_bind(tx_database_time_millis(scope))\n  if cmp_Int(now, 0) matches LT:\n    tx_abort(InvalidDatabaseTime(now))\n  else:\n    queued_job_id = job_key(contribution_id)\n    match new_job(\n      queued_job_id,\n      fetch_stage,\n      contribution_ref(contribution_id),\n      charter_version,\n      [],\n      fetch_max_attempts,\n      now\n    ):\n      case JobRefused(reason): tx_abort(JobCreationRejected(reason))\n      case JobApplied(job):\n        SubmitContributionInput(_, url, argument, urgency) = input\n        contribution = Contribution(\n          contribution_id, site_id, charter_version, author_id,\n          url, argument, urgency, now\n        )\n        receipt = SubmissionReceipt(input, contribution_id, queued_job_id, now)\n        _ <- tx_bind(tx_insert(contributions_table(scope), contribution_id, contribution))\n        _ <- tx_bind(tx_insert(jobs_table(scope), queued_job_id, ContributionJob(author_id, job)))\n        _ <- tx_bind(tx_insert(receipts_table(scope), receipt_key, receipt))\n        tx_pure(receipt)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::fetch_max_attempts",
        "name": "fetch_max_attempts",
        "package": "Icetakes/ContributionIntake",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "location": {
          "file": "contribution_intake",
          "start": 1978,
          "end": 1979,
          "label": "contribution_intake:53:22",
          "source": "5"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::frontend",
        "name": "frontend",
        "package": "Icetakes/ContributionIntake",
        "signature": "Yichus/Frontend::FrontendSpec",
        "signatureId": "Yichus/Frontend::FrontendSpec",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 8612,
          "end": 8765,
          "label": "contribution_intake:231:12",
          "source": "FrontendSpec(\"Icetakes\", [\n  View(\"/contributions\", \"Contribute a reading\", Form),\n  View(\"/contributions/status\", \"Check contribution status\", Form),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::intake_reading",
        "name": "intake_reading",
        "package": "Icetakes/ContributionIntake",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 8853,
          "end": 9777,
          "label": "contribution_intake:240:18",
          "source": "ReadingOrder([\n  ReadingStep(\"validate_submission\", \"checks every client-controlled text field\"),\n  ReadingStep(\"same_submission\", \"defines exact idempotent replay without a hash assumption\"),\n  ReadingStep(\"command_local_key\", \"binds a client key to this site and operation\"),\n  ReadingStep(\"can_read_contribution\", \"states the contributor row guard\"),\n  ReadingStep(\"can_read_contribution_job\", \"states the queued-job contributor guard\"),\n  ReadingStep(\"contribution_status\", \"combines the caller-owned receipt with guarded, redacted progress\"),\n  ReadingStep(\"create_submission\", \"atomically creates the contribution, fetch job and receipt\"),\n  ReadingStep(\"submit_plan\", \"resolves exact replay before any new allocation\"),\n  ReadingStep(\"submit_contribution\", \"runs the complete intake decision at the database boundary\"),\n  ReadingStep(\"api\", \"publishes the authenticated intake routes and their exact permissions\"),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::intake_tables",
        "name": "intake_tables",
        "package": "Icetakes/ContributionIntake",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 8783,
          "end": 8834,
          "label": "contribution_intake:236:17",
          "source": "FamilySpec(\"intake tables\", [\n  \"receipts_table\"\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::receipt_rows",
        "name": "receipt_rows",
        "package": "Icetakes/ContributionIntake",
        "signature": "Yichus/Data::Db -> Yichus/Data::Table[SubmissionReceipt]",
        "signatureId": "Yichus/Data::Db -> Yichus/Data::Table[Icetakes/ContributionIntake::SubmissionReceipt]",
        "exported": false,
        "location": {
          "file": "contribution_intake",
          "start": 4133,
          "end": 4167,
          "label": "contribution_intake:111:3",
          "source": "table(db, \"contribution_receipts\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::receipts_table",
        "name": "receipts_table",
        "package": "Icetakes/ContributionIntake",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, SubmissionReceipt]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ContributionIntake::SubmissionReceipt]",
        "exported": false,
        "location": {
          "file": "contribution_intake",
          "start": 4035,
          "end": 4075,
          "label": "contribution_intake:108:3",
          "source": "tx_table(scope, \"contribution_receipts\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::same_submission",
        "name": "same_submission",
        "package": "Icetakes/ContributionIntake",
        "signature": "(SubmitContributionInput, SubmitContributionInput) -> Bool",
        "signatureId": "(Icetakes/ContributionIntake::SubmitContributionInput, Icetakes/ContributionIntake::SubmitContributionInput) -> Bosatsu/Predef::Bool",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 3362,
          "end": 3681,
          "label": "contribution_intake:96:3",
          "source": "SubmitContributionInput(left_key, left_url, left_argument, left_urgency) = left\n  SubmitContributionInput(right_key, right_url, right_argument, right_urgency) = right\n  if eq_String(left_key, right_key):\n    same_content((left_url, left_argument, left_urgency), (right_url, right_argument, right_urgency))\n  else: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::submit_contribution",
        "name": "submit_contribution",
        "package": "Icetakes/ContributionIntake",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, SubmitContributionInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[SubmissionError, SubmissionReceipt]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/ContributionIntake::SubmitContributionInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/ContributionModel::SubmissionError, Icetakes/ContributionIntake::SubmissionReceipt]]",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 6737,
          "end": 6800,
          "label": "contribution_intake:179:3",
          "source": "scope <- transaction(db)\n  submit_plan(scope, principal, input)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::submit_plan",
        "name": "submit_plan",
        "package": "Icetakes/ContributionIntake",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, SubmitContributionInput) -> Yichus/Transaction::Txn[a, SubmissionError, SubmissionReceipt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ContributionIntake::SubmitContributionInput) -> Yichus/Transaction::Txn[a, Icetakes/ContributionModel::SubmissionError, Icetakes/ContributionIntake::SubmissionReceipt]",
        "exported": false,
        "location": {
          "file": "contribution_intake",
          "start": 5963,
          "end": 6587,
          "label": "contribution_intake:161:3",
          "source": "match validate_submission(input):\n    case Some(error): tx_abort(error)\n    case None:\n      SubmitContributionInput(idempotency_key, _, _, _) = input\n      receipt_key = owner_key(principal, command_local_key(idempotency_key))\n      previous <- tx_bind(tx_read(receipts_table(scope), receipt_key))\n      match previous:\n        case Some(receipt):\n          SubmissionReceipt(previous_request, _, _, _) = receipt\n          if same_submission(previous_request, input): tx_pure(receipt)\n          else: tx_abort(IdempotencyKeyReused(idempotency_key))\n        case None: create_submission(scope, principal, input, receipt_key)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionIntake::validate_submission",
        "name": "validate_submission",
        "package": "Icetakes/ContributionIntake",
        "signature": "SubmitContributionInput -> Option[SubmissionError]",
        "signatureId": "Icetakes/ContributionIntake::SubmitContributionInput -> Bosatsu/Predef::Option[Icetakes/ContributionModel::SubmissionError]",
        "exported": true,
        "location": {
          "file": "contribution_intake",
          "start": 2599,
          "end": 3266,
          "label": "contribution_intake:78:3",
          "source": "SubmitContributionInput(idempotency_key, url, argument, _) = input\n  match validate_idempotency_key(idempotency_key):\n    case Some(error): Some(error)\n    case None:\n      if eq_String(url, \"\"):\n        Some(InvalidSubmission(\"url\", \"must not be empty\"))\n      else:\n        if over_limit(url, 2048):\n          Some(InvalidSubmission(\"url\", \"must be at most 2048 characters\"))\n        else:\n          if eq_String(argument, \"\"):\n            Some(InvalidSubmission(\"argument\", \"must not be empty\"))\n          else:\n            if over_limit(argument, 10000):\n              Some(InvalidSubmission(\"argument\", \"must be at most 10000 characters\"))\n            else: None"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::contribution_progress",
        "name": "contribution_progress",
        "package": "Icetakes/ContributionModel",
        "signature": "Yichus/Job::Job -> ContributionProgress",
        "signatureId": "Yichus/Job::Job -> Icetakes/ContributionModel::ContributionProgress",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 3913,
          "end": 4042,
          "label": "contribution_model:115:3",
          "source": "ContributionProgress(\n    job_stage(job),\n    job_attempt(job),\n    job_max_attempts(job),\n    progress_state(job_state(job))\n  )"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::contribution_reading",
        "name": "contribution_reading",
        "package": "Icetakes/ContributionModel",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 6118,
          "end": 7009,
          "label": "contribution_model:181:24",
          "source": "ReadingOrder([\n  ReadingStep(\"over_limit\", \"bounds text accepted from an untrusted client\"),\n  ReadingStep(\"validate_idempotency_key\", \"checks the shared command-key boundary\"),\n  ReadingStep(\"contribution_ref\", \"binds a job input to this site and contribution\"),\n  ReadingStep(\"job_key\", \"gives article retrieval one durable work identity\"),\n  ReadingStep(\"same_urgency\", \"compares the declared urgency vocabulary exactly\"),\n  ReadingStep(\"same_content\", \"compares editorial content without a command envelope\"),\n  ReadingStep(\"same_contribution\", \"compares every field of the frozen source\"),\n  ReadingStep(\"input_matches_job\", \"requires the fetch job to name this source and charter\"),\n  ReadingStep(\"progress_state\", \"projects internal job states into a contributor-safe vocabulary\"),\n  ReadingStep(\"contribution_progress\", \"omits worker, lease, error and output details from status\")\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::contribution_ref",
        "name": "contribution_ref",
        "package": "Icetakes/ContributionModel",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 3075,
          "end": 3130,
          "label": "contribution_model:91:3",
          "source": "concat_String([frame(site_id), frame(contribution_id)])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::contribution_tables",
        "name": "contribution_tables",
        "package": "Icetakes/ContributionModel",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 5998,
          "end": 6093,
          "label": "contribution_model:177:23",
          "source": "FamilySpec(\"contribution tables\", [\n  \"contributions_table\", \"jobs_table\", \"snapshots_table\"\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::contributions_table",
        "name": "contributions_table",
        "package": "Icetakes/ContributionModel",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Contribution]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ContributionModel::Contribution]",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 3318,
          "end": 3350,
          "label": "contribution_model:97:3",
          "source": "tx_table(scope, \"contributions\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::fetch_stage",
        "name": "fetch_stage",
        "package": "Icetakes/ContributionModel",
        "signature": "String",
        "signatureId": "Bosatsu/Predef::String",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 2365,
          "end": 2383,
          "label": "contribution_model:71:15",
          "source": "\"article-fetch-v1\""
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::input_matches_job",
        "name": "input_matches_job",
        "package": "Icetakes/ContributionModel",
        "signature": "(Contribution, ContributionJob) -> Bool",
        "signatureId": "(Icetakes/ContributionModel::Contribution, Icetakes/ContributionModel::ContributionJob) -> Bosatsu/Predef::Bool",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 4624,
          "end": 5121,
          "label": "contribution_model:140:3",
          "source": "Contribution(id, site, charter, author, _, _, _, _) = contribution\n  ContributionJob(job_author, job) = queued\n  if eq_String(site, site_id):\n    if eq_String(author, job_author):\n      if eq_String(job_id(job), job_key(id)):\n        if eq_String(job_stage(job), fetch_stage):\n          if eq_String(job_input_ref(job), contribution_ref(id)):\n            cmp_Int(job_input_revision(job), charter) matches EQ\n          else: False\n        else: False\n      else: False\n    else: False\n  else: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::job_key",
        "name": "job_key",
        "package": "Icetakes/ContributionModel",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 3182,
          "end": 3241,
          "label": "contribution_model:94:3",
          "source": "concat_String([frame(fetch_stage), frame(contribution_id)])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::job_rows",
        "name": "job_rows",
        "package": "Icetakes/ContributionModel",
        "signature": "Yichus/Data::Db -> Yichus/Data::Table[ContributionJob]",
        "signatureId": "Yichus/Data::Db -> Yichus/Data::Table[Icetakes/ContributionModel::ContributionJob]",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 3509,
          "end": 3539,
          "label": "contribution_model:103:3",
          "source": "table(db, \"contribution_jobs\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::jobs_table",
        "name": "jobs_table",
        "package": "Icetakes/ContributionModel",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, ContributionJob]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ContributionModel::ContributionJob]",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 3421,
          "end": 3457,
          "label": "contribution_model:100:3",
          "source": "tx_table(scope, \"contribution_jobs\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::over_limit",
        "name": "over_limit",
        "package": "Icetakes/ContributionModel",
        "signature": "(String, Int) -> Bool",
        "signatureId": "(Bosatsu/Predef::String, Bosatsu/Predef::Int) -> Bosatsu/Predef::Bool",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 2632,
          "end": 2679,
          "label": "contribution_model:80:3",
          "source": "cmp_Int(length_String(value), limit) matches GT"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::progress_state",
        "name": "progress_state",
        "package": "Icetakes/ContributionModel",
        "signature": "Yichus/Job::JobState -> ContributionProgressState",
        "signatureId": "Yichus/Job::JobState -> Icetakes/ContributionModel::ContributionProgressState",
        "exported": false,
        "location": {
          "file": "contribution_model",
          "start": 3609,
          "end": 3848,
          "label": "contribution_model:106:3",
          "source": "match state:\n    case Waiting(_): FetchQueued\n    case RetryWaiting(_, _): FetchRetryQueued\n    case Leased(_, _, _): Fetching\n    case Succeeded(_, _): FetchReady\n    case Failed(_, _): FetchFailed\n    case Cancelled(_, _): FetchCancelled"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::same_content",
        "name": "same_content",
        "package": "Icetakes/ContributionModel",
        "signature": "((String, String, Urgency), (String, String, Urgency)) -> Bool",
        "signatureId": "((Bosatsu/Predef::String, Bosatsu/Predef::String, Icetakes/ContributionModel::Urgency), (Bosatsu/Predef::String, Bosatsu/Predef::String, Icetakes/ContributionModel::Urgency)) -> Bosatsu/Predef::Bool",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 5218,
          "end": 5475,
          "label": "contribution_model:155:3",
          "source": "(left_url, left_argument, left_urgency) = left\n  (right_url, right_argument, right_urgency) = right\n  if eq_String(left_url, right_url):\n    if eq_String(left_argument, right_argument): same_urgency(left_urgency, right_urgency)\n    else: False\n  else: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::same_contribution",
        "name": "same_contribution",
        "package": "Icetakes/ContributionModel",
        "signature": "(Contribution, Contribution) -> Bool",
        "signatureId": "(Icetakes/ContributionModel::Contribution, Icetakes/ContributionModel::Contribution) -> Bosatsu/Predef::Bool",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 5551,
          "end": 5974,
          "label": "contribution_model:163:3",
          "source": "Contribution(li, ls, lc, la, lu, larg, lurg, lt) = left\n  Contribution(ri, rs, rc, ra, ru, rarg, rurg, rt) = right\n  if eq_String(li, ri):\n    if eq_String(ls, rs):\n      if cmp_Int(lc, rc) matches EQ:\n        if eq_String(la, ra):\n          if cmp_Int(lt, rt) matches EQ:\n            same_content((lu, larg, lurg), (ru, rarg, rurg))\n          else: False\n        else: False\n      else: False\n    else: False\n  else: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::same_urgency",
        "name": "same_urgency",
        "package": "Icetakes/ContributionModel",
        "signature": "(Urgency, Urgency) -> Bool",
        "signatureId": "(Icetakes/ContributionModel::Urgency, Icetakes/ContributionModel::Urgency) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "contribution_model",
          "start": 2444,
          "end": 2577,
          "label": "contribution_model:74:3",
          "source": "match left:\n    case Breaking: right matches Breaking\n    case Timely: right matches Timely\n    case Timeless: right matches Timeless"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::snapshots_table",
        "name": "snapshots_table",
        "package": "Icetakes/ContributionModel",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, ArticleSnapshot]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ContributionModel::ArticleSnapshot]",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 4500,
          "end": 4536,
          "label": "contribution_model:137:3",
          "source": "tx_table(scope, \"article_snapshots\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/ContributionModel::validate_idempotency_key",
        "name": "validate_idempotency_key",
        "package": "Icetakes/ContributionModel",
        "signature": "String -> Option[SubmissionError]",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::Option[Icetakes/ContributionModel::SubmissionError]",
        "exported": true,
        "location": {
          "file": "contribution_model",
          "start": 2765,
          "end": 3014,
          "label": "contribution_model:83:3",
          "source": "if eq_String(idempotency_key, \"\"):\n    Some(InvalidSubmission(\"idempotency_key\", \"must not be empty\"))\n  else:\n    if over_limit(idempotency_key, 128):\n      Some(InvalidSubmission(\"idempotency_key\", \"must be at most 128 characters\"))\n    else: None"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Identity::frame",
        "name": "frame",
        "package": "Icetakes/Identity",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "location": {
          "file": "identity",
          "start": 266,
          "end": 330,
          "label": "identity:10:3",
          "source": "concat_String([int_to_String(length_String(value)), \":\", value])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Identity::site_id",
        "name": "site_id",
        "package": "Icetakes/Identity",
        "signature": "String",
        "signatureId": "Bosatsu/Predef::String",
        "exported": true,
        "location": {
          "file": "identity",
          "start": 143,
          "end": 153,
          "label": "identity:6:11",
          "source": "\"icetakes\""
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::decode_devils_advocate_value",
        "name": "decode_devils_advocate_value",
        "package": "Icetakes/Judgment",
        "signature": "(Yichus/Json::Json, List[EvidenceRef]) -> Yichus/Json::DecodeResult[DevilsAdvocateJudgment]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::DevilsAdvocateJudgment]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 7646,
          "end": 8170,
          "label": "judgment:219:3",
          "source": "fields <- decode_bind(as_object(\"$\", value))\n  _ <- decode_bind(expected_fields([\"has_fatal_flaw\", \"attack_argument\", \"evidence_refs\"], fields))\n  fatal_field <- decode_bind(required_field(\"has_fatal_flaw\", value))\n  has_fatal_flaw <- decode_bind(as_bool(\"has_fatal_flaw\", fatal_field))\n  attack_argument <- decode_bind(required_nonempty_string(\"attack_argument\", value))\n  evidence_refs <- decode_bind(required_evidence_refs(value, allowed))\n  Decoded(DevilsAdvocateJudgment(has_fatal_flaw, attack_argument, evidence_refs))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::decode_evidence_ref",
        "name": "decode_evidence_ref",
        "package": "Icetakes/Judgment",
        "signature": "(Yichus/Json::Json, List[EvidenceRef], List[EvidenceRef]) -> Yichus/Json::DecodeResult[EvidenceRef]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef], Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::EvidenceRef]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 3279,
          "end": 3762,
          "label": "judgment:121:3",
          "source": "id <- decode_bind(as_string(\"evidence_refs\", value))\n  match eq_String(id, \"\"):\n    case True: DecodeError(\"evidence_refs\", \"empty evidence reference\")\n    case False:\n      match member_evidence(allowed, id):\n        case False: DecodeError(\"evidence_refs\", \"unknown evidence reference\")\n        case True:\n          match member_evidence(seen, id):\n            case True: DecodeError(\"evidence_refs\", \"duplicate evidence reference\")\n            case False: Decoded(EvidenceRef(id))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::decode_evidence_refs",
        "name": "decode_evidence_refs",
        "package": "Icetakes/Judgment",
        "signature": "(List[Yichus/Json::Json], List[EvidenceRef], List[EvidenceRef]) -> Yichus/Json::DecodeResult[List[EvidenceRef]]",
        "signatureId": "(Bosatsu/Predef::List[Yichus/Json::Json], Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef], Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 3908,
          "end": 4341,
          "label": "judgment:137:3",
          "source": "recur values:\n    case []: Decoded([])\n    case [value, *rest]:\n      match decode_evidence_ref(value, allowed, seen):\n        case DecodeError(path, reason): DecodeError(path, reason)\n        case Decoded(evidence):\n          match decode_evidence_refs(rest, allowed, [evidence, *seen]):\n            case DecodeError(path, reason): DecodeError(path, reason)\n            case Decoded(decoded_rest): Decoded([evidence, *decoded_rest])"
        },
        "repetition": [
          {
            "kind": "recursive-lambda",
            "location": {
              "file": "judgment",
              "start": 3908,
              "end": 4341,
              "label": "judgment:137:3",
              "source": "recur values:\n    case []: Decoded([])\n    case [value, *rest]:\n      match decode_evidence_ref(value, allowed, seen):\n        case DecodeError(path, reason): DecodeError(path, reason)\n        case Decoded(evidence):\n          match decode_evidence_refs(rest, allowed, [evidence, *seen]):\n            case DecodeError(path, reason): DecodeError(path, reason)\n            case Decoded(decoded_rest): Decoded([evidence, *decoded_rest])"
            }
          }
        ]
      },
      {
        "id": "Icetakes/Judgment::decode_judgment",
        "name": "decode_judgment",
        "package": "Icetakes/Judgment",
        "signature": "(JudgmentSchema, String, List[EvidenceRef]) -> Yichus/Json::DecodeResult[Judgment]",
        "signatureId": "(Icetakes/Judgment::JudgmentSchema, Bosatsu/Predef::String, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::Judgment]",
        "exported": true,
        "location": {
          "file": "judgment",
          "start": 9080,
          "end": 9625,
          "label": "judgment:249:3",
          "source": "match parse_json(source):\n    case InvalidJson(reason): DecodeError(\"$\", reason)\n    case Parsed(value):\n      match schema:\n        case DevilsAdvocateV1:\n          judgment <- decode_bind(decode_devils_advocate_value(value, allowed))\n          Decoded(DevilsAdvocate(judgment))\n        case TaxonomyV1:\n          judgment <- decode_bind(decode_taxonomy_value(value, allowed))\n          Decoded(Taxonomy(judgment))\n        case LawyerV1:\n          judgment <- decode_bind(decode_lawyer_value(value, allowed))\n          Decoded(Lawyer(judgment))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::decode_lawyer_value",
        "name": "decode_lawyer_value",
        "package": "Icetakes/Judgment",
        "signature": "(Yichus/Json::Json, List[EvidenceRef]) -> Yichus/Json::DecodeResult[LawyerJudgment]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::LawyerJudgment]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 6614,
          "end": 7521,
          "label": "judgment:197:3",
          "source": "fields <- decode_bind(as_object(\"$\", value))\n  _ <- decode_bind(expected_fields([\n    \"congruence_basis_points\", \"congruence_reasoning\",\n    \"event_time_epoch_millis\", \"urgency_assessment\",\n    \"urgency_reasoning\", \"brief_bullets\", \"evidence_refs\"\n  ], fields))\n  score <- decode_bind(required_basis_points(value))\n  congruence_reasoning <- decode_bind(required_nonempty_string(\"congruence_reasoning\", value))\n  event_time <- decode_bind(required_event_time(value))\n  urgency_assessment <- decode_bind(required_urgency_assessment(value))\n  urgency_reasoning <- decode_bind(required_nonempty_string(\"urgency_reasoning\", value))\n  brief_bullets <- decode_bind(required_brief_bullets(value))\n  evidence_refs <- decode_bind(required_evidence_refs(value, allowed))\n  Decoded(LawyerJudgment(\n    score, congruence_reasoning, event_time, urgency_assessment,\n    urgency_reasoning, brief_bullets, evidence_refs\n  ))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::decode_taxonomy_value",
        "name": "decode_taxonomy_value",
        "package": "Icetakes/Judgment",
        "signature": "(Yichus/Json::Json, List[EvidenceRef]) -> Yichus/Json::DecodeResult[TaxonomyJudgment]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::TaxonomyJudgment]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 8282,
          "end": 8669,
          "label": "judgment:231:3",
          "source": "fields <- decode_bind(as_object(\"$\", value))\n  _ <- decode_bind(expected_fields([\"topic\", \"stance\", \"evidence_refs\"], fields))\n  topic <- decode_bind(required_nonempty_string(\"topic\", value))\n  stance <- decode_bind(required_nonempty_string(\"stance\", value))\n  evidence_refs <- decode_bind(required_evidence_refs(value, allowed))\n  Decoded(TaxonomyJudgment(topic, stance, evidence_refs))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::expected_fields",
        "name": "expected_fields",
        "package": "Icetakes/Judgment",
        "signature": "(List[String], List[(String, Yichus/Json::Json)]) -> Yichus/Json::DecodeResult[()]",
        "signatureId": "(Bosatsu/Predef::List[Bosatsu/Predef::String], Bosatsu/Predef::List[(Bosatsu/Predef::String, Yichus/Json::Json)]) -> Yichus/Json::DecodeResult[()]",
        "exported": false,
        "location": null,
        "repetition": [
          {
            "kind": "compiled-loop",
            "location": null
          }
        ]
      },
      {
        "id": "Icetakes/Judgment::judgment_reading",
        "name": "judgment_reading",
        "package": "Icetakes/Judgment",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "location": {
          "file": "judgment",
          "start": 9942,
          "end": 11501,
          "label": "judgment:272:20",
          "source": "ReadingOrder([\n  ReadingStep(\"member_string\", \"checks whether a field name belongs to a complete schema\"),\n  ReadingStep(\"expected_fields\", \"rejects every field outside the role's complete schema\"),\n  ReadingStep(\"nonempty_string\", \"accepts a string value and rejects empty text\"),\n  ReadingStep(\"required_nonempty_string\", \"requires one string field exactly once and rejects empty text\"),\n  ReadingStep(\"member_evidence\", \"checks an evidence ID against a typed evidence set\"),\n  ReadingStep(\"decode_evidence_ref\", \"accepts one nonempty known evidence ID exactly once\"),\n  ReadingStep(\"decode_evidence_refs\", \"preserves the validated evidence order\"),\n  ReadingStep(\"required_evidence_refs\", \"requires a nonempty array of evidence IDs\"),\n  ReadingStep(\"required_basis_points\", \"accepts exact congruence basis points in the closed range\"),\n  ReadingStep(\"required_event_time\", \"distinguishes an unknown event time from an exact epoch-millisecond estimate\"),\n  ReadingStep(\"required_urgency_assessment\", \"accepts only the declared urgency-assessment vocabulary\"),\n  ReadingStep(\"required_brief_bullets\", \"requires exactly three nonempty brief points\"),\n  ReadingStep(\"decode_devils_advocate_value\", \"builds the typed judgment only after every field is valid\"),\n  ReadingStep(\"decode_taxonomy_value\", \"builds the typed taxonomy only after every field is valid\"),\n  ReadingStep(\"decode_lawyer_value\", \"builds the typed Lawyer judgment only after every field is valid\"),\n  ReadingStep(\"decode_judgment\", \"parses untrusted text under the job's versioned schema\")\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::member_evidence",
        "name": "member_evidence",
        "package": "Icetakes/Judgment",
        "signature": "(List[EvidenceRef], String) -> Bool",
        "signatureId": "(Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef], Bosatsu/Predef::String) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": null,
        "repetition": [
          {
            "kind": "compiled-loop",
            "location": null
          }
        ]
      },
      {
        "id": "Icetakes/Judgment::member_string",
        "name": "member_string",
        "package": "Icetakes/Judgment",
        "signature": "(List[String], String) -> Bool",
        "signatureId": "(Bosatsu/Predef::List[Bosatsu/Predef::String], Bosatsu/Predef::String) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": null,
        "repetition": [
          {
            "kind": "compiled-loop",
            "location": null
          }
        ]
      },
      {
        "id": "Icetakes/Judgment::nonempty_string",
        "name": "nonempty_string",
        "package": "Icetakes/Judgment",
        "signature": "(String, Yichus/Json::Json) -> Yichus/Json::DecodeResult[String]",
        "signatureId": "(Bosatsu/Predef::String, Yichus/Json::Json) -> Yichus/Json::DecodeResult[Bosatsu/Predef::String]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 2831,
          "end": 2982,
          "label": "judgment:107:3",
          "source": "text <- decode_bind(as_string(path, value))\n  match eq_String(text, \"\"):\n    case True: DecodeError(path, \"empty string\")\n    case False: Decoded(text)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::required_basis_points",
        "name": "required_basis_points",
        "package": "Icetakes/Judgment",
        "signature": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Int]",
        "signatureId": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Bosatsu/Predef::Int]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 4800,
          "end": 5118,
          "label": "judgment:158:3",
          "source": "field <- decode_bind(required_field(\"congruence_basis_points\", value))\n  score <- decode_bind(as_int(\"congruence_basis_points\", field))\n  match (cmp_Int(score, 0), cmp_Int(score, 10000)):\n    case (LT, _) | (_, GT):\n      DecodeError(\"congruence_basis_points\", \"must be between 0 and 10000\")\n    case _: Decoded(score)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::required_brief_bullets",
        "name": "required_brief_bullets",
        "package": "Icetakes/Judgment",
        "signature": "Yichus/Json::Json -> Yichus/Json::DecodeResult[List[String]]",
        "signatureId": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Bosatsu/Predef::List[Bosatsu/Predef::String]]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 5979,
          "end": 6506,
          "label": "judgment:183:3",
          "source": "field <- decode_bind(required_field(\"brief_bullets\", value))\n  bullets <- decode_bind(as_array(\"brief_bullets\", field))\n  match bullets:\n    case [first, second, third]:\n      first_text <- decode_bind(nonempty_string(\"brief_bullets[0]\", first))\n      second_text <- decode_bind(nonempty_string(\"brief_bullets[1]\", second))\n      third_text <- decode_bind(nonempty_string(\"brief_bullets[2]\", third))\n      Decoded([first_text, second_text, third_text])\n    case _: DecodeError(\"brief_bullets\", \"exactly three bullets required\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::required_event_time",
        "name": "required_event_time",
        "package": "Icetakes/Judgment",
        "signature": "Yichus/Json::Json -> Yichus/Json::DecodeResult[EventTimeEstimate]",
        "signatureId": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Icetakes/Judgment::EventTimeEstimate]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 5195,
          "end": 5461,
          "label": "judgment:166:3",
          "source": "field <- decode_bind(required_field(\"event_time_epoch_millis\", value))\n  match field:\n    case JsonNull: Decoded(UnknownEventTime)\n    case _:\n      epoch_millis <- decode_bind(as_int(\"event_time_epoch_millis\", field))\n      Decoded(EstimatedEventTime(epoch_millis))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::required_evidence_refs",
        "name": "required_evidence_refs",
        "package": "Icetakes/Judgment",
        "signature": "(Yichus/Json::Json, List[EvidenceRef]) -> Yichus/Json::DecodeResult[List[EvidenceRef]]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 4455,
          "end": 4735,
          "label": "judgment:151:3",
          "source": "field <- decode_bind(required_field(\"evidence_refs\", value))\n  values <- decode_bind(as_array(\"evidence_refs\", field))\n  match values:\n    case []: DecodeError(\"evidence_refs\", \"at least one evidence reference required\")\n    case [_, *_]: decode_evidence_refs(values, allowed, [])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::required_nonempty_string",
        "name": "required_nonempty_string",
        "package": "Icetakes/Judgment",
        "signature": "(String, Yichus/Json::Json) -> Yichus/Json::DecodeResult[String]",
        "signatureId": "(Bosatsu/Predef::String, Yichus/Json::Json) -> Yichus/Json::DecodeResult[Bosatsu/Predef::String]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 3067,
          "end": 3147,
          "label": "judgment:113:3",
          "source": "field <- decode_bind(required_field(name, value))\n  nonempty_string(name, field)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::required_urgency_assessment",
        "name": "required_urgency_assessment",
        "package": "Icetakes/Judgment",
        "signature": "Yichus/Json::Json -> Yichus/Json::DecodeResult[UrgencyAssessment]",
        "signatureId": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Icetakes/Judgment::UrgencyAssessment]",
        "exported": false,
        "location": {
          "file": "judgment",
          "start": 5546,
          "end": 5904,
          "label": "judgment:174:3",
          "source": "text <- decode_bind(required_nonempty_string(\"urgency_assessment\", value))\n  match text:\n    case \"supported\": Decoded(SupportedUrgency)\n    case \"overstated\": Decoded(OverstatedUrgency)\n    case \"understated\": Decoded(UnderstatedUrgency)\n    case \"unclear\": Decoded(UnclearUrgency)\n    case _: DecodeError(\"urgency_assessment\", \"unknown urgency assessment\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/Judgment::role_value_decoders",
        "name": "role_value_decoders",
        "package": "Icetakes/Judgment",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "location": {
          "file": "judgment",
          "start": 9798,
          "end": 9921,
          "label": "judgment:266:23",
          "source": "FamilySpec(\"role value decoders\", [\n  \"decode_devils_advocate_value\",\n  \"decode_taxonomy_value\",\n  \"decode_lawyer_value\"\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::accepted_attempt",
        "name": "accepted_attempt",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Job::Job, JudgmentTask, CompleteJudgmentInput, String, Judgment, Int) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Job::Job, Icetakes/JudgmentStore::JudgmentTask, Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String, Icetakes/Judgment::Judgment, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 5852,
          "end": 6856,
          "label": "judgment_completion:156:3",
          "source": "JudgmentTask(input_ref, input_revision, schema, _, _) = task\n  CompleteJudgmentInput(attempt_id, job_id, token, response) = input\n  ModelCompletion(request_id, model, provider, _, prompt_tokens, completion_tokens) = response\n  artifact = JudgmentArtifact(\n    job_id, input_ref, input_revision, schema, judgment, attempt_id,\n    request_id, model, provider, prompt_tokens, completion_tokens, now\n  )\n  updated <- tx_bind(apply_job_result(\n    complete_transition(current, token, worker_id, job_id, now)\n  ))\n  existing <- tx_bind(tx_read(judgment_artifacts_table(scope), job_id))\n  match existing:\n    case Some(_): tx_abort(AcceptedArtifactExists(job_id))\n    case None:\n      attempt = JudgmentAttempt(input, worker_id, now, AcceptedJudgment(artifact))\n      _ <- tx_bind(tx_write(judgment_artifacts_table(scope), job_id, artifact))\n      _ <- tx_bind(tx_write(judgment_attempts_table(scope), attempt_id, attempt))\n      _ <- tx_bind(tx_write(jobs_table(scope), job_id, updated))\n      tx_pure(attempt)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::apply_job_result",
        "name": "apply_job_result",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "forall a: *. Yichus/Job::JobResult -> Yichus/Transaction::Txn[a, CompletionError, Yichus/Job::Job]",
        "signatureId": "forall a: *. Yichus/Job::JobResult -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Yichus/Job::Job]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 5522,
          "end": 5633,
          "label": "judgment_completion:143:3",
          "source": "match result:\n    case JobApplied(job): tx_pure(job)\n    case JobRefused(reason): tx_abort(JobRejected(reason))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::complete_judgment",
        "name": "complete_judgment",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, CompleteJudgmentInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[CompletionError, JudgmentAttempt]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/JudgmentStore::CompleteJudgmentInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]]",
        "exported": true,
        "location": {
          "file": "judgment_completion",
          "start": 9638,
          "end": 9743,
          "label": "judgment_completion:247:3",
          "source": "Principal(worker_id, _) = principal\n  scope <- transaction(db)\n  completion_plan(scope, input, worker_id)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "name": "completion_attempt_plan",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], CompleteJudgmentInput, String) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 8646,
          "end": 9207,
          "label": "judgment_completion:221:3",
          "source": "CompleteJudgmentInput(attempt_id, _, _, _) = input\n  previous <- tx_bind(tx_read(judgment_attempts_table(scope), attempt_id))\n  match previous:\n    case Some(attempt):\n      JudgmentAttempt(previous_input, previous_worker, _, _) = attempt\n      match same_completion_input(previous_input, input):\n        case True:\n          if eq_String(previous_worker, worker_id): tx_pure(attempt)\n          else: tx_abort(AttemptKeyReused(attempt_id))\n        case False: tx_abort(AttemptKeyReused(attempt_id))\n    case None: new_completion_attempt(scope, input, worker_id)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::completion_plan",
        "name": "completion_plan",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], CompleteJudgmentInput, String) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 9353,
          "end": 9494,
          "label": "judgment_completion:238:3",
          "source": "match validate_completion_input(input):\n    case Some(error): tx_abort(error)\n    case None: completion_attempt_plan(scope, input, worker_id)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::completion_reading",
        "name": "completion_reading",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "location": {
          "file": "judgment_completion",
          "start": 9766,
          "end": 11264,
          "label": "judgment_completion:251:22",
          "source": "ReadingOrder([\n  ReadingStep(\"nonnegative\", \"checks bounded-count metadata before trusting a worker request\"),\n  ReadingStep(\"validate_model_completion\", \"requires provider identity and nonnegative usage metadata\"),\n  ReadingStep(\"validate_completion_input\", \"requires durable command and job identities\"),\n  ReadingStep(\"same_lease\", \"compares every authority-bearing lease field\"),\n  ReadingStep(\"same_model_completion\", \"compares every returned provider field including content\"),\n  ReadingStep(\"same_completion_input\", \"defines exact durable command replay\"),\n  ReadingStep(\"read_job\", \"requires the referenced durable job\"),\n  ReadingStep(\"read_task\", \"loads the frozen schema and evidence set\"),\n  ReadingStep(\"require_task_matches_job\", \"binds the frozen task reference and revision to the job\"),\n  ReadingStep(\"apply_job_result\", \"turns a refused checked transition into a transaction abort\"),\n  ReadingStep(\"accepted_attempt\", \"atomically writes one typed artifact, attempt and succeeded job\"),\n  ReadingStep(\"malformed_attempt\", \"atomically records rejection and advances bounded job failure\"),\n  ReadingStep(\"new_completion_attempt\", \"decodes under stored policy before selecting either write set\"),\n  ReadingStep(\"completion_attempt_plan\", \"recovers an exact replay or starts one fenced completion\"),\n  ReadingStep(\"completion_plan\", \"rejects malformed commands before reading durable state\"),\n  ReadingStep(\"complete_judgment\", \"derives worker identity from the verified principal\")\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::malformed_attempt",
        "name": "malformed_attempt",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Job::Job, JudgmentTask, CompleteJudgmentInput, String, String, String, Int) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Job::Job, Icetakes/JudgmentStore::JudgmentTask, Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String, Bosatsu/Predef::String, Bosatsu/Predef::String, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 7088,
          "end": 7567,
          "label": "judgment_completion:186:3",
          "source": "JudgmentTask(_, _, _, _, retry_delay) = task\n  CompleteJudgmentInput(attempt_id, job_id, token, _) = input\n  updated <- tx_bind(apply_job_result(\n    fail_transition(current, token, worker_id, \"malformed judgment\", now, retry_delay)\n  ))\n  attempt = JudgmentAttempt(input, worker_id, now, MalformedJudgment(path, reason))\n  _ <- tx_bind(tx_write(judgment_attempts_table(scope), attempt_id, attempt))\n  _ <- tx_bind(tx_write(jobs_table(scope), job_id, updated))\n  tx_pure(attempt)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "name": "new_completion_attempt",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], CompleteJudgmentInput, String) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 7720,
          "end": 8492,
          "label": "judgment_completion:201:3",
          "source": "CompleteJudgmentInput(_, job_id, _, response) = input\n  ModelCompletion(_, _, _, content, _, _) = response\n  current <- tx_bind(read_job(jobs_table(scope), job_id))\n  job_ref = job_input_ref(current)\n  job_revision = job_input_revision(current)\n  task <- tx_bind(read_task(judgment_tasks_table(scope), job_ref))\n  _ <- tx_bind(require_task_matches_job(task, job_ref, job_revision))\n  now <- tx_bind(tx_database_time_millis(scope))\n  JudgmentTask(_, _, schema, allowed_evidence, _) = task\n  match decode_judgment(schema, content, allowed_evidence):\n    case Decoded(judgment):\n      accepted_attempt(scope, current, task, input, worker_id, judgment, now)\n    case DecodeError(path, reason):\n      malformed_attempt(scope, current, task, input, worker_id, path, reason, now)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::nonnegative",
        "name": "nonnegative",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "Int -> Bool",
        "signatureId": "Bosatsu/Predef::Int -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 1607,
          "end": 1667,
          "label": "judgment_completion:54:3",
          "source": "match cmp_Int(value, 0):\n    case LT: False\n    case _: True"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::read_job",
        "name": "read_job",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "forall a: *. (Yichus/Transaction::TxTable[a, Yichus/Job::Job], String) -> Yichus/Transaction::Txn[a, CompletionError, Yichus/Job::Job]",
        "signatureId": "forall a: *. (Yichus/Transaction::TxTable[a, Yichus/Job::Job], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Yichus/Job::Job]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 4636,
          "end": 4767,
          "label": "judgment_completion:118:3",
          "source": "found <- tx_bind(tx_read(jobs, job_id))\n  match found:\n    case Some(job): tx_pure(job)\n    case None: tx_abort(MissingJob(job_id))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::read_task",
        "name": "read_task",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "forall a: *. (Yichus/Transaction::TxTable[a, JudgmentTask], String) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentTask]",
        "signatureId": "forall a: *. (Yichus/Transaction::TxTable[a, Icetakes/JudgmentStore::JudgmentTask], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentTask]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 4886,
          "end": 5035,
          "label": "judgment_completion:126:3",
          "source": "found <- tx_bind(tx_read(tasks, input_ref))\n  match found:\n    case Some(task): tx_pure(task)\n    case None: tx_abort(MissingJudgmentTask(input_ref))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::require_task_matches_job",
        "name": "require_task_matches_job",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "forall a: *. (JudgmentTask, String, Int) -> Yichus/Transaction::Txn[a, CompletionError, ()]",
        "signatureId": "forall a: *. (Icetakes/JudgmentStore::JudgmentTask, Bosatsu/Predef::String, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, ()]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 5169,
          "end": 5442,
          "label": "judgment_completion:136:3",
          "source": "JudgmentTask(task_ref, task_revision, _, _, _) = task\n  if eq_String(task_ref, job_ref):\n    if eq_Int(task_revision, job_revision): tx_pure(())\n    else: tx_abort(InputRevisionChanged(job_revision, task_revision))\n  else: tx_abort(InputReferenceChanged(job_ref, task_ref))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::same_completion_input",
        "name": "same_completion_input",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "(CompleteJudgmentInput, CompleteJudgmentInput) -> Bool",
        "signatureId": "(Icetakes/JudgmentStore::CompleteJudgmentInput, Icetakes/JudgmentStore::CompleteJudgmentInput) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 4117,
          "end": 4544,
          "label": "judgment_completion:107:3",
          "source": "CompleteJudgmentInput(left_attempt, left_job, left_token, left_response) = left\n  CompleteJudgmentInput(right_attempt, right_job, right_token, right_response) = right\n  if eq_String(left_attempt, right_attempt):\n    if eq_String(left_job, right_job):\n      match same_lease(left_token, right_token):\n        case True: same_model_completion(left_response, right_response)\n        case False: False\n    else: False\n  else: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::same_lease",
        "name": "same_lease",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "(Yichus/Job::LeaseToken, Yichus/Job::LeaseToken) -> Bool",
        "signatureId": "(Yichus/Job::LeaseToken, Yichus/Job::LeaseToken) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 2894,
          "end": 3339,
          "label": "judgment_completion:81:3",
          "source": "LeaseToken(left_job, left_revision, left_worker, left_fence, left_expiry) = left\n  LeaseToken(right_job, right_revision, right_worker, right_fence, right_expiry) = right\n  if eq_String(left_job, right_job):\n    if eq_Int(left_revision, right_revision):\n      if eq_String(left_worker, right_worker):\n        if eq_Int(left_fence, right_fence): eq_Int(left_expiry, right_expiry)\n        else: False\n      else: False\n    else: False\n  else: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::same_model_completion",
        "name": "same_model_completion",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "(ModelCompletion, ModelCompletion) -> Bool",
        "signatureId": "(Icetakes/JudgmentStore::ModelCompletion, Icetakes/JudgmentStore::ModelCompletion) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 3425,
          "end": 4019,
          "label": "judgment_completion:93:3",
          "source": "ModelCompletion(left_request, left_model, left_provider, left_content, left_prompt, left_completion) = left\n  ModelCompletion(right_request, right_model, right_provider, right_content, right_prompt, right_completion) = right\n  if eq_String(left_request, right_request):\n    if eq_String(left_model, right_model):\n      if eq_String(left_provider, right_provider):\n        if eq_String(left_content, right_content):\n          if eq_Int(left_prompt, right_prompt): eq_Int(left_completion, right_completion)\n          else: False\n        else: False\n      else: False\n    else: False\n  else: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::validate_completion_input",
        "name": "validate_completion_input",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "CompleteJudgmentInput -> Option[CompletionError]",
        "signatureId": "Icetakes/JudgmentStore::CompleteJudgmentInput -> Bosatsu/Predef::Option[Icetakes/JudgmentCompletion::CompletionError]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 2543,
          "end": 2829,
          "label": "judgment_completion:74:3",
          "source": "CompleteJudgmentInput(attempt_id, job_id, _, response) = input\n  if eq_String(attempt_id, \"\"): Some(InvalidCompletion(\"attempt_id must not be empty\"))\n  else:\n    if eq_String(job_id, \"\"): Some(InvalidCompletion(\"job_id must not be empty\"))\n    else: validate_model_completion(response)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentCompletion::validate_model_completion",
        "name": "validate_model_completion",
        "package": "Icetakes/JudgmentCompletion",
        "signature": "ModelCompletion -> Option[CompletionError]",
        "signatureId": "Icetakes/JudgmentStore::ModelCompletion -> Bosatsu/Predef::Option[Icetakes/JudgmentCompletion::CompletionError]",
        "exported": false,
        "location": {
          "file": "judgment_completion",
          "start": 1756,
          "end": 2451,
          "label": "judgment_completion:59:3",
          "source": "ModelCompletion(request_id, model, provider, _, prompt_tokens, completion_tokens) = response\n  if eq_String(request_id, \"\"): Some(InvalidCompletion(\"request_id must not be empty\"))\n  else:\n    if eq_String(model, \"\"): Some(InvalidCompletion(\"model must not be empty\"))\n    else:\n      if eq_String(provider, \"\"): Some(InvalidCompletion(\"provider must not be empty\"))\n      else:\n        match nonnegative(prompt_tokens):\n          case False: Some(InvalidCompletion(\"prompt_tokens must be nonnegative\"))\n          case True:\n            match nonnegative(completion_tokens):\n              case False: Some(InvalidCompletion(\"completion_tokens must be nonnegative\"))\n              case True: None"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentStore::jobs_table",
        "name": "jobs_table",
        "package": "Icetakes/JudgmentStore",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Yichus/Job::Job]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Yichus/Job::Job]",
        "exported": true,
        "location": {
          "file": "judgment_store",
          "start": 2397,
          "end": 2420,
          "label": "judgment_store:79:3",
          "source": "tx_table(scope, \"jobs\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentStore::judgment_artifacts_table",
        "name": "judgment_artifacts_table",
        "package": "Icetakes/JudgmentStore",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, JudgmentArtifact]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/JudgmentStore::JudgmentArtifact]",
        "exported": true,
        "location": {
          "file": "judgment_store",
          "start": 2737,
          "end": 2774,
          "label": "judgment_store:88:3",
          "source": "tx_table(scope, \"judgment_artifacts\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentStore::judgment_attempts_table",
        "name": "judgment_attempts_table",
        "package": "Icetakes/JudgmentStore",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, JudgmentAttempt]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": true,
        "location": {
          "file": "judgment_store",
          "start": 2615,
          "end": 2651,
          "label": "judgment_store:85:3",
          "source": "tx_table(scope, \"judgment_attempts\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentStore::judgment_tables",
        "name": "judgment_tables",
        "package": "Icetakes/JudgmentStore",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "location": {
          "file": "judgment_store",
          "start": 2794,
          "end": 2928,
          "label": "judgment_store:90:19",
          "source": "FamilySpec(\"judgment tables\", [\n  \"jobs_table\",\n  \"judgment_tasks_table\",\n  \"judgment_attempts_table\",\n  \"judgment_artifacts_table\"\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/JudgmentStore::judgment_tasks_table",
        "name": "judgment_tasks_table",
        "package": "Icetakes/JudgmentStore",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, JudgmentTask]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/JudgmentStore::JudgmentTask]",
        "exported": true,
        "location": {
          "file": "judgment_store",
          "start": 2498,
          "end": 2531,
          "label": "judgment_store:82:3",
          "source": "tx_table(scope, \"judgment_tasks\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::access_rules",
        "name": "access_rules",
        "package": "Icetakes/LawyerPolicy",
        "signature": "Yichus/Access::AccessSpec",
        "signatureId": "Yichus/Access::AccessSpec",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 9360,
          "end": 9634,
          "label": "lawyer_policy:220:16",
          "source": "AccessSpec([\n  AccessRule(\"lawyer_policies\", GuardedOrRoles([], [\"icetakes-policy-reader\"])),\n  AccessRule(\"lawyer_active_policy\", GuardedOrRoles([], [\"icetakes-policy-reader\"])),\n  AccessRule(\"lawyer_policy_activations\", GuardedOrRoles([], [\"icetakes-policy-manager\"])),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::activate_plan",
        "name": "activate_plan",
        "package": "Icetakes/LawyerPolicy",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], ActivatePolicyInput) -> Yichus/Transaction::Txn[a, PolicyError, ActivePolicy]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPolicy::ActivatePolicyInput) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::ActivePolicy]",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 7757,
          "end": 8256,
          "label": "lawyer_policy:184:3",
          "source": "ActivatePolicyInput(key, expected, revision) = input\n  if all_true([bounded_text(key, 100), bounded_text(revision, 100), in_range(expected, 0, 9007199254740990)]):\n    prior <- tx_bind(tx_read(activation_receipts_table(scope), policy_ref(key)))\n    match prior:\n      case Some(ActivationReceipt(request, selected)):\n        if same_activation(request, input): tx_pure(selected)\n        else: tx_abort(CommandConflict)\n      case None: select_policy(scope, input)\n  else: tx_abort(InvalidActivation)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::activate_policy",
        "name": "activate_policy",
        "package": "Icetakes/LawyerPolicy",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, ActivatePolicyInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PolicyError, ActivePolicy]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/LawyerPolicy::ActivatePolicyInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::ActivePolicy]]",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 8381,
          "end": 8451,
          "label": "lawyer_policy:195:3",
          "source": "_ = principal\n  scope <- transaction(db)\n  activate_plan(scope, input)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::activation_receipts_table",
        "name": "activation_receipts_table",
        "package": "Icetakes/LawyerPolicy",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, ActivationReceipt]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/LawyerPolicy::ActivationReceipt]",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 2783,
          "end": 2827,
          "label": "lawyer_policy:72:3",
          "source": "tx_table(scope, \"lawyer_policy_activations\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::active_generation",
        "name": "active_generation",
        "package": "Icetakes/LawyerPolicy",
        "signature": "Option[ActivePolicy] -> Int",
        "signatureId": "Bosatsu/Predef::Option[Icetakes/LawyerPolicy::ActivePolicy] -> Bosatsu/Predef::Int",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 6646,
          "end": 6732,
          "label": "lawyer_policy:163:3",
          "source": "match current:\n    case None: 0\n    case Some(ActivePolicy(_, generation)): generation"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::active_policy_table",
        "name": "active_policy_table",
        "package": "Icetakes/LawyerPolicy",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, ActivePolicy]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/LawyerPolicy::ActivePolicy]",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 2656,
          "end": 2695,
          "label": "lawyer_policy:69:3",
          "source": "tx_table(scope, \"lawyer_active_policy\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::all_true",
        "name": "all_true",
        "package": "Icetakes/LawyerPolicy",
        "signature": "List[Bool] -> Bool",
        "signatureId": "Bosatsu/Predef::List[Bosatsu/Predef::Bool] -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": null,
        "repetition": [
          {
            "kind": "compiled-loop",
            "location": null
          }
        ]
      },
      {
        "id": "Icetakes/LawyerPolicy::api",
        "name": "api",
        "package": "Icetakes/LawyerPolicy",
        "signature": "Yichus/Service::ServiceDef",
        "signatureId": "Yichus/Service::ServiceDef",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 9654,
          "end": 10588,
          "label": "lawyer_policy:226:19",
          "source": "service_def(\"icetakes-lawyer-policy\", [\n  role_route(\"/internal/lawyer/policies/publish\", handler(\"publish_policy\", publish_policy), [\"icetakes-policy-reader\", \"icetakes-policy-manager\"], [\n    ReadPerm(\"lawyer_policies\"), CreatePerm(\"lawyer_policies\"),\n  ]),\n  role_route(\"/internal/lawyer/policies/activate\", handler(\"activate_policy\", activate_policy), [\"icetakes-policy-reader\", \"icetakes-policy-manager\"], [\n    ReadPerm(\"lawyer_policies\"), ReadPerm(\"lawyer_active_policy\"), WritePerm(\"lawyer_active_policy\"),\n    ReadPerm(\"lawyer_policy_activations\"), CreatePerm(\"lawyer_policy_activations\"),\n  ]),\n  role_route(\"/internal/lawyer/policies/active\", handler(\"read_active_policy\", read_active_policy), [\"icetakes-policy-reader\"], [\n    ReadPerm(\"lawyer_active_policy\"),\n  ]),\n  role_route(\"/internal/lawyer/policies/read\", handler(\"read_policy\", read_policy), [\"icetakes-policy-reader\"], [\n    ReadPerm(\"lawyer_policies\"),\n  ]),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::bounded_text",
        "name": "bounded_text",
        "package": "Icetakes/LawyerPolicy",
        "signature": "(String, Int) -> Bool",
        "signatureId": "(Bosatsu/Predef::String, Bosatsu/Predef::Int) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 2886,
          "end": 3013,
          "label": "lawyer_policy:75:3",
          "source": "match cmp_Int(length_String(value), 0):\n    case GT: cmp_Int(length_String(value), maximum) matches (LT | EQ)\n    case _: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::in_range",
        "name": "in_range",
        "package": "Icetakes/LawyerPolicy",
        "signature": "(Int, Int, Int) -> Bool",
        "signatureId": "(Bosatsu/Predef::Int, Bosatsu/Predef::Int, Bosatsu/Predef::Int) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 3072,
          "end": 3168,
          "label": "lawyer_policy:80:3",
          "source": "match cmp_Int(value, low):\n    case LT: False\n    case _: cmp_Int(value, high) matches (LT | EQ)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::lookup_plan",
        "name": "lookup_plan",
        "package": "Icetakes/LawyerPolicy",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], PolicyLookup) -> Yichus/Transaction::Txn[a, PolicyError, Option[ResolvedPolicy]]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPolicy::PolicyLookup) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPolicy::PolicyError, Bosatsu/Predef::Option[Icetakes/LawyerPolicy::ResolvedPolicy]]",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 8755,
          "end": 9151,
          "label": "lawyer_policy:205:3",
          "source": "PolicyLookup(revision) = input\n  stored <- tx_bind(tx_read(policies_table(scope), policy_ref(revision)))\n  match stored:\n    case None: tx_pure(None)\n    case Some(value):\n      PolicyRevision(site, id, policy) = value\n      if all_true([eq_String(site, site_id), eq_String(id, revision)]):\n        tx_pure(Some(ResolvedPolicy(value, provider_policy(policy))))\n      else: tx_abort(MissingPolicy)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::policies_table",
        "name": "policies_table",
        "package": "Icetakes/LawyerPolicy",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, PolicyRevision]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/LawyerPolicy::PolicyRevision]",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 2545,
          "end": 2579,
          "label": "lawyer_policy:66:3",
          "source": "tx_table(scope, \"lawyer_policies\")"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::policy_reading",
        "name": "policy_reading",
        "package": "Icetakes/LawyerPolicy",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 10607,
          "end": 11241,
          "label": "lawyer_policy:242:18",
          "source": "ReadingOrder([\n  ReadingStep(\"valid_policy\", \"bounds configured inputs without selecting a model or editorial threshold\"),\n  ReadingStep(\"same_policy\", \"compares every policy field before accepting a revision replay\"),\n  ReadingStep(\"publish_plan\", \"creates an immutable site revision or checks its existing value\"),\n  ReadingStep(\"select_policy\", \"checks the expected generation and commits pointer plus receipt together\"),\n  ReadingStep(\"activate_plan\", \"recovers the original selection after retries without undoing later selections\"),\n  ReadingStep(\"api\", \"separates configuration authority from worker and contributor roles\"),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::policy_ref",
        "name": "policy_ref",
        "package": "Icetakes/LawyerPolicy",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 2423,
          "end": 2471,
          "label": "lawyer_policy:63:3",
          "source": "concat_String([frame(site_id), frame(revision)])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::provider_policy",
        "name": "provider_policy",
        "package": "Icetakes/LawyerPolicy",
        "signature": "LawyerPolicy -> Yichus/OpenRouter::ProviderPolicy",
        "signatureId": "Icetakes/LawyerPolicy::LawyerPolicy -> Yichus/OpenRouter::ProviderPolicy",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 5308,
          "end": 5415,
          "label": "lawyer_policy:133:3",
          "source": "LawyerPolicy(_, _, _, providers, _, _, _, _) = policy\n  ProviderPolicy(providers, False, True, False, True)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::publish_plan",
        "name": "publish_plan",
        "package": "Icetakes/LawyerPolicy",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], PublishPolicyInput) -> Yichus/Transaction::Txn[a, PolicyError, PolicyRevision]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPolicy::PublishPolicyInput) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::PolicyRevision]",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 5523,
          "end": 6140,
          "label": "lawyer_policy:137:3",
          "source": "if valid_policy(input):\n    PublishPolicyInput(revision, policy) = input\n    key = policy_ref(revision)\n    existing <- tx_bind(tx_read(policies_table(scope), key))\n    match existing:\n      case Some(stored):\n        PolicyRevision(site, id, prior) = stored\n        if all_true([eq_String(site, site_id), eq_String(id, revision), same_policy(prior, policy)]): tx_pure(stored)\n        else: tx_abort(RevisionConflict)\n      case None:\n        stored = PolicyRevision(site_id, revision, policy)\n        _ <- tx_bind(tx_insert(policies_table(scope), key, stored))\n        tx_pure(stored)\n  else: tx_abort(InvalidPolicy)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::publish_policy",
        "name": "publish_policy",
        "package": "Icetakes/LawyerPolicy",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, PublishPolicyInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PolicyError, PolicyRevision]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/LawyerPolicy::PublishPolicyInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::PolicyRevision]]",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 6265,
          "end": 6334,
          "label": "lawyer_policy:153:3",
          "source": "_ = principal\n  scope <- transaction(db)\n  publish_plan(scope, input)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::read_active_policy",
        "name": "read_active_policy",
        "package": "Icetakes/LawyerPolicy",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PolicyError, Option[ActivePolicy]]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPolicy::PolicyError, Bosatsu/Predef::Option[Icetakes/LawyerPolicy::ActivePolicy]]]",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 8559,
          "end": 8646,
          "label": "lawyer_policy:200:3",
          "source": "_ = principal\n  scope <- transaction(db)\n  tx_read(active_policy_table(scope), site_id)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::read_policy",
        "name": "read_policy",
        "package": "Icetakes/LawyerPolicy",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, PolicyLookup) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PolicyError, Option[ResolvedPolicy]]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/LawyerPolicy::PolicyLookup) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPolicy::PolicyError, Bosatsu/Predef::Option[Icetakes/LawyerPolicy::ResolvedPolicy]]]",
        "exported": true,
        "location": {
          "file": "lawyer_policy",
          "start": 9275,
          "end": 9343,
          "label": "lawyer_policy:216:3",
          "source": "_ = principal\n  scope <- transaction(db)\n  lookup_plan(scope, input)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::same_activation",
        "name": "same_activation",
        "package": "Icetakes/LawyerPolicy",
        "signature": "(ActivatePolicyInput, ActivatePolicyInput) -> Bool",
        "signatureId": "(Icetakes/LawyerPolicy::ActivatePolicyInput, Icetakes/LawyerPolicy::ActivatePolicyInput) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 6422,
          "end": 6581,
          "label": "lawyer_policy:158:3",
          "source": "ActivatePolicyInput(lk, lg, lr) = left\n  ActivatePolicyInput(rk, rg, rr) = right\n  all_true([eq_String(lk, rk), cmp_Int(lg, rg) matches EQ, eq_String(lr, rr)])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::same_policy",
        "name": "same_policy",
        "package": "Icetakes/LawyerPolicy",
        "signature": "(LawyerPolicy, LawyerPolicy) -> Bool",
        "signatureId": "(Icetakes/LawyerPolicy::LawyerPolicy, Icetakes/LawyerPolicy::LawyerPolicy) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 3900,
          "end": 4334,
          "label": "lawyer_policy:109:3",
          "source": "LawyerPolicy(VersionedPrompt(lv, lp), lr, lm, lps, lt, ltemp, ltimeout, lc) = left\n  LawyerPolicy(VersionedPrompt(rv, rp), rr, rm, rps, rt, rtemp, rtimeout, rc) = right\n  all_true([\n    eq_String(lv, rv), eq_String(lp, rp), eq_String(lr, rr), eq_String(lm, rm),\n    same_providers(lps, rps), cmp_Int(lt, rt) matches EQ,\n    cmp_Int(ltemp, rtemp) matches EQ, cmp_Int(ltimeout, rtimeout) matches EQ,\n    cmp_Int(lc, rc) matches EQ,\n  ])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::same_providers",
        "name": "same_providers",
        "package": "Icetakes/LawyerPolicy",
        "signature": "(List[String], List[String]) -> Bool",
        "signatureId": "(Bosatsu/Predef::List[Bosatsu/Predef::String], Bosatsu/Predef::List[Bosatsu/Predef::String]) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": null,
        "repetition": [
          {
            "kind": "compiled-loop",
            "location": null
          }
        ]
      },
      {
        "id": "Icetakes/LawyerPolicy::select_policy",
        "name": "select_policy",
        "package": "Icetakes/LawyerPolicy",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], ActivatePolicyInput) -> Yichus/Transaction::Txn[a, PolicyError, ActivePolicy]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPolicy::ActivatePolicyInput) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::ActivePolicy]",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 6840,
          "end": 7649,
          "label": "lawyer_policy:168:3",
          "source": "ActivatePolicyInput(key, expected, revision) = input\n  policy <- tx_bind(tx_read(policies_table(scope), policy_ref(revision)))\n  match policy:\n    case None: tx_abort(MissingPolicy)\n    case Some(PolicyRevision(site, id, _)):\n      if all_true([eq_String(site, site_id), eq_String(id, revision)]):\n        current <- tx_bind(tx_read(active_policy_table(scope), site_id))\n        if cmp_Int(active_generation(current), expected) matches EQ:\n          selected = ActivePolicy(revision, add(expected, 1))\n          _ <- tx_bind(tx_write(active_policy_table(scope), site_id, selected))\n          _ <- tx_bind(tx_insert(activation_receipts_table(scope), policy_ref(key), ActivationReceipt(input, selected)))\n          tx_pure(selected)\n        else: tx_abort(GenerationConflict)\n      else: tx_abort(MissingPolicy)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::valid_policy",
        "name": "valid_policy",
        "package": "Icetakes/LawyerPolicy",
        "signature": "PublishPolicyInput -> Bool",
        "signatureId": "Icetakes/LawyerPolicy::PublishPolicyInput -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "lawyer_policy",
          "start": 4391,
          "end": 5012,
          "label": "lawyer_policy:119:3",
          "source": "PublishPolicyInput(revision, LawyerPolicy(VersionedPrompt(version, prompt), rubric, model, providers, tokens, temperature, timeout, article_chars)) = input\n  # Operational ceilings bound stored configuration and future request sizes;\n  # they are not editorial scores or admission thresholds.\n  all_true([\n    bounded_text(revision, 100), bounded_text(version, 100), bounded_text(prompt, 50000),\n    bounded_text(rubric, 100), bounded_text(model, 200), valid_providers(providers),\n    in_range(tokens, 1, 100000), in_range(temperature, 0, 2000),\n    in_range(timeout, 1, 300000), in_range(article_chars, 1, 1000000),\n  ])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPolicy::valid_providers",
        "name": "valid_providers",
        "package": "Icetakes/LawyerPolicy",
        "signature": "List[String] -> Bool",
        "signatureId": "Bosatsu/Predef::List[Bosatsu/Predef::String] -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": null,
        "repetition": [
          {
            "kind": "compiled-loop",
            "location": null
          }
        ]
      },
      {
        "id": "Icetakes/LawyerPreparation::access_rules",
        "name": "access_rules",
        "package": "Icetakes/LawyerPreparation",
        "signature": "Yichus/Access::AccessSpec",
        "signatureId": "Yichus/Access::AccessSpec",
        "exported": true,
        "location": {
          "file": "lawyer_preparation",
          "start": 6185,
          "end": 6509,
          "label": "lawyer_preparation:155:16",
          "source": "AccessSpec([\n  AccessRule(\"jobs\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n  AccessRule(\"judgment_tasks\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n  AccessRule(\"judgment_attempts\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n  AccessRule(\"judgment_artifacts\", GuardedOrRoles([], [\"icetakes-job-manager\"])),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::api",
        "name": "api",
        "package": "Icetakes/LawyerPreparation",
        "signature": "Yichus/Service::ServiceDef",
        "signatureId": "Yichus/Service::ServiceDef",
        "exported": true,
        "location": {
          "file": "lawyer_preparation",
          "start": 6529,
          "end": 7234,
          "label": "lawyer_preparation:162:19",
          "source": "service_def(\"icetakes-lawyer-preparation\", [\n  role_route(\"/internal/contributions/prepare-lawyer\", handler(\"prepare_lawyer\", prepare_lawyer), [\"icetakes-job-manager\"], [\n    ReadPerm(\"contributions\"), ReadPerm(\"article_snapshots\"), ReadPerm(\"contribution_jobs\"),\n    ReadPerm(\"jobs\"), CreatePerm(\"jobs\"), ReadPerm(\"judgment_tasks\"), CreatePerm(\"judgment_tasks\"),\n  ]),\n  role_route(\"/internal/judgments/complete\", handler(\"complete_judgment\", complete_judgment), [\"icetakes-job-manager\"], [\n    ReadPerm(\"jobs\"), WritePerm(\"jobs\"), ReadPerm(\"judgment_tasks\"),\n    ReadPerm(\"judgment_attempts\"), WritePerm(\"judgment_attempts\"),\n    ReadPerm(\"judgment_artifacts\"), WritePerm(\"judgment_artifacts\"),\n  ]),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::create_preparation",
        "name": "create_preparation",
        "package": "Icetakes/LawyerPreparation",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], String, String) -> Yichus/Transaction::Txn[a, PreparationError, LawyerPrepared]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Bosatsu/Predef::String, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPreparation::PreparationError, Icetakes/LawyerPreparation::LawyerPrepared]",
        "exported": false,
        "location": {
          "file": "lawyer_preparation",
          "start": 4644,
          "end": 5154,
          "label": "lawyer_preparation:125:3",
          "source": "now <- tx_bind(tx_database_time_millis(scope))\n  match new_job(key, lawyer_stage, key, input_revision, [], lawyer_attempts, now):\n    case JobRefused(error): tx_abort(JobCreationRejected(error))\n    case JobApplied(job):\n      task = JudgmentTask(key, input_revision, LawyerV1, [EvidenceRef(snapshot_ref)], lawyer_retry_millis)\n      _ <- tx_bind(tx_insert(judgment_tasks_table(scope), key, task))\n      _ <- tx_bind(tx_insert(jobs_table(scope), key, job))\n      tx_pure(LawyerPrepared(key, key, snapshot_ref))"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::input_revision",
        "name": "input_revision",
        "package": "Icetakes/LawyerPreparation",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "location": {
          "file": "lawyer_preparation",
          "start": 1962,
          "end": 1963,
          "label": "lawyer_preparation:63:18",
          "source": "1"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::lawyer_attempts",
        "name": "lawyer_attempts",
        "package": "Icetakes/LawyerPreparation",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "location": {
          "file": "lawyer_preparation",
          "start": 1915,
          "end": 1916,
          "label": "lawyer_preparation:61:19",
          "source": "5"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::lawyer_ref",
        "name": "lawyer_ref",
        "package": "Icetakes/LawyerPreparation",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "location": {
          "file": "lawyer_preparation",
          "start": 2157,
          "end": 2222,
          "label": "lawyer_preparation:68:3",
          "source": "concat_String([frame(lawyer_stage), frame(contribution_ref(id))])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::lawyer_retry_millis",
        "name": "lawyer_retry_millis",
        "package": "Icetakes/LawyerPreparation",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "location": {
          "file": "lawyer_preparation",
          "start": 1939,
          "end": 1944,
          "label": "lawyer_preparation:62:23",
          "source": "30000"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::lawyer_stage",
        "name": "lawyer_stage",
        "package": "Icetakes/LawyerPreparation",
        "signature": "String",
        "signatureId": "Bosatsu/Predef::String",
        "exported": true,
        "location": {
          "file": "lawyer_preparation",
          "start": 1885,
          "end": 1896,
          "label": "lawyer_preparation:60:16",
          "source": "\"lawyer-v1\""
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::preparation_reading",
        "name": "preparation_reading",
        "package": "Icetakes/LawyerPreparation",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "location": {
          "file": "lawyer_preparation",
          "start": 7258,
          "end": 7965,
          "label": "lawyer_preparation:174:23",
          "source": "ReadingOrder([\n  ReadingStep(\"lawyer_ref\", \"names one stage input per immutable contribution\"),\n  ReadingStep(\"require_source\", \"requires the matching fetch job to have committed this snapshot\"),\n  ReadingStep(\"source_ready\", \"reads the source and fetch outcome in the preparation transaction\"),\n  ReadingStep(\"same_preparation\", \"recognizes an existing task without resetting its job\"),\n  ReadingStep(\"create_preparation\", \"commits the task and new job together\"),\n  ReadingStep(\"prepare_plan\", \"replays existing preparation or rejects inconsistent state\"),\n  ReadingStep(\"prepare_lawyer\", \"runs preparation through the atomic boundary\"),\n  ReadingStep(\"api\", \"requires verified job-manager authority\"),\n])"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::prepare_lawyer",
        "name": "prepare_lawyer",
        "package": "Icetakes/LawyerPreparation",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, PrepareLawyerInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PreparationError, LawyerPrepared]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/LawyerPreparation::PrepareLawyerInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPreparation::PreparationError, Icetakes/LawyerPreparation::LawyerPrepared]]",
        "exported": true,
        "location": {
          "file": "lawyer_preparation",
          "start": 5968,
          "end": 6168,
          "label": "lawyer_preparation:149:3",
          "source": "# Authority is enforced by role_route. Preparation identity is independent\n  # of which authorized worker delivers this command.\n  _ = principal\n  scope <- transaction(db)\n  prepare_plan(scope, input)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::prepare_plan",
        "name": "prepare_plan",
        "package": "Icetakes/LawyerPreparation",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], PrepareLawyerInput) -> Yichus/Transaction::Txn[a, PreparationError, LawyerPrepared]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPreparation::PrepareLawyerInput) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPreparation::PreparationError, Icetakes/LawyerPreparation::LawyerPrepared]",
        "exported": false,
        "location": {
          "file": "lawyer_preparation",
          "start": 5267,
          "end": 5838,
          "label": "lawyer_preparation:135:3",
          "source": "PrepareLawyerInput(id) = input\n  snapshot_ref <- tx_bind(source_ready(scope, id))\n  key = lawyer_ref(id)\n  job <- tx_bind(tx_read(jobs_table(scope), key))\n  task <- tx_bind(tx_read(judgment_tasks_table(scope), key))\n  match (job, task):\n    case (None, None): create_preparation(scope, key, snapshot_ref)\n    case (Some(existing_job), Some(existing_task)):\n      if same_preparation(existing_job, existing_task, key, snapshot_ref):\n        tx_pure(LawyerPrepared(key, key, snapshot_ref))\n      else: tx_abort(PreparationConflict)\n    case _: tx_abort(PreparationConflict)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::require_source",
        "name": "require_source",
        "package": "Icetakes/LawyerPreparation",
        "signature": "forall a: *. (Contribution, ArticleSnapshot, ContributionJob, String) -> Yichus/Transaction::Txn[a, PreparationError, String]",
        "signatureId": "forall a: *. (Icetakes/ContributionModel::Contribution, Icetakes/ContributionModel::ArticleSnapshot, Icetakes/ContributionModel::ContributionJob, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPreparation::PreparationError, Bosatsu/Predef::String]",
        "exported": false,
        "location": {
          "file": "lawyer_preparation",
          "start": 2376,
          "end": 2993,
          "label": "lawyer_preparation:73:3",
          "source": "ArticleSnapshot(frozen, _, _, _, _, _, _, _, _) = snapshot\n  Contribution(current_id, _, _, _, _, _, _, _) = current\n  if eq_String(current_id, id):\n    if same_contribution(current, frozen):\n      if input_matches_job(current, queued):\n        ContributionJob(_, job) = queued\n        match job_state(job):\n          case Succeeded(output_ref, _):\n            if eq_String(output_ref, contribution_ref(id)): tx_pure(output_ref)\n            else: tx_abort(SourceChanged)\n          case _: tx_abort(FetchNotComplete)\n      else: tx_abort(SourceChanged)\n    else: tx_abort(SourceChanged)\n  else: tx_abort(SourceChanged)"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::same_preparation",
        "name": "same_preparation",
        "package": "Icetakes/LawyerPreparation",
        "signature": "(Yichus/Job::Job, JudgmentTask, String, String) -> Bool",
        "signatureId": "(Yichus/Job::Job, Icetakes/JudgmentStore::JudgmentTask, Bosatsu/Predef::String, Bosatsu/Predef::String) -> Bosatsu/Predef::Bool",
        "exported": false,
        "location": {
          "file": "lawyer_preparation",
          "start": 3729,
          "end": 4517,
          "label": "lawyer_preparation:103:3",
          "source": "JudgmentTask(ref, revision, schema, evidence, delay) = task\n  if eq_String(job_id(job), key):\n    if eq_String(job_stage(job), lawyer_stage):\n      if eq_String(job_input_ref(job), key):\n        if cmp_Int(job_input_revision(job), input_revision) matches EQ:\n          if eq_String(ref, key):\n            if cmp_Int(revision, input_revision) matches EQ:\n              if schema matches LawyerV1:\n                if cmp_Int(delay, lawyer_retry_millis) matches EQ:\n                  match evidence:\n                    case [EvidenceRef(evidence_id)]: eq_String(evidence_id, snapshot_ref)\n                    case _: False\n                else: False\n              else: False\n            else: False\n          else: False\n        else: False\n      else: False\n    else: False\n  else: False"
        },
        "repetition": []
      },
      {
        "id": "Icetakes/LawyerPreparation::source_ready",
        "name": "source_ready",
        "package": "Icetakes/LawyerPreparation",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], String) -> Yichus/Transaction::Txn[a, PreparationError, String]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPreparation::PreparationError, Bosatsu/Predef::String]",
        "exported": false,
        "location": {
          "file": "lawyer_preparation",
          "start": 3083,
          "end": 3630,
          "label": "lawyer_preparation:89:3",
          "source": "current <- tx_bind(tx_read(contributions_table(scope), id))\n  match current:\n    case None: tx_abort(MissingContribution)\n    case Some(contribution):\n      snapshot <- tx_bind(tx_read(snapshots_table(scope), contribution_ref(id)))\n      match snapshot:\n        case None: tx_abort(MissingSnapshot)\n        case Some(frozen):\n          queued <- tx_bind(tx_read(fetch_jobs_table(scope), job_key(id)))\n          match queued:\n            case None: tx_abort(MissingFetchJob)\n            case Some(job): require_source(contribution, frozen, job, id)"
        },
        "repetition": []
      }
    ],
    "groups": [
      {
        "id": "shared",
        "label": "Shared domain and storage contracts",
        "parent": null,
        "members": []
      },
      {
        "id": "ingestion",
        "label": "Contribution and source ingestion",
        "parent": null,
        "members": []
      },
      {
        "id": "judging",
        "label": "Judgment preparation and completion",
        "parent": null,
        "members": []
      },
      {
        "id": "policy",
        "label": "Versioned editorial policy",
        "parent": null,
        "members": []
      },
      {
        "id": "Identity",
        "label": "Identity",
        "parent": "shared",
        "members": [
          "Icetakes/Identity::frame",
          "Icetakes/Identity::site_id"
        ]
      },
      {
        "id": "ContributionModel",
        "label": "ContributionModel",
        "parent": "shared",
        "members": [
          "Icetakes/ContributionModel::contribution_reading",
          "Icetakes/ContributionModel::contribution_tables",
          "Icetakes/ContributionModel::contributions_table",
          "Icetakes/ContributionModel::fetch_stage",
          "Icetakes/ContributionModel::job_rows",
          "Icetakes/ContributionModel::jobs_table",
          "Icetakes/ContributionModel::over_limit",
          "Icetakes/ContributionModel::progress_state",
          "Icetakes/ContributionModel::same_urgency",
          "Icetakes/ContributionModel::snapshots_table",
          "Icetakes/ContributionModel::contribution_progress",
          "Icetakes/ContributionModel::contribution_ref",
          "Icetakes/ContributionModel::job_key",
          "Icetakes/ContributionModel::same_content",
          "Icetakes/ContributionModel::validate_idempotency_key",
          "Icetakes/ContributionModel::input_matches_job",
          "Icetakes/ContributionModel::same_contribution"
        ]
      },
      {
        "id": "JudgmentStore",
        "label": "JudgmentStore",
        "parent": "shared",
        "members": [
          "Icetakes/JudgmentStore::jobs_table",
          "Icetakes/JudgmentStore::judgment_artifacts_table",
          "Icetakes/JudgmentStore::judgment_attempts_table",
          "Icetakes/JudgmentStore::judgment_tables",
          "Icetakes/JudgmentStore::judgment_tasks_table"
        ]
      },
      {
        "id": "ContributionIntake",
        "label": "ContributionIntake",
        "parent": "ingestion",
        "members": [
          "Icetakes/ContributionIntake::access_rules",
          "Icetakes/ContributionIntake::can_read_contribution",
          "Icetakes/ContributionIntake::can_read_contribution_job",
          "Icetakes/ContributionIntake::charter_version",
          "Icetakes/ContributionIntake::fetch_max_attempts",
          "Icetakes/ContributionIntake::frontend",
          "Icetakes/ContributionIntake::intake_reading",
          "Icetakes/ContributionIntake::intake_tables",
          "Icetakes/ContributionIntake::receipt_rows",
          "Icetakes/ContributionIntake::receipts_table",
          "Icetakes/ContributionIntake::command_local_key",
          "Icetakes/ContributionIntake::contribution_status",
          "Icetakes/ContributionIntake::create_submission",
          "Icetakes/ContributionIntake::same_submission",
          "Icetakes/ContributionIntake::validate_submission",
          "Icetakes/ContributionIntake::submit_plan",
          "Icetakes/ContributionIntake::submit_contribution",
          "Icetakes/ContributionIntake::api"
        ]
      },
      {
        "id": "ArticleRetrieval",
        "label": "ArticleRetrieval",
        "parent": "ingestion",
        "members": [
          "Icetakes/ArticleRetrieval::access_rules",
          "Icetakes/ArticleRetrieval::commands_table",
          "Icetakes/ArticleRetrieval::contribution_id",
          "Icetakes/ArticleRetrieval::fetch_transition",
          "Icetakes/ArticleRetrieval::retrieval_reading",
          "Icetakes/ArticleRetrieval::retrieval_tables",
          "Icetakes/ArticleRetrieval::same_command",
          "Icetakes/ArticleRetrieval::command_local_key",
          "Icetakes/ArticleRetrieval::fetch_request",
          "Icetakes/ArticleRetrieval::read_contribution",
          "Icetakes/ArticleRetrieval::finish_command",
          "Icetakes/ArticleRetrieval::persist_job",
          "Icetakes/ArticleRetrieval::read_fetch_job",
          "Icetakes/ArticleRetrieval::checked_job",
          "Icetakes/ArticleRetrieval::record_result",
          "Icetakes/ArticleRetrieval::recover_before_claim",
          "Icetakes/ArticleRetrieval::complete_active",
          "Icetakes/ArticleRetrieval::recover_active",
          "Icetakes/ArticleRetrieval::start_command",
          "Icetakes/ArticleRetrieval::complete_plan",
          "Icetakes/ArticleRetrieval::prepare_plan",
          "Icetakes/ArticleRetrieval::retrieve_contribution",
          "Icetakes/ArticleRetrieval::api"
        ]
      },
      {
        "id": "Judgment",
        "label": "Judgment",
        "parent": "judging",
        "members": [
          "Icetakes/Judgment::judgment_reading",
          "Icetakes/Judgment::member_evidence",
          "Icetakes/Judgment::member_string",
          "Icetakes/Judgment::nonempty_string",
          "Icetakes/Judgment::required_basis_points",
          "Icetakes/Judgment::required_event_time",
          "Icetakes/Judgment::role_value_decoders",
          "Icetakes/Judgment::decode_evidence_ref",
          "Icetakes/Judgment::expected_fields",
          "Icetakes/Judgment::required_brief_bullets",
          "Icetakes/Judgment::required_nonempty_string",
          "Icetakes/Judgment::decode_evidence_refs",
          "Icetakes/Judgment::required_urgency_assessment",
          "Icetakes/Judgment::required_evidence_refs",
          "Icetakes/Judgment::decode_devils_advocate_value",
          "Icetakes/Judgment::decode_lawyer_value",
          "Icetakes/Judgment::decode_taxonomy_value",
          "Icetakes/Judgment::decode_judgment"
        ]
      },
      {
        "id": "JudgmentCompletion",
        "label": "JudgmentCompletion",
        "parent": "judging",
        "members": [
          "Icetakes/JudgmentCompletion::apply_job_result",
          "Icetakes/JudgmentCompletion::completion_reading",
          "Icetakes/JudgmentCompletion::nonnegative",
          "Icetakes/JudgmentCompletion::read_job",
          "Icetakes/JudgmentCompletion::read_task",
          "Icetakes/JudgmentCompletion::require_task_matches_job",
          "Icetakes/JudgmentCompletion::same_lease",
          "Icetakes/JudgmentCompletion::same_model_completion",
          "Icetakes/JudgmentCompletion::accepted_attempt",
          "Icetakes/JudgmentCompletion::malformed_attempt",
          "Icetakes/JudgmentCompletion::same_completion_input",
          "Icetakes/JudgmentCompletion::validate_model_completion",
          "Icetakes/JudgmentCompletion::validate_completion_input",
          "Icetakes/JudgmentCompletion::new_completion_attempt",
          "Icetakes/JudgmentCompletion::completion_attempt_plan",
          "Icetakes/JudgmentCompletion::completion_plan",
          "Icetakes/JudgmentCompletion::complete_judgment"
        ]
      },
      {
        "id": "LawyerPreparation",
        "label": "LawyerPreparation",
        "parent": "judging",
        "members": [
          "Icetakes/LawyerPreparation::access_rules",
          "Icetakes/LawyerPreparation::input_revision",
          "Icetakes/LawyerPreparation::lawyer_attempts",
          "Icetakes/LawyerPreparation::lawyer_retry_millis",
          "Icetakes/LawyerPreparation::lawyer_stage",
          "Icetakes/LawyerPreparation::preparation_reading",
          "Icetakes/LawyerPreparation::create_preparation",
          "Icetakes/LawyerPreparation::same_preparation",
          "Icetakes/LawyerPreparation::lawyer_ref",
          "Icetakes/LawyerPreparation::require_source",
          "Icetakes/LawyerPreparation::source_ready",
          "Icetakes/LawyerPreparation::prepare_plan",
          "Icetakes/LawyerPreparation::prepare_lawyer",
          "Icetakes/LawyerPreparation::api"
        ]
      },
      {
        "id": "LawyerPolicy",
        "label": "LawyerPolicy",
        "parent": "policy",
        "members": [
          "Icetakes/LawyerPolicy::access_rules",
          "Icetakes/LawyerPolicy::activation_receipts_table",
          "Icetakes/LawyerPolicy::active_generation",
          "Icetakes/LawyerPolicy::active_policy_table",
          "Icetakes/LawyerPolicy::all_true",
          "Icetakes/LawyerPolicy::bounded_text",
          "Icetakes/LawyerPolicy::in_range",
          "Icetakes/LawyerPolicy::policies_table",
          "Icetakes/LawyerPolicy::policy_reading",
          "Icetakes/LawyerPolicy::provider_policy",
          "Icetakes/LawyerPolicy::same_providers",
          "Icetakes/LawyerPolicy::policy_ref",
          "Icetakes/LawyerPolicy::read_active_policy",
          "Icetakes/LawyerPolicy::same_activation",
          "Icetakes/LawyerPolicy::same_policy",
          "Icetakes/LawyerPolicy::valid_providers",
          "Icetakes/LawyerPolicy::lookup_plan",
          "Icetakes/LawyerPolicy::select_policy",
          "Icetakes/LawyerPolicy::valid_policy",
          "Icetakes/LawyerPolicy::activate_plan",
          "Icetakes/LawyerPolicy::publish_plan",
          "Icetakes/LawyerPolicy::read_policy",
          "Icetakes/LawyerPolicy::activate_policy",
          "Icetakes/LawyerPolicy::publish_policy",
          "Icetakes/LawyerPolicy::api"
        ]
      }
    ],
    "unassigned": [],
    "references": [
      {
        "from": "Icetakes/ArticleRetrieval::api",
        "to": "Icetakes/ArticleRetrieval::retrieve_contribution",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 12817,
            "end": 12838,
            "label": "article_retrieval:281:83",
            "source": "retrieve_contribution"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::checked_job",
        "to": "Icetakes/ContributionModel::input_matches_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 4303,
            "end": 4320,
            "label": "article_retrieval:112:6",
            "source": "input_matches_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::command_local_key",
        "to": "Icetakes/Identity::frame",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 3215,
            "end": 3220,
            "label": "article_retrieval:87:18",
            "source": "frame"
          },
          {
            "file": "article_retrieval",
            "start": 3231,
            "end": 3236,
            "label": "article_retrieval:87:34",
            "source": "frame"
          },
          {
            "file": "article_retrieval",
            "start": 3263,
            "end": 3268,
            "label": "article_retrieval:87:66",
            "source": "frame"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::command_local_key",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 3221,
            "end": 3228,
            "label": "article_retrieval:87:24",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::checked_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 10834,
            "end": 10845,
            "label": "article_retrieval:237:22",
            "source": "checked_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::contribution_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 10781,
            "end": 10796,
            "label": "article_retrieval:236:43",
            "source": "contribution_id"
          },
          {
            "file": "article_retrieval",
            "start": 11047,
            "end": 11062,
            "label": "article_retrieval:240:76",
            "source": "contribution_id"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::fetch_transition",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 10976,
            "end": 10992,
            "label": "article_retrieval:240:5",
            "source": "fetch_transition"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::persist_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 10939,
            "end": 10950,
            "label": "article_retrieval:239:22",
            "source": "persist_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::read_fetch_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 10759,
            "end": 10773,
            "label": "article_retrieval:236:21",
            "source": "read_fetch_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::record_result",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 11086,
            "end": 11099,
            "label": "article_retrieval:242:3",
            "source": "record_result"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 11030,
            "end": 11046,
            "label": "article_retrieval:240:59",
            "source": "contribution_ref"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_plan",
        "to": "Icetakes/ArticleRetrieval::command_local_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 11401,
            "end": 11418,
            "label": "article_retrieval:247:75",
            "source": "command_local_key"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_plan",
        "to": "Icetakes/ArticleRetrieval::commands_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 11357,
            "end": 11371,
            "label": "article_retrieval:247:31",
            "source": "commands_table"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_plan",
        "to": "Icetakes/ArticleRetrieval::complete_active",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 11720,
            "end": 11735,
            "label": "article_retrieval:254:33",
            "source": "complete_active"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_plan",
        "to": "Icetakes/ArticleRetrieval::same_command",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 11556,
            "end": 11568,
            "label": "article_retrieval:251:10",
            "source": "same_command"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::fetch_request",
        "to": "Icetakes/Identity::frame",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 6205,
            "end": 6210,
            "label": "article_retrieval:153:20",
            "source": "frame"
          },
          {
            "file": "article_retrieval",
            "start": 6229,
            "end": 6234,
            "label": "article_retrieval:153:44",
            "source": "frame"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::finish_command",
        "to": "Icetakes/ArticleRetrieval::command_local_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 5078,
            "end": 5095,
            "label": "article_retrieval:128:69",
            "source": "command_local_key"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::finish_command",
        "to": "Icetakes/ArticleRetrieval::commands_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 5034,
            "end": 5048,
            "label": "article_retrieval:128:25",
            "source": "commands_table"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::persist_job",
        "to": "Icetakes/ContributionModel::job_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 4768,
            "end": 4775,
            "label": "article_retrieval:122:48",
            "source": "job_key"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::persist_job",
        "to": "Icetakes/ContributionModel::jobs_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 4749,
            "end": 4759,
            "label": "article_retrieval:122:29",
            "source": "jobs_table"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::command_local_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 8331,
            "end": 8348,
            "label": "article_retrieval:193:79",
            "source": "command_local_key"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::commands_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 8287,
            "end": 8301,
            "label": "article_retrieval:193:35",
            "source": "commands_table"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::recover_active",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 8793,
            "end": 8807,
            "label": "article_retrieval:202:35",
            "source": "recover_active"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::same_command",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 8574,
            "end": 8586,
            "label": "article_retrieval:198:14",
            "source": "same_command"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::start_command",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 8453,
            "end": 8466,
            "label": "article_retrieval:196:20",
            "source": "start_command"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ContributionModel::validate_idempotency_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 8151,
            "end": 8175,
            "label": "article_retrieval:190:9",
            "source": "validate_idempotency_key"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::read_contribution",
        "to": "Icetakes/ContributionModel::contributions_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 3804,
            "end": 3823,
            "label": "article_retrieval:100:28",
            "source": "contributions_table"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::read_fetch_job",
        "to": "Icetakes/ContributionModel::job_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 4090,
            "end": 4097,
            "label": "article_retrieval:106:47",
            "source": "job_key"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::read_fetch_job",
        "to": "Icetakes/ContributionModel::jobs_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 4071,
            "end": 4081,
            "label": "article_retrieval:106:28",
            "source": "jobs_table"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ArticleRetrieval::contribution_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 9789,
            "end": 9804,
            "label": "article_retrieval:218:35",
            "source": "contribution_id"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ArticleRetrieval::finish_command",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 10271,
            "end": 10285,
            "label": "article_retrieval:227:11",
            "source": "finish_command"
          },
          {
            "file": "article_retrieval",
            "start": 10357,
            "end": 10371,
            "label": "article_retrieval:228:13",
            "source": "finish_command"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ContributionModel::contribution_progress",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 10419,
            "end": 10440,
            "label": "article_retrieval:228:75",
            "source": "contribution_progress"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 9772,
            "end": 9788,
            "label": "article_retrieval:218:18",
            "source": "contribution_ref"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ContributionModel::snapshots_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 9934,
            "end": 9949,
            "label": "article_retrieval:221:35",
            "source": "snapshots_table"
          },
          {
            "file": "article_retrieval",
            "start": 10212,
            "end": 10227,
            "label": "article_retrieval:226:34",
            "source": "snapshots_table"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::checked_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 5546,
            "end": 5557,
            "label": "article_retrieval:138:22",
            "source": "checked_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::contribution_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 5493,
            "end": 5508,
            "label": "article_retrieval:137:43",
            "source": "contribution_id"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::finish_command",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 5898,
            "end": 5912,
            "label": "article_retrieval:147:11",
            "source": "finish_command"
          },
          {
            "file": "article_retrieval",
            "start": 5973,
            "end": 5987,
            "label": "article_retrieval:148:17",
            "source": "finish_command"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::persist_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 5768,
            "end": 5779,
            "label": "article_retrieval:144:24",
            "source": "persist_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::read_fetch_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 5471,
            "end": 5485,
            "label": "article_retrieval:137:21",
            "source": "read_fetch_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_before_claim",
        "to": "Icetakes/ArticleRetrieval::persist_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 6574,
            "end": 6585,
            "label": "article_retrieval:159:31",
            "source": "persist_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::retrieve_contribution",
        "to": "Icetakes/ArticleRetrieval::complete_plan",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 12471,
            "end": 12484,
            "label": "article_retrieval:273:7",
            "source": "complete_plan"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::retrieve_contribution",
        "to": "Icetakes/ArticleRetrieval::prepare_plan",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 12011,
            "end": 12023,
            "label": "article_retrieval:262:5",
            "source": "prepare_plan"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::checked_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7208,
            "end": 7219,
            "label": "article_retrieval:173:25",
            "source": "checked_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::command_local_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7823,
            "end": 7840,
            "label": "article_retrieval:182:76",
            "source": "command_local_key"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::commands_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7779,
            "end": 7793,
            "label": "article_retrieval:182:32",
            "source": "commands_table"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::contribution_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7099,
            "end": 7114,
            "label": "article_retrieval:171:16",
            "source": "contribution_id"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::fetch_request",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7710,
            "end": 7723,
            "label": "article_retrieval:181:53",
            "source": "fetch_request"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::finish_command",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7440,
            "end": 7454,
            "label": "article_retrieval:177:27",
            "source": "finish_command"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::persist_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7603,
            "end": 7614,
            "label": "article_retrieval:180:22",
            "source": "persist_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::read_contribution",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7054,
            "end": 7071,
            "label": "article_retrieval:170:27",
            "source": "read_contribution"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::read_fetch_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7157,
            "end": 7171,
            "label": "article_retrieval:172:23",
            "source": "read_fetch_job"
          }
        ]
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::recover_before_claim",
        "kind": "user-reference",
        "locations": [
          {
            "file": "article_retrieval",
            "start": 7266,
            "end": 7286,
            "label": "article_retrieval:174:24",
            "source": "recover_before_claim"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::api",
        "to": "Icetakes/ContributionIntake::contribution_status",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 8493,
            "end": 8512,
            "label": "contribution_intake:225:65",
            "source": "contribution_status"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::api",
        "to": "Icetakes/ContributionIntake::submit_contribution",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 8249,
            "end": 8268,
            "label": "contribution_intake:219:58",
            "source": "submit_contribution"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::command_local_key",
        "to": "Icetakes/Identity::frame",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 3888,
            "end": 3893,
            "label": "contribution_intake:105:18",
            "source": "frame"
          },
          {
            "file": "contribution_intake",
            "start": 3904,
            "end": 3909,
            "label": "contribution_intake:105:34",
            "source": "frame"
          },
          {
            "file": "contribution_intake",
            "start": 3934,
            "end": 3939,
            "label": "contribution_intake:105:64",
            "source": "frame"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::command_local_key",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 3894,
            "end": 3901,
            "label": "contribution_intake:105:24",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionIntake::can_read_contribution_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 7662,
            "end": 7687,
            "label": "contribution_intake:205:18",
            "source": "can_read_contribution_job"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionIntake::command_local_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 7216,
            "end": 7233,
            "label": "contribution_intake:194:30",
            "source": "command_local_key"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionIntake::receipt_rows",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 7169,
            "end": 7181,
            "label": "contribution_intake:193:9",
            "source": "receipt_rows"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionModel::contribution_progress",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 7752,
            "end": 7773,
            "label": "contribution_intake:206:50",
            "source": "contribution_progress"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionModel::job_rows",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 7454,
            "end": 7462,
            "label": "contribution_intake:200:42",
            "source": "job_rows"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionModel::validate_idempotency_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 7012,
            "end": 7036,
            "label": "contribution_intake:189:9",
            "source": "validate_idempotency_key"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionIntake::charter_version",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 5060,
            "end": 5075,
            "label": "contribution_intake:138:7",
            "source": "charter_version"
          },
          {
            "file": "contribution_intake",
            "start": 5367,
            "end": 5382,
            "label": "contribution_intake:147:37",
            "source": "charter_version"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionIntake::fetch_max_attempts",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 5093,
            "end": 5111,
            "label": "contribution_intake:140:7",
            "source": "fetch_max_attempts"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionIntake::receipts_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 5744,
            "end": 5758,
            "label": "contribution_intake:153:32",
            "source": "receipts_table"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 5019,
            "end": 5035,
            "label": "contribution_intake:137:7",
            "source": "contribution_ref"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::contributions_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 4751,
            "end": 4770,
            "label": "contribution_intake:128:41",
            "source": "contributions_table"
          },
          {
            "file": "contribution_intake",
            "start": 5554,
            "end": 5573,
            "label": "contribution_intake:151:32",
            "source": "contributions_table"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::fetch_stage",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 5000,
            "end": 5011,
            "label": "contribution_intake:136:7",
            "source": "fetch_stage"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::job_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 4929,
            "end": 4936,
            "label": "contribution_intake:133:21",
            "source": "job_key"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::jobs_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 5645,
            "end": 5655,
            "label": "contribution_intake:152:32",
            "source": "jobs_table"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 5358,
            "end": 5365,
            "label": "contribution_intake:147:28",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::same_submission",
        "to": "Icetakes/ContributionModel::same_content",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 3570,
            "end": 3582,
            "label": "contribution_intake:99:5",
            "source": "same_content"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::submit_contribution",
        "to": "Icetakes/ContributionIntake::submit_plan",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 6764,
            "end": 6775,
            "label": "contribution_intake:180:3",
            "source": "submit_plan"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::command_local_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 6155,
            "end": 6172,
            "label": "contribution_intake:165:42",
            "source": "command_local_key"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::create_submission",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 6532,
            "end": 6549,
            "label": "contribution_intake:172:20",
            "source": "create_submission"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::receipts_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 6225,
            "end": 6239,
            "label": "contribution_intake:166:35",
            "source": "receipts_table"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::same_submission",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 6390,
            "end": 6405,
            "label": "contribution_intake:170:14",
            "source": "same_submission"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::validate_submission",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 5969,
            "end": 5988,
            "label": "contribution_intake:161:9",
            "source": "validate_submission"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::validate_submission",
        "to": "Icetakes/ContributionModel::over_limit",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 2878,
            "end": 2888,
            "label": "contribution_intake:85:12",
            "source": "over_limit"
          },
          {
            "file": "contribution_intake",
            "start": 3129,
            "end": 3139,
            "label": "contribution_intake:91:16",
            "source": "over_limit"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionIntake::validate_submission",
        "to": "Icetakes/ContributionModel::validate_idempotency_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_intake",
            "start": 2674,
            "end": 2698,
            "label": "contribution_intake:79:9",
            "source": "validate_idempotency_key"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::contribution_progress",
        "to": "Icetakes/ContributionModel::progress_state",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 4008,
            "end": 4022,
            "label": "contribution_model:119:5",
            "source": "progress_state"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::contribution_ref",
        "to": "Icetakes/Identity::frame",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 3090,
            "end": 3095,
            "label": "contribution_model:91:18",
            "source": "frame"
          },
          {
            "file": "contribution_model",
            "start": 3106,
            "end": 3111,
            "label": "contribution_model:91:34",
            "source": "frame"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::contribution_ref",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 3096,
            "end": 3103,
            "label": "contribution_model:91:24",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::input_matches_job",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 4944,
            "end": 4960,
            "label": "contribution_model:146:44",
            "source": "contribution_ref"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::input_matches_job",
        "to": "Icetakes/ContributionModel::fetch_stage",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 4887,
            "end": 4898,
            "label": "contribution_model:145:38",
            "source": "fetch_stage"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::input_matches_job",
        "to": "Icetakes/ContributionModel::job_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 4836,
            "end": 4843,
            "label": "contribution_model:144:33",
            "source": "job_key"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::input_matches_job",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 4756,
            "end": 4763,
            "label": "contribution_model:142:22",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::job_key",
        "to": "Icetakes/ContributionModel::fetch_stage",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 3203,
            "end": 3214,
            "label": "contribution_model:94:24",
            "source": "fetch_stage"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::job_key",
        "to": "Icetakes/Identity::frame",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 3197,
            "end": 3202,
            "label": "contribution_model:94:18",
            "source": "frame"
          },
          {
            "file": "contribution_model",
            "start": 3217,
            "end": 3222,
            "label": "contribution_model:94:38",
            "source": "frame"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::same_content",
        "to": "Icetakes/ContributionModel::same_urgency",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 5404,
            "end": 5416,
            "label": "contribution_model:158:50",
            "source": "same_urgency"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::same_contribution",
        "to": "Icetakes/ContributionModel::same_content",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 5836,
            "end": 5848,
            "label": "contribution_model:170:13",
            "source": "same_content"
          }
        ]
      },
      {
        "from": "Icetakes/ContributionModel::validate_idempotency_key",
        "to": "Icetakes/ContributionModel::over_limit",
        "kind": "user-reference",
        "locations": [
          {
            "file": "contribution_model",
            "start": 2883,
            "end": 2893,
            "label": "contribution_model:86:8",
            "source": "over_limit"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_devils_advocate_value",
        "to": "Icetakes/Judgment::expected_fields",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 7710,
            "end": 7725,
            "label": "judgment:220:20",
            "source": "expected_fields"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_devils_advocate_value",
        "to": "Icetakes/Judgment::required_evidence_refs",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 8049,
            "end": 8071,
            "label": "judgment:224:32",
            "source": "required_evidence_refs"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_devils_advocate_value",
        "to": "Icetakes/Judgment::required_nonempty_string",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 7966,
            "end": 7990,
            "label": "judgment:223:34",
            "source": "required_nonempty_string"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_evidence_ref",
        "to": "Icetakes/Judgment::member_evidence",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 3459,
            "end": 3474,
            "label": "judgment:125:13",
            "source": "member_evidence"
          },
          {
            "file": "judgment",
            "start": 3603,
            "end": 3618,
            "label": "judgment:128:17",
            "source": "member_evidence"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_evidence_refs",
        "to": "Icetakes/Judgment::decode_evidence_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 3984,
            "end": 4003,
            "label": "judgment:140:13",
            "source": "decode_evidence_ref"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_judgment",
        "to": "Icetakes/Judgment::decode_devils_advocate_value",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 9270,
            "end": 9298,
            "label": "judgment:254:35",
            "source": "decode_devils_advocate_value"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_judgment",
        "to": "Icetakes/Judgment::decode_lawyer_value",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 9553,
            "end": 9572,
            "label": "judgment:260:35",
            "source": "decode_lawyer_value"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_judgment",
        "to": "Icetakes/Judgment::decode_taxonomy_value",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 9419,
            "end": 9440,
            "label": "judgment:257:35",
            "source": "decode_taxonomy_value"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::expected_fields",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 6678,
            "end": 6693,
            "label": "judgment:198:20",
            "source": "expected_fields"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_basis_points",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 6899,
            "end": 6920,
            "label": "judgment:203:24",
            "source": "required_basis_points"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_brief_bullets",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 7272,
            "end": 7294,
            "label": "judgment:208:32",
            "source": "required_brief_bullets"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_event_time",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 7052,
            "end": 7071,
            "label": "judgment:205:29",
            "source": "required_event_time"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_evidence_refs",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 7334,
            "end": 7356,
            "label": "judgment:209:32",
            "source": "required_evidence_refs"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_nonempty_string",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 6967,
            "end": 6991,
            "label": "judgment:204:39",
            "source": "required_nonempty_string"
          },
          {
            "file": "judgment",
            "start": 7187,
            "end": 7211,
            "label": "judgment:207:36",
            "source": "required_nonempty_string"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_urgency_assessment",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 7116,
            "end": 7143,
            "label": "judgment:206:37",
            "source": "required_urgency_assessment"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_taxonomy_value",
        "to": "Icetakes/Judgment::expected_fields",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 8346,
            "end": 8361,
            "label": "judgment:232:20",
            "source": "expected_fields"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_taxonomy_value",
        "to": "Icetakes/Judgment::required_evidence_refs",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 8572,
            "end": 8594,
            "label": "judgment:235:32",
            "source": "required_evidence_refs"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::decode_taxonomy_value",
        "to": "Icetakes/Judgment::required_nonempty_string",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 8432,
            "end": 8456,
            "label": "judgment:233:24",
            "source": "required_nonempty_string"
          },
          {
            "file": "judgment",
            "start": 8498,
            "end": 8522,
            "label": "judgment:234:25",
            "source": "required_nonempty_string"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::expected_fields",
        "to": "Icetakes/Judgment::member_string",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 2618,
            "end": 2631,
            "label": "judgment:102:13",
            "source": "member_string"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::required_brief_bullets",
        "to": "Icetakes/Judgment::nonempty_string",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 6181,
            "end": 6196,
            "label": "judgment:187:33",
            "source": "nonempty_string"
          },
          {
            "file": "judgment",
            "start": 6258,
            "end": 6273,
            "label": "judgment:188:34",
            "source": "nonempty_string"
          },
          {
            "file": "judgment",
            "start": 6335,
            "end": 6350,
            "label": "judgment:189:33",
            "source": "nonempty_string"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::required_evidence_refs",
        "to": "Icetakes/Judgment::decode_evidence_refs",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 4694,
            "end": 4714,
            "label": "judgment:155:19",
            "source": "decode_evidence_refs"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::required_nonempty_string",
        "to": "Icetakes/Judgment::nonempty_string",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 3119,
            "end": 3134,
            "label": "judgment:114:3",
            "source": "nonempty_string"
          }
        ]
      },
      {
        "from": "Icetakes/Judgment::required_urgency_assessment",
        "to": "Icetakes/Judgment::required_nonempty_string",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment",
            "start": 5566,
            "end": 5590,
            "label": "judgment:174:23",
            "source": "required_nonempty_string"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::accepted_attempt",
        "to": "Icetakes/JudgmentCompletion::apply_job_result",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 6273,
            "end": 6289,
            "label": "judgment_completion:163:22",
            "source": "apply_job_result"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::accepted_attempt",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 6797,
            "end": 6807,
            "label": "judgment_completion:173:29",
            "source": "jobs_table"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::accepted_attempt",
        "to": "Icetakes/JudgmentStore::judgment_artifacts_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 6390,
            "end": 6414,
            "label": "judgment_completion:166:31",
            "source": "judgment_artifacts_table"
          },
          {
            "file": "judgment_completion",
            "start": 6635,
            "end": 6659,
            "label": "judgment_completion:171:29",
            "source": "judgment_artifacts_table"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::accepted_attempt",
        "to": "Icetakes/JudgmentStore::judgment_attempts_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 6715,
            "end": 6738,
            "label": "judgment_completion:172:29",
            "source": "judgment_attempts_table"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::complete_judgment",
        "to": "Icetakes/JudgmentCompletion::completion_plan",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 9703,
            "end": 9718,
            "label": "judgment_completion:249:3",
            "source": "completion_plan"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "to": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 9160,
            "end": 9182,
            "label": "judgment_completion:231:16",
            "source": "new_completion_attempt"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "to": "Icetakes/JudgmentCompletion::same_completion_input",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 8897,
            "end": 8918,
            "label": "judgment_completion:226:13",
            "source": "same_completion_input"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "to": "Icetakes/JudgmentStore::judgment_attempts_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 8727,
            "end": 8750,
            "label": "judgment_completion:222:31",
            "source": "judgment_attempts_table"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_plan",
        "to": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 9446,
            "end": 9469,
            "label": "judgment_completion:240:16",
            "source": "completion_attempt_plan"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_plan",
        "to": "Icetakes/JudgmentCompletion::validate_completion_input",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 9359,
            "end": 9384,
            "label": "judgment_completion:238:9",
            "source": "validate_completion_input"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::malformed_attempt",
        "to": "Icetakes/JudgmentCompletion::apply_job_result",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 7216,
            "end": 7232,
            "label": "judgment_completion:188:22",
            "source": "apply_job_result"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::malformed_attempt",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 7512,
            "end": 7522,
            "label": "judgment_completion:193:25",
            "source": "jobs_table"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::malformed_attempt",
        "to": "Icetakes/JudgmentStore::judgment_attempts_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 7434,
            "end": 7457,
            "label": "judgment_completion:192:25",
            "source": "judgment_attempts_table"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/Judgment::decode_judgment",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 8216,
            "end": 8231,
            "label": "judgment_completion:210:9",
            "source": "decode_judgment"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::accepted_attempt",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 8302,
            "end": 8318,
            "label": "judgment_completion:212:7",
            "source": "accepted_attempt"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::malformed_attempt",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 8416,
            "end": 8433,
            "label": "judgment_completion:214:7",
            "source": "malformed_attempt"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::read_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 7848,
            "end": 7856,
            "label": "judgment_completion:203:22",
            "source": "read_job"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::read_task",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 7983,
            "end": 7992,
            "label": "judgment_completion:206:19",
            "source": "read_task"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::require_task_matches_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 8047,
            "end": 8071,
            "label": "judgment_completion:207:16",
            "source": "require_task_matches_job"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 7857,
            "end": 7867,
            "label": "judgment_completion:203:31",
            "source": "jobs_table"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentStore::judgment_tasks_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 7993,
            "end": 8013,
            "label": "judgment_completion:206:29",
            "source": "judgment_tasks_table"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::same_completion_input",
        "to": "Icetakes/JudgmentCompletion::same_lease",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 4380,
            "end": 4390,
            "label": "judgment_completion:111:13",
            "source": "same_lease"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::same_completion_input",
        "to": "Icetakes/JudgmentCompletion::same_model_completion",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 4436,
            "end": 4457,
            "label": "judgment_completion:112:20",
            "source": "same_model_completion"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::validate_completion_input",
        "to": "Icetakes/JudgmentCompletion::validate_model_completion",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 2794,
            "end": 2819,
            "label": "judgment_completion:78:11",
            "source": "validate_model_completion"
          }
        ]
      },
      {
        "from": "Icetakes/JudgmentCompletion::validate_model_completion",
        "to": "Icetakes/JudgmentCompletion::nonnegative",
        "kind": "user-reference",
        "locations": [
          {
            "file": "judgment_completion",
            "start": 2149,
            "end": 2160,
            "label": "judgment_completion:66:15",
            "source": "nonnegative"
          },
          {
            "file": "judgment_completion",
            "start": 2299,
            "end": 2310,
            "label": "judgment_completion:69:19",
            "source": "nonnegative"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::activation_receipts_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7950,
            "end": 7975,
            "label": "lawyer_policy:186:30",
            "source": "activation_receipts_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::all_true",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7815,
            "end": 7823,
            "label": "lawyer_policy:185:6",
            "source": "all_true"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::bounded_text",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7825,
            "end": 7837,
            "label": "lawyer_policy:185:16",
            "source": "bounded_text"
          },
          {
            "file": "lawyer_policy",
            "start": 7849,
            "end": 7861,
            "label": "lawyer_policy:185:40",
            "source": "bounded_text"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::in_range",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7878,
            "end": 7886,
            "label": "lawyer_policy:185:69",
            "source": "in_range"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::policy_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7984,
            "end": 7994,
            "label": "lawyer_policy:186:64",
            "source": "policy_ref"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::same_activation",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 8085,
            "end": 8100,
            "label": "lawyer_policy:189:12",
            "source": "same_activation"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::select_policy",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 8193,
            "end": 8206,
            "label": "lawyer_policy:191:18",
            "source": "select_policy"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_policy",
        "to": "Icetakes/LawyerPolicy::activate_plan",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 8424,
            "end": 8437,
            "label": "lawyer_policy:197:3",
            "source": "activate_plan"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::api",
        "to": "Icetakes/LawyerPolicy::activate_policy",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 9992,
            "end": 10007,
            "label": "lawyer_policy:230:79",
            "source": "activate_policy"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::api",
        "to": "Icetakes/LawyerPolicy::publish_policy",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 9770,
            "end": 9784,
            "label": "lawyer_policy:227:77",
            "source": "publish_policy"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::api",
        "to": "Icetakes/LawyerPolicy::read_active_policy",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 10338,
            "end": 10356,
            "label": "lawyer_policy:234:80",
            "source": "read_active_policy"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::api",
        "to": "Icetakes/LawyerPolicy::read_policy",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 10503,
            "end": 10514,
            "label": "lawyer_policy:237:71",
            "source": "read_policy"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 9009,
            "end": 9016,
            "label": "lawyer_policy:211:36",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/LawyerPolicy::all_true",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 8983,
            "end": 8991,
            "label": "lawyer_policy:211:10",
            "source": "all_true"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/LawyerPolicy::policies_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 8814,
            "end": 8828,
            "label": "lawyer_policy:206:29",
            "source": "policies_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/LawyerPolicy::policy_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 8837,
            "end": 8847,
            "label": "lawyer_policy:206:52",
            "source": "policy_ref"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/LawyerPolicy::provider_policy",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 9089,
            "end": 9104,
            "label": "lawyer_policy:212:44",
            "source": "provider_policy"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::policy_ref",
        "to": "Icetakes/Identity::frame",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 2438,
            "end": 2443,
            "label": "lawyer_policy:63:18",
            "source": "frame"
          },
          {
            "file": "lawyer_policy",
            "start": 2454,
            "end": 2459,
            "label": "lawyer_policy:63:34",
            "source": "frame"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::policy_ref",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 2444,
            "end": 2451,
            "label": "lawyer_policy:63:24",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 5819,
            "end": 5826,
            "label": "lawyer_policy:144:38",
            "source": "site_id"
          },
          {
            "file": "lawyer_policy",
            "start": 5990,
            "end": 5997,
            "label": "lawyer_policy:147:33",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::all_true",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 5793,
            "end": 5801,
            "label": "lawyer_policy:144:12",
            "source": "all_true"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::policies_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 5659,
            "end": 5673,
            "label": "lawyer_policy:140:33",
            "source": "policies_table"
          },
          {
            "file": "lawyer_policy",
            "start": 6048,
            "end": 6062,
            "label": "lawyer_policy:148:32",
            "source": "policies_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::policy_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 5606,
            "end": 5616,
            "label": "lawyer_policy:139:11",
            "source": "policy_ref"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::same_policy",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 5854,
            "end": 5865,
            "label": "lawyer_policy:144:73",
            "source": "same_policy"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::valid_policy",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 5526,
            "end": 5538,
            "label": "lawyer_policy:137:6",
            "source": "valid_policy"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_policy",
        "to": "Icetakes/LawyerPolicy::publish_plan",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 6308,
            "end": 6320,
            "label": "lawyer_policy:155:3",
            "source": "publish_plan"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::read_active_policy",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 8638,
            "end": 8645,
            "label": "lawyer_policy:202:39",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::read_active_policy",
        "to": "Icetakes/LawyerPolicy::active_policy_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 8610,
            "end": 8629,
            "label": "lawyer_policy:202:11",
            "source": "active_policy_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::read_policy",
        "to": "Icetakes/LawyerPolicy::lookup_plan",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 9318,
            "end": 9329,
            "label": "lawyer_policy:218:3",
            "source": "lookup_plan"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::same_activation",
        "to": "Icetakes/LawyerPolicy::all_true",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 6505,
            "end": 6513,
            "label": "lawyer_policy:160:3",
            "source": "all_true"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::same_policy",
        "to": "Icetakes/LawyerPolicy::all_true",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 4071,
            "end": 4079,
            "label": "lawyer_policy:111:3",
            "source": "all_true"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::same_policy",
        "to": "Icetakes/LawyerPolicy::same_providers",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 4166,
            "end": 4180,
            "label": "lawyer_policy:113:5",
            "source": "same_providers"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/Identity::site_id",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7101,
            "end": 7108,
            "label": "lawyer_policy:173:36",
            "source": "site_id"
          },
          {
            "file": "lawyer_policy",
            "start": 7201,
            "end": 7208,
            "label": "lawyer_policy:174:64",
            "source": "site_id"
          },
          {
            "file": "lawyer_policy",
            "start": 7402,
            "end": 7409,
            "label": "lawyer_policy:177:61",
            "source": "site_id"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::activation_receipts_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7455,
            "end": 7480,
            "label": "lawyer_policy:178:34",
            "source": "activation_receipts_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::active_generation",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7230,
            "end": 7247,
            "label": "lawyer_policy:175:20",
            "source": "active_generation"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::active_policy_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7173,
            "end": 7192,
            "label": "lawyer_policy:174:36",
            "source": "active_policy_table"
          },
          {
            "file": "lawyer_policy",
            "start": 7374,
            "end": 7393,
            "label": "lawyer_policy:177:33",
            "source": "active_policy_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::all_true",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 7075,
            "end": 7083,
            "label": "lawyer_policy:173:10",
            "source": "all_true"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::policies_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 6921,
            "end": 6935,
            "label": "lawyer_policy:169:29",
            "source": "policies_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::policy_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 6944,
            "end": 6954,
            "label": "lawyer_policy:169:52",
            "source": "policy_ref"
          },
          {
            "file": "lawyer_policy",
            "start": 7489,
            "end": 7499,
            "label": "lawyer_policy:178:68",
            "source": "policy_ref"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_policy",
        "to": "Icetakes/LawyerPolicy::all_true",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 4686,
            "end": 4694,
            "label": "lawyer_policy:122:3",
            "source": "all_true"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_policy",
        "to": "Icetakes/LawyerPolicy::bounded_text",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 4701,
            "end": 4713,
            "label": "lawyer_policy:123:5",
            "source": "bounded_text"
          },
          {
            "file": "lawyer_policy",
            "start": 4730,
            "end": 4742,
            "label": "lawyer_policy:123:34",
            "source": "bounded_text"
          },
          {
            "file": "lawyer_policy",
            "start": 4758,
            "end": 4770,
            "label": "lawyer_policy:123:62",
            "source": "bounded_text"
          },
          {
            "file": "lawyer_policy",
            "start": 4791,
            "end": 4803,
            "label": "lawyer_policy:124:5",
            "source": "bounded_text"
          },
          {
            "file": "lawyer_policy",
            "start": 4818,
            "end": 4830,
            "label": "lawyer_policy:124:32",
            "source": "bounded_text"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_policy",
        "to": "Icetakes/LawyerPolicy::in_range",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 4876,
            "end": 4884,
            "label": "lawyer_policy:125:5",
            "source": "in_range"
          },
          {
            "file": "lawyer_policy",
            "start": 4905,
            "end": 4913,
            "label": "lawyer_policy:125:34",
            "source": "in_range"
          },
          {
            "file": "lawyer_policy",
            "start": 4941,
            "end": 4949,
            "label": "lawyer_policy:126:5",
            "source": "in_range"
          },
          {
            "file": "lawyer_policy",
            "start": 4971,
            "end": 4979,
            "label": "lawyer_policy:126:35",
            "source": "in_range"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_policy",
        "to": "Icetakes/LawyerPolicy::valid_providers",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 4844,
            "end": 4859,
            "label": "lawyer_policy:124:58",
            "source": "valid_providers"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_providers",
        "to": "Icetakes/LawyerPolicy::bounded_text",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_policy",
            "start": 3415,
            "end": 3427,
            "label": "lawyer_policy:93:18",
            "source": "bounded_text"
          },
          {
            "file": "lawyer_policy",
            "start": 3472,
            "end": 3484,
            "label": "lawyer_policy:95:10",
            "source": "bounded_text"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::api",
        "to": "Icetakes/JudgmentCompletion::complete_judgment",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 6973,
            "end": 6990,
            "label": "lawyer_preparation:167:75",
            "source": "complete_judgment"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::api",
        "to": "Icetakes/LawyerPreparation::prepare_lawyer",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 6655,
            "end": 6669,
            "label": "lawyer_preparation:163:82",
            "source": "prepare_lawyer"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 5071,
            "end": 5081,
            "label": "lawyer_preparation:131:30",
            "source": "jobs_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/JudgmentStore::judgment_tasks_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 5001,
            "end": 5021,
            "label": "lawyer_preparation:130:30",
            "source": "judgment_tasks_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/LawyerPreparation::input_revision",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 4731,
            "end": 4745,
            "label": "lawyer_preparation:126:41",
            "source": "input_revision"
          },
          {
            "file": "lawyer_preparation",
            "start": 4896,
            "end": 4910,
            "label": "lawyer_preparation:129:32",
            "source": "input_revision"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_attempts",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 4751,
            "end": 4766,
            "label": "lawyer_preparation:126:61",
            "source": "lawyer_attempts"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_retry_millis",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 4951,
            "end": 4970,
            "label": "lawyer_preparation:129:87",
            "source": "lawyer_retry_millis"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_stage",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 4712,
            "end": 4724,
            "label": "lawyer_preparation:126:22",
            "source": "lawyer_stage"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::lawyer_ref",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 2199,
            "end": 2215,
            "label": "lawyer_preparation:68:45",
            "source": "contribution_ref"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::lawyer_ref",
        "to": "Icetakes/Identity::frame",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 2172,
            "end": 2177,
            "label": "lawyer_preparation:68:18",
            "source": "frame"
          },
          {
            "file": "lawyer_preparation",
            "start": 2193,
            "end": 2198,
            "label": "lawyer_preparation:68:39",
            "source": "frame"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::lawyer_ref",
        "to": "Icetakes/LawyerPreparation::lawyer_stage",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 2178,
            "end": 2190,
            "label": "lawyer_preparation:68:24",
            "source": "lawyer_stage"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_lawyer",
        "to": "Icetakes/LawyerPreparation::prepare_plan",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 6142,
            "end": 6154,
            "label": "lawyer_preparation:153:3",
            "source": "prepare_plan"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 5397,
            "end": 5407,
            "label": "lawyer_preparation:138:26",
            "source": "jobs_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/JudgmentStore::judgment_tasks_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 5448,
            "end": 5468,
            "label": "lawyer_preparation:139:27",
            "source": "judgment_tasks_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/LawyerPreparation::create_preparation",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 5527,
            "end": 5545,
            "label": "lawyer_preparation:141:24",
            "source": "create_preparation"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/LawyerPreparation::lawyer_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 5357,
            "end": 5367,
            "label": "lawyer_preparation:137:9",
            "source": "lawyer_ref"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/LawyerPreparation::same_preparation",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 5633,
            "end": 5649,
            "label": "lawyer_preparation:143:10",
            "source": "same_preparation"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/LawyerPreparation::source_ready",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 5324,
            "end": 5336,
            "label": "lawyer_preparation:136:27",
            "source": "source_ready"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::require_source",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 2762,
            "end": 2778,
            "label": "lawyer_preparation:81:38",
            "source": "contribution_ref"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::require_source",
        "to": "Icetakes/ContributionModel::input_matches_job",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 2577,
            "end": 2594,
            "label": "lawyer_preparation:77:10",
            "source": "input_matches_job"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::require_source",
        "to": "Icetakes/ContributionModel::same_contribution",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 2532,
            "end": 2549,
            "label": "lawyer_preparation:76:8",
            "source": "same_contribution"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::same_preparation",
        "to": "Icetakes/LawyerPreparation::input_revision",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 3960,
            "end": 3974,
            "label": "lawyer_preparation:107:45",
            "source": "input_revision"
          },
          {
            "file": "lawyer_preparation",
            "start": 4055,
            "end": 4069,
            "label": "lawyer_preparation:109:34",
            "source": "input_revision"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::same_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_retry_millis",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 4159,
            "end": 4178,
            "label": "lawyer_preparation:111:35",
            "source": "lawyer_retry_millis"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::same_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_stage",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 3856,
            "end": 3868,
            "label": "lawyer_preparation:105:34",
            "source": "lawyer_stage"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 3292,
            "end": 3308,
            "label": "lawyer_preparation:93:59",
            "source": "contribution_ref"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::contributions_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 3110,
            "end": 3129,
            "label": "lawyer_preparation:89:30",
            "source": "contributions_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::job_key",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 3470,
            "end": 3477,
            "label": "lawyer_preparation:97:62",
            "source": "job_key"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::jobs_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 3445,
            "end": 3461,
            "label": "lawyer_preparation:97:37",
            "source": "fetch_jobs_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::snapshots_table",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 3268,
            "end": 3283,
            "label": "lawyer_preparation:93:35",
            "source": "snapshots_table"
          }
        ]
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/LawyerPreparation::require_source",
        "kind": "user-reference",
        "locations": [
          {
            "file": "lawyer_preparation",
            "start": 3585,
            "end": 3599,
            "label": "lawyer_preparation:100:29",
            "source": "require_source"
          }
        ]
      }
    ],
    "effects": [
      {
        "binding": "Icetakes/ArticleRetrieval::complete_active",
        "kind": "Read",
        "operation": "tx_database_time_millis",
        "resource": null,
        "location": {
          "file": "article_retrieval",
          "start": 10886,
          "end": 10916,
          "label": "article_retrieval:238:18",
          "source": "tx_database_time_millis(scope)"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::complete_plan",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "retrieval_commands",
        "location": {
          "file": "article_retrieval",
          "start": 11349,
          "end": 11427,
          "label": "article_retrieval:247:23",
          "source": "tx_read(commands_table(scope), owner_key(principal, command_local_key(input)))"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::finish_command",
        "kind": "DbWrite",
        "operation": "tx_write",
        "resource": "retrieval_commands",
        "location": {
          "file": "article_retrieval",
          "start": 5025,
          "end": 5148,
          "label": "article_retrieval:128:16",
          "source": "tx_write(commands_table(scope), owner_key(principal, command_local_key(input)), RetrievalCommand(input, Finished(outcome)))"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::persist_job",
        "kind": "DbWrite",
        "operation": "tx_write",
        "resource": "contribution_jobs",
        "location": {
          "file": "article_retrieval",
          "start": 4740,
          "end": 4814,
          "label": "article_retrieval:122:20",
          "source": "tx_write(jobs_table(scope), job_key(id), ContributionJob(author, updated))"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::prepare_plan",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "retrieval_commands",
        "location": {
          "file": "article_retrieval",
          "start": 8279,
          "end": 8357,
          "label": "article_retrieval:193:27",
          "source": "tx_read(commands_table(scope), owner_key(principal, command_local_key(input)))"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::prepare_plan",
        "kind": "Read",
        "operation": "tx_database_time_millis",
        "resource": null,
        "location": {
          "file": "article_retrieval",
          "start": 8380,
          "end": 8410,
          "label": "article_retrieval:194:22",
          "source": "tx_database_time_millis(scope)"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::read_contribution",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "contributions",
        "location": {
          "file": "article_retrieval",
          "start": 3796,
          "end": 3835,
          "label": "article_retrieval:100:20",
          "source": "tx_read(contributions_table(scope), id)"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::read_fetch_job",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "contribution_jobs",
        "location": {
          "file": "article_retrieval",
          "start": 4063,
          "end": 4102,
          "label": "article_retrieval:106:20",
          "source": "tx_read(jobs_table(scope), job_key(id))"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::record_result",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "article_snapshots",
        "location": {
          "file": "article_retrieval",
          "start": 9926,
          "end": 9971,
          "label": "article_retrieval:221:27",
          "source": "tx_read(snapshots_table(scope), snapshot_ref)"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::record_result",
        "kind": "DbCreate",
        "operation": "tx_insert",
        "resource": "article_snapshots",
        "location": {
          "file": "article_retrieval",
          "start": 10202,
          "end": 10259,
          "label": "article_retrieval:226:24",
          "source": "tx_insert(snapshots_table(scope), snapshot_ref, snapshot)"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::retrieve_contribution",
        "kind": "NetworkFetch",
        "operation": "fetch_article",
        "resource": null,
        "location": {
          "file": "article_retrieval",
          "start": 12410,
          "end": 12432,
          "label": "article_retrieval:271:26",
          "source": "fetch_article(request)"
        }
      },
      {
        "binding": "Icetakes/ArticleRetrieval::start_command",
        "kind": "DbCreate",
        "operation": "tx_insert",
        "resource": "retrieval_commands",
        "location": {
          "file": "article_retrieval",
          "start": 7769,
          "end": 7891,
          "label": "article_retrieval:182:22",
          "source": "tx_insert(commands_table(scope), owner_key(principal, command_local_key(input)), RetrievalCommand(input, Active(context)))"
        }
      },
      {
        "binding": "Icetakes/ContributionIntake::contribution_status",
        "kind": "DbRead",
        "operation": "db_read_opt",
        "resource": "contribution_receipts",
        "location": {
          "file": "contribution_intake",
          "start": 7148,
          "end": 7259,
          "label": "contribution_intake:192:27",
          "source": "db_read_opt(\n        receipt_rows(db),\n        owner_key(principal, command_local_key(idempotency_key))\n      )"
        }
      },
      {
        "binding": "Icetakes/ContributionIntake::contribution_status",
        "kind": "DbRead",
        "operation": "db_read_opt",
        "resource": "contribution_jobs",
        "location": {
          "file": "contribution_intake",
          "start": 7442,
          "end": 7482,
          "label": "contribution_intake:200:30",
          "source": "db_read_opt(job_rows(db), queued_job_id)"
        }
      },
      {
        "binding": "Icetakes/ContributionIntake::create_submission",
        "kind": "DbNextId",
        "operation": "tx_next_id",
        "resource": "contributions",
        "location": {
          "file": "contribution_intake",
          "start": 4740,
          "end": 4778,
          "label": "contribution_intake:128:30",
          "source": "tx_next_id(contributions_table(scope))"
        }
      },
      {
        "binding": "Icetakes/ContributionIntake::create_submission",
        "kind": "Read",
        "operation": "tx_database_time_millis",
        "resource": null,
        "location": {
          "file": "contribution_intake",
          "start": 4797,
          "end": 4827,
          "label": "contribution_intake:129:18",
          "source": "tx_database_time_millis(scope)"
        }
      },
      {
        "binding": "Icetakes/ContributionIntake::create_submission",
        "kind": "DbCreate",
        "operation": "tx_insert",
        "resource": "contributions",
        "location": {
          "file": "contribution_intake",
          "start": 5544,
          "end": 5612,
          "label": "contribution_intake:151:22",
          "source": "tx_insert(contributions_table(scope), contribution_id, contribution)"
        }
      },
      {
        "binding": "Icetakes/ContributionIntake::create_submission",
        "kind": "DbCreate",
        "operation": "tx_insert",
        "resource": "contribution_jobs",
        "location": {
          "file": "contribution_intake",
          "start": 5635,
          "end": 5711,
          "label": "contribution_intake:152:22",
          "source": "tx_insert(jobs_table(scope), queued_job_id, ContributionJob(author_id, job))"
        }
      },
      {
        "binding": "Icetakes/ContributionIntake::create_submission",
        "kind": "DbCreate",
        "operation": "tx_insert",
        "resource": "contribution_receipts",
        "location": {
          "file": "contribution_intake",
          "start": 5734,
          "end": 5788,
          "label": "contribution_intake:153:22",
          "source": "tx_insert(receipts_table(scope), receipt_key, receipt)"
        }
      },
      {
        "binding": "Icetakes/ContributionIntake::submit_plan",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "contribution_receipts",
        "location": {
          "file": "contribution_intake",
          "start": 6217,
          "end": 6260,
          "label": "contribution_intake:166:27",
          "source": "tx_read(receipts_table(scope), receipt_key)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::accepted_attempt",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "judgment_artifacts",
        "location": {
          "file": "judgment_completion",
          "start": 6382,
          "end": 6430,
          "label": "judgment_completion:166:23",
          "source": "tx_read(judgment_artifacts_table(scope), job_id)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::accepted_attempt",
        "kind": "DbWrite",
        "operation": "tx_write",
        "resource": "judgment_artifacts",
        "location": {
          "file": "judgment_completion",
          "start": 6626,
          "end": 6685,
          "label": "judgment_completion:171:20",
          "source": "tx_write(judgment_artifacts_table(scope), job_id, artifact)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::accepted_attempt",
        "kind": "DbWrite",
        "operation": "tx_write",
        "resource": "judgment_attempts",
        "location": {
          "file": "judgment_completion",
          "start": 6706,
          "end": 6767,
          "label": "judgment_completion:172:20",
          "source": "tx_write(judgment_attempts_table(scope), attempt_id, attempt)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::accepted_attempt",
        "kind": "DbWrite",
        "operation": "tx_write",
        "resource": "jobs",
        "location": {
          "file": "judgment_completion",
          "start": 6788,
          "end": 6832,
          "label": "judgment_completion:173:20",
          "source": "tx_write(jobs_table(scope), job_id, updated)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "judgment_attempts",
        "location": {
          "file": "judgment_completion",
          "start": 8719,
          "end": 8770,
          "label": "judgment_completion:222:23",
          "source": "tx_read(judgment_attempts_table(scope), attempt_id)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::malformed_attempt",
        "kind": "DbWrite",
        "operation": "tx_write",
        "resource": "judgment_attempts",
        "location": {
          "file": "judgment_completion",
          "start": 7425,
          "end": 7486,
          "label": "judgment_completion:192:16",
          "source": "tx_write(judgment_attempts_table(scope), attempt_id, attempt)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::malformed_attempt",
        "kind": "DbWrite",
        "operation": "tx_write",
        "resource": "jobs",
        "location": {
          "file": "judgment_completion",
          "start": 7503,
          "end": 7547,
          "label": "judgment_completion:193:16",
          "source": "tx_write(jobs_table(scope), job_id, updated)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "kind": "Read",
        "operation": "tx_database_time_millis",
        "resource": null,
        "location": {
          "file": "judgment_completion",
          "start": 8119,
          "end": 8149,
          "label": "judgment_completion:208:18",
          "source": "tx_database_time_millis(scope)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::read_job",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "jobs",
        "location": {
          "file": "judgment_completion",
          "start": 4653,
          "end": 4674,
          "label": "judgment_completion:118:20",
          "source": "tx_read(jobs, job_id)"
        }
      },
      {
        "binding": "Icetakes/JudgmentCompletion::read_task",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "tasks",
        "location": {
          "file": "judgment_completion",
          "start": 4903,
          "end": 4928,
          "label": "judgment_completion:126:20",
          "source": "tx_read(tasks, input_ref)"
        }
      },
      {
        "binding": "Icetakes/LawyerPolicy::activate_plan",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "lawyer_policy_activations",
        "location": {
          "file": "lawyer_policy",
          "start": 7942,
          "end": 8000,
          "label": "lawyer_policy:186:22",
          "source": "tx_read(activation_receipts_table(scope), policy_ref(key))"
        }
      },
      {
        "binding": "Icetakes/LawyerPolicy::lookup_plan",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "lawyer_policies",
        "location": {
          "file": "lawyer_policy",
          "start": 8806,
          "end": 8858,
          "label": "lawyer_policy:206:21",
          "source": "tx_read(policies_table(scope), policy_ref(revision))"
        }
      },
      {
        "binding": "Icetakes/LawyerPolicy::publish_plan",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "lawyer_policies",
        "location": {
          "file": "lawyer_policy",
          "start": 5651,
          "end": 5686,
          "label": "lawyer_policy:140:25",
          "source": "tx_read(policies_table(scope), key)"
        }
      },
      {
        "binding": "Icetakes/LawyerPolicy::publish_plan",
        "kind": "DbCreate",
        "operation": "tx_insert",
        "resource": "lawyer_policies",
        "location": {
          "file": "lawyer_policy",
          "start": 6038,
          "end": 6083,
          "label": "lawyer_policy:148:22",
          "source": "tx_insert(policies_table(scope), key, stored)"
        }
      },
      {
        "binding": "Icetakes/LawyerPolicy::read_active_policy",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "lawyer_active_policy",
        "location": {
          "file": "lawyer_policy",
          "start": 8602,
          "end": 8646,
          "label": "lawyer_policy:202:3",
          "source": "tx_read(active_policy_table(scope), site_id)"
        }
      },
      {
        "binding": "Icetakes/LawyerPolicy::select_policy",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "lawyer_policies",
        "location": {
          "file": "lawyer_policy",
          "start": 6913,
          "end": 6965,
          "label": "lawyer_policy:169:21",
          "source": "tx_read(policies_table(scope), policy_ref(revision))"
        }
      },
      {
        "binding": "Icetakes/LawyerPolicy::select_policy",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "lawyer_active_policy",
        "location": {
          "file": "lawyer_policy",
          "start": 7165,
          "end": 7209,
          "label": "lawyer_policy:174:28",
          "source": "tx_read(active_policy_table(scope), site_id)"
        }
      },
      {
        "binding": "Icetakes/LawyerPolicy::select_policy",
        "kind": "DbWrite",
        "operation": "tx_write",
        "resource": "lawyer_active_policy",
        "location": {
          "file": "lawyer_policy",
          "start": 7365,
          "end": 7420,
          "label": "lawyer_policy:177:24",
          "source": "tx_write(active_policy_table(scope), site_id, selected)"
        }
      },
      {
        "binding": "Icetakes/LawyerPolicy::select_policy",
        "kind": "DbCreate",
        "operation": "tx_insert",
        "resource": "lawyer_policy_activations",
        "location": {
          "file": "lawyer_policy",
          "start": 7445,
          "end": 7541,
          "label": "lawyer_policy:178:24",
          "source": "tx_insert(activation_receipts_table(scope), policy_ref(key), ActivationReceipt(input, selected))"
        }
      },
      {
        "binding": "Icetakes/LawyerPreparation::create_preparation",
        "kind": "Read",
        "operation": "tx_database_time_millis",
        "resource": null,
        "location": {
          "file": "lawyer_preparation",
          "start": 4659,
          "end": 4689,
          "label": "lawyer_preparation:125:18",
          "source": "tx_database_time_millis(scope)"
        }
      },
      {
        "binding": "Icetakes/LawyerPreparation::create_preparation",
        "kind": "DbCreate",
        "operation": "tx_insert",
        "resource": "judgment_tasks",
        "location": {
          "file": "lawyer_preparation",
          "start": 4991,
          "end": 5040,
          "label": "lawyer_preparation:130:20",
          "source": "tx_insert(judgment_tasks_table(scope), key, task)"
        }
      },
      {
        "binding": "Icetakes/LawyerPreparation::create_preparation",
        "kind": "DbCreate",
        "operation": "tx_insert",
        "resource": "jobs",
        "location": {
          "file": "lawyer_preparation",
          "start": 5061,
          "end": 5099,
          "label": "lawyer_preparation:131:20",
          "source": "tx_insert(jobs_table(scope), key, job)"
        }
      },
      {
        "binding": "Icetakes/LawyerPreparation::prepare_plan",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "jobs",
        "location": {
          "file": "lawyer_preparation",
          "start": 5389,
          "end": 5420,
          "label": "lawyer_preparation:138:18",
          "source": "tx_read(jobs_table(scope), key)"
        }
      },
      {
        "binding": "Icetakes/LawyerPreparation::prepare_plan",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "judgment_tasks",
        "location": {
          "file": "lawyer_preparation",
          "start": 5440,
          "end": 5481,
          "label": "lawyer_preparation:139:19",
          "source": "tx_read(judgment_tasks_table(scope), key)"
        }
      },
      {
        "binding": "Icetakes/LawyerPreparation::source_ready",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "contributions",
        "location": {
          "file": "lawyer_preparation",
          "start": 3102,
          "end": 3141,
          "label": "lawyer_preparation:89:22",
          "source": "tx_read(contributions_table(scope), id)"
        }
      },
      {
        "binding": "Icetakes/LawyerPreparation::source_ready",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "article_snapshots",
        "location": {
          "file": "lawyer_preparation",
          "start": 3260,
          "end": 3313,
          "label": "lawyer_preparation:93:27",
          "source": "tx_read(snapshots_table(scope), contribution_ref(id))"
        }
      },
      {
        "binding": "Icetakes/LawyerPreparation::source_ready",
        "kind": "DbRead",
        "operation": "tx_read",
        "resource": "contribution_jobs",
        "location": {
          "file": "lawyer_preparation",
          "start": 3437,
          "end": 3482,
          "label": "lawyer_preparation:97:29",
          "source": "tx_read(fetch_jobs_table(scope), job_key(id))"
        }
      }
    ],
    "access": {
      "proven": true,
      "specError": null,
      "findings": [
        {
          "package": "Icetakes/LawyerPolicy",
          "binding": "publish_plan",
          "resource": "lawyer_policies",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
        },
        {
          "package": "Icetakes/LawyerPolicy",
          "binding": "publish_plan",
          "resource": "lawyer_policies",
          "operation": "tx_insert",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
        },
        {
          "package": "Icetakes/LawyerPolicy",
          "binding": "select_policy",
          "resource": "lawyer_policies",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
        },
        {
          "package": "Icetakes/LawyerPolicy",
          "binding": "select_policy",
          "resource": "lawyer_active_policy",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
        },
        {
          "package": "Icetakes/LawyerPolicy",
          "binding": "select_policy",
          "resource": "lawyer_active_policy",
          "operation": "tx_write",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
        },
        {
          "package": "Icetakes/LawyerPolicy",
          "binding": "select_policy",
          "resource": "lawyer_policy_activations",
          "operation": "tx_insert",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-policy-manager)"
        },
        {
          "package": "Icetakes/LawyerPolicy",
          "binding": "activate_plan",
          "resource": "lawyer_policy_activations",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-policy-manager)"
        },
        {
          "package": "Icetakes/LawyerPolicy",
          "binding": "read_active_policy",
          "resource": "lawyer_active_policy",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
        },
        {
          "package": "Icetakes/LawyerPolicy",
          "binding": "lookup_plan",
          "resource": "lawyer_policies",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
        },
        {
          "package": "Icetakes/JudgmentCompletion",
          "binding": "read_job",
          "resource": "jobs",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/JudgmentCompletion",
          "binding": "read_task",
          "resource": "judgment_tasks",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/JudgmentCompletion",
          "binding": "accepted_attempt",
          "resource": "judgment_artifacts",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/JudgmentCompletion",
          "binding": "accepted_attempt",
          "resource": "judgment_artifacts",
          "operation": "tx_write",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/JudgmentCompletion",
          "binding": "accepted_attempt",
          "resource": "judgment_attempts",
          "operation": "tx_write",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/JudgmentCompletion",
          "binding": "accepted_attempt",
          "resource": "jobs",
          "operation": "tx_write",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/JudgmentCompletion",
          "binding": "malformed_attempt",
          "resource": "judgment_attempts",
          "operation": "tx_write",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/JudgmentCompletion",
          "binding": "malformed_attempt",
          "resource": "jobs",
          "operation": "tx_write",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/JudgmentCompletion",
          "binding": "completion_attempt_plan",
          "resource": "judgment_attempts",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/ContributionIntake",
          "binding": "create_submission",
          "resource": "contributions",
          "operation": "tx_next_id",
          "kind": "GuardedCreate",
          "status": "holds",
          "detail": "tx_next_id on \"contributions\" touches no existing row"
        },
        {
          "package": "Icetakes/ContributionIntake",
          "binding": "create_submission",
          "resource": "contributions",
          "operation": "tx_insert",
          "kind": "GuardedCreate",
          "status": "holds",
          "detail": "tx_insert on \"contributions\" touches no existing row"
        },
        {
          "package": "Icetakes/ContributionIntake",
          "binding": "create_submission",
          "resource": "contribution_jobs",
          "operation": "tx_insert",
          "kind": "GuardedCreate",
          "status": "holds",
          "detail": "tx_insert on \"contribution_jobs\" touches no existing row"
        },
        {
          "package": "Icetakes/ContributionIntake",
          "binding": "create_submission",
          "resource": "contribution_receipts",
          "operation": "tx_insert",
          "kind": "OwnerKeyProven",
          "status": "holds",
          "detail": "key derives from the authenticated Principal (user_id or owner_key)"
        },
        {
          "package": "Icetakes/ContributionIntake",
          "binding": "submit_plan",
          "resource": "contribution_receipts",
          "operation": "tx_read",
          "kind": "OwnerKeyProven",
          "status": "holds",
          "detail": "key derives from the authenticated Principal (user_id or owner_key)"
        },
        {
          "package": "Icetakes/ContributionIntake",
          "binding": "contribution_status",
          "resource": "contribution_receipts",
          "operation": "db_read_opt",
          "kind": "OwnerKeyProven",
          "status": "holds",
          "detail": "key derives from the authenticated Principal (user_id or owner_key)"
        },
        {
          "package": "Icetakes/ContributionIntake",
          "binding": "contribution_status",
          "resource": "contribution_jobs",
          "operation": "db_read_opt",
          "kind": "GuardedRead",
          "status": "holds",
          "detail": "rows of \"contribution_jobs\" are tainted from here; every use must sit under can_read_contribution_job"
        },
        {
          "package": "Icetakes/LawyerPreparation",
          "binding": "source_ready",
          "resource": "contributions",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/LawyerPreparation",
          "binding": "source_ready",
          "resource": "article_snapshots",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/LawyerPreparation",
          "binding": "source_ready",
          "resource": "contribution_jobs",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/LawyerPreparation",
          "binding": "create_preparation",
          "resource": "judgment_tasks",
          "operation": "tx_insert",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/LawyerPreparation",
          "binding": "create_preparation",
          "resource": "jobs",
          "operation": "tx_insert",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/LawyerPreparation",
          "binding": "prepare_plan",
          "resource": "jobs",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/LawyerPreparation",
          "binding": "prepare_plan",
          "resource": "judgment_tasks",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/ArticleRetrieval",
          "binding": "read_contribution",
          "resource": "contributions",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/ArticleRetrieval",
          "binding": "read_fetch_job",
          "resource": "contribution_jobs",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/ArticleRetrieval",
          "binding": "persist_job",
          "resource": "contribution_jobs",
          "operation": "tx_write",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/ArticleRetrieval",
          "binding": "finish_command",
          "resource": "retrieval_commands",
          "operation": "tx_write",
          "kind": "OwnerKeyProven",
          "status": "holds",
          "detail": "key derives from the authenticated Principal (user_id or owner_key)"
        },
        {
          "package": "Icetakes/ArticleRetrieval",
          "binding": "start_command",
          "resource": "retrieval_commands",
          "operation": "tx_insert",
          "kind": "OwnerKeyProven",
          "status": "holds",
          "detail": "key derives from the authenticated Principal (user_id or owner_key)"
        },
        {
          "package": "Icetakes/ArticleRetrieval",
          "binding": "prepare_plan",
          "resource": "retrieval_commands",
          "operation": "tx_read",
          "kind": "OwnerKeyProven",
          "status": "holds",
          "detail": "key derives from the authenticated Principal (user_id or owner_key)"
        },
        {
          "package": "Icetakes/ArticleRetrieval",
          "binding": "record_result",
          "resource": "article_snapshots",
          "operation": "tx_read",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/ArticleRetrieval",
          "binding": "record_result",
          "resource": "article_snapshots",
          "operation": "tx_insert",
          "kind": "RoleAuthorityProven",
          "status": "holds",
          "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
        },
        {
          "package": "Icetakes/ArticleRetrieval",
          "binding": "complete_plan",
          "resource": "retrieval_commands",
          "operation": "tx_read",
          "kind": "OwnerKeyProven",
          "status": "holds",
          "detail": "key derives from the authenticated Principal (user_id or owner_key)"
        }
      ],
      "resources": [
        {
          "resource": "retrieval_commands",
          "policy": "OwnerScoped",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/ArticleRetrieval",
              "binding": "finish_command",
              "resource": "retrieval_commands",
              "operation": "tx_write",
              "kind": "OwnerKeyProven",
              "status": "holds",
              "detail": "key derives from the authenticated Principal (user_id or owner_key)"
            },
            {
              "package": "Icetakes/ArticleRetrieval",
              "binding": "start_command",
              "resource": "retrieval_commands",
              "operation": "tx_insert",
              "kind": "OwnerKeyProven",
              "status": "holds",
              "detail": "key derives from the authenticated Principal (user_id or owner_key)"
            },
            {
              "package": "Icetakes/ArticleRetrieval",
              "binding": "prepare_plan",
              "resource": "retrieval_commands",
              "operation": "tx_read",
              "kind": "OwnerKeyProven",
              "status": "holds",
              "detail": "key derives from the authenticated Principal (user_id or owner_key)"
            },
            {
              "package": "Icetakes/ArticleRetrieval",
              "binding": "complete_plan",
              "resource": "retrieval_commands",
              "operation": "tx_read",
              "kind": "OwnerKeyProven",
              "status": "holds",
              "detail": "key derives from the authenticated Principal (user_id or owner_key)"
            }
          ]
        },
        {
          "resource": "article_snapshots",
          "policy": "GuardedOrRoles(; requires icetakes-job-manager)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/LawyerPreparation",
              "binding": "source_ready",
              "resource": "article_snapshots",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/ArticleRetrieval",
              "binding": "record_result",
              "resource": "article_snapshots",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/ArticleRetrieval",
              "binding": "record_result",
              "resource": "article_snapshots",
              "operation": "tx_insert",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            }
          ]
        },
        {
          "resource": "contribution_receipts",
          "policy": "OwnerScoped",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/ContributionIntake",
              "binding": "create_submission",
              "resource": "contribution_receipts",
              "operation": "tx_insert",
              "kind": "OwnerKeyProven",
              "status": "holds",
              "detail": "key derives from the authenticated Principal (user_id or owner_key)"
            },
            {
              "package": "Icetakes/ContributionIntake",
              "binding": "submit_plan",
              "resource": "contribution_receipts",
              "operation": "tx_read",
              "kind": "OwnerKeyProven",
              "status": "holds",
              "detail": "key derives from the authenticated Principal (user_id or owner_key)"
            },
            {
              "package": "Icetakes/ContributionIntake",
              "binding": "contribution_status",
              "resource": "contribution_receipts",
              "operation": "db_read_opt",
              "kind": "OwnerKeyProven",
              "status": "holds",
              "detail": "key derives from the authenticated Principal (user_id or owner_key)"
            }
          ]
        },
        {
          "resource": "contributions",
          "policy": "GuardedOrRoles(can_read_contribution; requires icetakes-job-manager)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/ContributionIntake",
              "binding": "create_submission",
              "resource": "contributions",
              "operation": "tx_next_id",
              "kind": "GuardedCreate",
              "status": "holds",
              "detail": "tx_next_id on \"contributions\" touches no existing row"
            },
            {
              "package": "Icetakes/ContributionIntake",
              "binding": "create_submission",
              "resource": "contributions",
              "operation": "tx_insert",
              "kind": "GuardedCreate",
              "status": "holds",
              "detail": "tx_insert on \"contributions\" touches no existing row"
            },
            {
              "package": "Icetakes/LawyerPreparation",
              "binding": "source_ready",
              "resource": "contributions",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/ArticleRetrieval",
              "binding": "read_contribution",
              "resource": "contributions",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            }
          ]
        },
        {
          "resource": "contribution_jobs",
          "policy": "GuardedOrRoles(can_read_contribution_job; requires icetakes-job-manager)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/ContributionIntake",
              "binding": "create_submission",
              "resource": "contribution_jobs",
              "operation": "tx_insert",
              "kind": "GuardedCreate",
              "status": "holds",
              "detail": "tx_insert on \"contribution_jobs\" touches no existing row"
            },
            {
              "package": "Icetakes/ContributionIntake",
              "binding": "contribution_status",
              "resource": "contribution_jobs",
              "operation": "db_read_opt",
              "kind": "GuardedRead",
              "status": "holds",
              "detail": "rows of \"contribution_jobs\" are tainted from here; every use must sit under can_read_contribution_job"
            },
            {
              "package": "Icetakes/LawyerPreparation",
              "binding": "source_ready",
              "resource": "contribution_jobs",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/ArticleRetrieval",
              "binding": "read_fetch_job",
              "resource": "contribution_jobs",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/ArticleRetrieval",
              "binding": "persist_job",
              "resource": "contribution_jobs",
              "operation": "tx_write",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            }
          ]
        },
        {
          "resource": "lawyer_policies",
          "policy": "GuardedOrRoles(; requires icetakes-policy-reader)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/LawyerPolicy",
              "binding": "publish_plan",
              "resource": "lawyer_policies",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
            },
            {
              "package": "Icetakes/LawyerPolicy",
              "binding": "publish_plan",
              "resource": "lawyer_policies",
              "operation": "tx_insert",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
            },
            {
              "package": "Icetakes/LawyerPolicy",
              "binding": "select_policy",
              "resource": "lawyer_policies",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
            },
            {
              "package": "Icetakes/LawyerPolicy",
              "binding": "lookup_plan",
              "resource": "lawyer_policies",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
            }
          ]
        },
        {
          "resource": "lawyer_active_policy",
          "policy": "GuardedOrRoles(; requires icetakes-policy-reader)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/LawyerPolicy",
              "binding": "select_policy",
              "resource": "lawyer_active_policy",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
            },
            {
              "package": "Icetakes/LawyerPolicy",
              "binding": "select_policy",
              "resource": "lawyer_active_policy",
              "operation": "tx_write",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
            },
            {
              "package": "Icetakes/LawyerPolicy",
              "binding": "read_active_policy",
              "resource": "lawyer_active_policy",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-policy-reader)"
            }
          ]
        },
        {
          "resource": "lawyer_policy_activations",
          "policy": "GuardedOrRoles(; requires icetakes-policy-manager)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/LawyerPolicy",
              "binding": "select_policy",
              "resource": "lawyer_policy_activations",
              "operation": "tx_insert",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-policy-manager)"
            },
            {
              "package": "Icetakes/LawyerPolicy",
              "binding": "activate_plan",
              "resource": "lawyer_policy_activations",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-policy-manager)"
            }
          ]
        },
        {
          "resource": "jobs",
          "policy": "GuardedOrRoles(; requires icetakes-job-manager)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/JudgmentCompletion",
              "binding": "read_job",
              "resource": "jobs",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/JudgmentCompletion",
              "binding": "accepted_attempt",
              "resource": "jobs",
              "operation": "tx_write",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/JudgmentCompletion",
              "binding": "malformed_attempt",
              "resource": "jobs",
              "operation": "tx_write",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/LawyerPreparation",
              "binding": "create_preparation",
              "resource": "jobs",
              "operation": "tx_insert",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/LawyerPreparation",
              "binding": "prepare_plan",
              "resource": "jobs",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            }
          ]
        },
        {
          "resource": "judgment_tasks",
          "policy": "GuardedOrRoles(; requires icetakes-job-manager)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/JudgmentCompletion",
              "binding": "read_task",
              "resource": "judgment_tasks",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/LawyerPreparation",
              "binding": "create_preparation",
              "resource": "judgment_tasks",
              "operation": "tx_insert",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/LawyerPreparation",
              "binding": "prepare_plan",
              "resource": "judgment_tasks",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            }
          ]
        },
        {
          "resource": "judgment_attempts",
          "policy": "GuardedOrRoles(; requires icetakes-job-manager)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/JudgmentCompletion",
              "binding": "accepted_attempt",
              "resource": "judgment_attempts",
              "operation": "tx_write",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/JudgmentCompletion",
              "binding": "malformed_attempt",
              "resource": "judgment_attempts",
              "operation": "tx_write",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/JudgmentCompletion",
              "binding": "completion_attempt_plan",
              "resource": "judgment_attempts",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            }
          ]
        },
        {
          "resource": "judgment_artifacts",
          "policy": "GuardedOrRoles(; requires icetakes-job-manager)",
          "status": "holds",
          "proven": true,
          "findings": [
            {
              "package": "Icetakes/JudgmentCompletion",
              "binding": "accepted_attempt",
              "resource": "judgment_artifacts",
              "operation": "tx_read",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            },
            {
              "package": "Icetakes/JudgmentCompletion",
              "binding": "accepted_attempt",
              "resource": "judgment_artifacts",
              "operation": "tx_write",
              "kind": "RoleAuthorityProven",
              "status": "holds",
              "detail": "every route reaching this binding requires every role (icetakes-job-manager)"
            }
          ]
        }
      ]
    },
    "roles": [
      {
        "id": "identity",
        "label": "Site and framed identity",
        "references": [
          "Icetakes/Identity::site_id",
          "Icetakes/Identity::frame",
          "Icetakes/ContributionModel::job_key"
        ]
      },
      {
        "id": "storage",
        "label": "Task and immutable evidence storage",
        "references": [
          "Icetakes/ContributionModel::jobs_table",
          "Icetakes/JudgmentStore::jobs_table",
          "Icetakes/ContributionModel::snapshots_table",
          "Icetakes/JudgmentStore::judgment_tasks_table",
          "Icetakes/JudgmentStore::judgment_attempts_table",
          "Icetakes/LawyerPolicy::active_policy_table"
        ]
      },
      {
        "id": "decoding",
        "label": "Untrusted judgment decoding",
        "references": [
          "Icetakes/Judgment::decode_judgment"
        ]
      }
    ],
    "cells": {
      "Icetakes/ArticleRetrieval::start_command": {
        "identity": {
          "status": "no-reference",
          "witnesses": []
        },
        "storage": {
          "status": "no-reference",
          "witnesses": []
        },
        "decoding": {
          "status": "no-reference",
          "witnesses": []
        }
      },
      "Icetakes/LawyerPreparation::create_preparation": {
        "identity": {
          "status": "no-reference",
          "witnesses": []
        },
        "storage": {
          "status": "observed",
          "witnesses": [
            {
              "from": "Icetakes/LawyerPreparation::create_preparation",
              "to": "Icetakes/JudgmentStore::jobs_table",
              "kind": "user-reference",
              "locations": [
                {
                  "file": "lawyer_preparation",
                  "start": 5071,
                  "end": 5081,
                  "label": "lawyer_preparation:131:30",
                  "source": "jobs_table"
                }
              ]
            },
            {
              "from": "Icetakes/LawyerPreparation::create_preparation",
              "to": "Icetakes/JudgmentStore::judgment_tasks_table",
              "kind": "user-reference",
              "locations": [
                {
                  "file": "lawyer_preparation",
                  "start": 5001,
                  "end": 5021,
                  "label": "lawyer_preparation:130:30",
                  "source": "judgment_tasks_table"
                }
              ]
            }
          ]
        },
        "decoding": {
          "status": "no-reference",
          "witnesses": []
        }
      },
      "Icetakes/JudgmentCompletion::new_completion_attempt": {
        "identity": {
          "status": "no-reference",
          "witnesses": []
        },
        "storage": {
          "status": "observed",
          "witnesses": [
            {
              "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
              "to": "Icetakes/JudgmentStore::jobs_table",
              "kind": "user-reference",
              "locations": [
                {
                  "file": "judgment_completion",
                  "start": 7857,
                  "end": 7867,
                  "label": "judgment_completion:203:31",
                  "source": "jobs_table"
                }
              ]
            },
            {
              "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
              "to": "Icetakes/JudgmentStore::judgment_tasks_table",
              "kind": "user-reference",
              "locations": [
                {
                  "file": "judgment_completion",
                  "start": 7993,
                  "end": 8013,
                  "label": "judgment_completion:206:29",
                  "source": "judgment_tasks_table"
                }
              ]
            }
          ]
        },
        "decoding": {
          "status": "observed",
          "witnesses": [
            {
              "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
              "to": "Icetakes/Judgment::decode_judgment",
              "kind": "user-reference",
              "locations": [
                {
                  "file": "judgment_completion",
                  "start": 8216,
                  "end": 8231,
                  "label": "judgment_completion:210:9",
                  "source": "decode_judgment"
                }
              ]
            }
          ]
        }
      },
      "Icetakes/LawyerPolicy::activate_plan": {
        "identity": {
          "status": "no-reference",
          "witnesses": []
        },
        "storage": {
          "status": "no-reference",
          "witnesses": []
        },
        "decoding": {
          "status": "no-reference",
          "witnesses": []
        }
      }
    },
    "scope": "All user-binding references, including self references, in this compiled snapshot. References may pass functions as values; they do not assert execution. Role cells cover only their explicitly listed targets. Effects are recognized direct primitive sites, not a transitive execution trace. Locations may be unavailable after compilation. Groups and role meanings are authored; they do not prove encapsulation, coherence or policy correctness."
  },
  "map": {
    "ok": true,
    "tool": "api_abstraction_map",
    "schemaVersion": "abstraction-map-1.3",
    "invariant": "Every measurement comes from the typed, compiled program: layer = longest dependency path to a leaf (0 = no user-definition dependencies), fanOut = direct dependencies, edge span = layer difference, size = node count of the compiled definition, repeatedBlockMass = redundant mass of shape-isomorphic blocks (locals and literals erased) repeated inside one body, clonePairs = whole bodies isomorphic with literals kept (same compiled structure, not proof of intended reuse). signatureId is the fully qualified checked signature from the type vocabulary; signature is its display label. These are structural measurements, not a quality verdict. A scoped browser view or a shared signature does not establish behavioral equivalence, an access policy, or intended architecture.",
    "nodes": [
      {
        "id": "Icetakes/ArticleRetrieval::access_rules",
        "package": "Icetakes/ArticleRetrieval",
        "name": "access_rules",
        "signature": "Yichus/Access::AccessSpec",
        "signatureId": "Yichus/Access::AccessSpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 22,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::commands_table",
        "package": "Icetakes/ArticleRetrieval",
        "name": "commands_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, RetrievalCommand]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ArticleRetrieval::RetrievalCommand]",
        "exported": false,
        "layer": 0,
        "fanIn": 4,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::contribution_id",
        "package": "Icetakes/ArticleRetrieval",
        "name": "contribution_id",
        "signature": "Contribution -> String",
        "signatureId": "Icetakes/ContributionModel::Contribution -> Bosatsu/Predef::String",
        "exported": false,
        "layer": 0,
        "fanIn": 4,
        "fanOut": 0,
        "size": 3,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::fetch_transition",
        "package": "Icetakes/ArticleRetrieval",
        "name": "fetch_transition",
        "signature": "(Yichus/Job::Job, Yichus/Job::LeaseToken, String, Yichus/ArticleFetch::ArticleFetchResult, Int, String) -> Yichus/Job::JobResult",
        "signatureId": "(Yichus/Job::Job, Yichus/Job::LeaseToken, Bosatsu/Predef::String, Yichus/ArticleFetch::ArticleFetchResult, Bosatsu/Predef::Int, Bosatsu/Predef::String) -> Yichus/Job::JobResult",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 59,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::retrieval_reading",
        "package": "Icetakes/ArticleRetrieval",
        "name": "retrieval_reading",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 94,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::retrieval_tables",
        "package": "Icetakes/ArticleRetrieval",
        "name": "retrieval_tables",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 7,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::same_command",
        "package": "Icetakes/ArticleRetrieval",
        "name": "same_command",
        "signature": "(RetrieveContributionInput, RetrieveContributionInput) -> Bool",
        "signatureId": "(Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::RetrieveContributionInput) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 31,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::access_rules",
        "package": "Icetakes/ContributionIntake",
        "name": "access_rules",
        "signature": "Yichus/Access::AccessSpec",
        "signatureId": "Yichus/Access::AccessSpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 40,
        "repeatedBlockMass": 13,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 2
      },
      {
        "id": "Icetakes/ContributionIntake::can_read_contribution",
        "package": "Icetakes/ContributionIntake",
        "name": "can_read_contribution",
        "signature": "(String, Contribution) -> Bool",
        "signatureId": "(Bosatsu/Predef::String, Icetakes/ContributionModel::Contribution) -> Bosatsu/Predef::Bool",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 8,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::can_read_contribution_job",
        "package": "Icetakes/ContributionIntake",
        "name": "can_read_contribution_job",
        "signature": "(String, ContributionJob) -> Bool",
        "signatureId": "(Bosatsu/Predef::String, Icetakes/ContributionModel::ContributionJob) -> Bosatsu/Predef::Bool",
        "exported": true,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 8,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::charter_version",
        "package": "Icetakes/ContributionIntake",
        "name": "charter_version",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 1,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::fetch_max_attempts",
        "package": "Icetakes/ContributionIntake",
        "name": "fetch_max_attempts",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 1,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::frontend",
        "package": "Icetakes/ContributionIntake",
        "name": "frontend",
        "signature": "Yichus/Frontend::FrontendSpec",
        "signatureId": "Yichus/Frontend::FrontendSpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 18,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::intake_reading",
        "package": "Icetakes/ContributionIntake",
        "name": "intake_reading",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 64,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::intake_tables",
        "package": "Icetakes/ContributionIntake",
        "name": "intake_tables",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 7,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::receipt_rows",
        "package": "Icetakes/ContributionIntake",
        "name": "receipt_rows",
        "signature": "Yichus/Data::Db -> Yichus/Data::Table[SubmissionReceipt]",
        "signatureId": "Yichus/Data::Db -> Yichus/Data::Table[Icetakes/ContributionIntake::SubmissionReceipt]",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::receipts_table",
        "package": "Icetakes/ContributionIntake",
        "name": "receipts_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, SubmissionReceipt]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ContributionIntake::SubmissionReceipt]",
        "exported": false,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::contribution_reading",
        "package": "Icetakes/ContributionModel",
        "name": "contribution_reading",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 64,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::contribution_tables",
        "package": "Icetakes/ContributionModel",
        "name": "contribution_tables",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 13,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::contributions_table",
        "package": "Icetakes/ContributionModel",
        "name": "contributions_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Contribution]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ContributionModel::Contribution]",
        "exported": true,
        "layer": 0,
        "fanIn": 3,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::fetch_stage",
        "package": "Icetakes/ContributionModel",
        "name": "fetch_stage",
        "signature": "String",
        "signatureId": "Bosatsu/Predef::String",
        "exported": true,
        "layer": 0,
        "fanIn": 3,
        "fanOut": 0,
        "size": 1,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::job_rows",
        "package": "Icetakes/ContributionModel",
        "name": "job_rows",
        "signature": "Yichus/Data::Db -> Yichus/Data::Table[ContributionJob]",
        "signatureId": "Yichus/Data::Db -> Yichus/Data::Table[Icetakes/ContributionModel::ContributionJob]",
        "exported": true,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::jobs_table",
        "package": "Icetakes/ContributionModel",
        "name": "jobs_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, ContributionJob]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ContributionModel::ContributionJob]",
        "exported": true,
        "layer": 0,
        "fanIn": 4,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::over_limit",
        "package": "Icetakes/ContributionModel",
        "name": "over_limit",
        "signature": "(String, Int) -> Bool",
        "signatureId": "(Bosatsu/Predef::String, Bosatsu/Predef::Int) -> Bosatsu/Predef::Bool",
        "exported": true,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 20,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::progress_state",
        "package": "Icetakes/ContributionModel",
        "name": "progress_state",
        "signature": "Yichus/Job::JobState -> ContributionProgressState",
        "signatureId": "Yichus/Job::JobState -> Icetakes/ContributionModel::ContributionProgressState",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 22,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::same_urgency",
        "package": "Icetakes/ContributionModel",
        "name": "same_urgency",
        "signature": "(Urgency, Urgency) -> Bool",
        "signatureId": "(Icetakes/ContributionModel::Urgency, Icetakes/ContributionModel::Urgency) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 22,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::snapshots_table",
        "package": "Icetakes/ContributionModel",
        "name": "snapshots_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, ArticleSnapshot]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/ContributionModel::ArticleSnapshot]",
        "exported": true,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Identity::frame",
        "package": "Icetakes/Identity",
        "name": "frame",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "layer": 0,
        "fanIn": 7,
        "fanOut": 0,
        "size": 17,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Identity::site_id",
        "package": "Icetakes/Identity",
        "name": "site_id",
        "signature": "String",
        "signatureId": "Bosatsu/Predef::String",
        "exported": true,
        "layer": 0,
        "fanIn": 10,
        "fanOut": 0,
        "size": 1,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::judgment_reading",
        "package": "Icetakes/Judgment",
        "name": "judgment_reading",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 100,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::member_evidence",
        "package": "Icetakes/Judgment",
        "name": "member_evidence",
        "signature": "(List[EvidenceRef], String) -> Bool",
        "signatureId": "(Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef], Bosatsu/Predef::String) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 66,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::member_string",
        "package": "Icetakes/Judgment",
        "name": "member_string",
        "signature": "(List[String], String) -> Bool",
        "signatureId": "(Bosatsu/Predef::List[Bosatsu/Predef::String], Bosatsu/Predef::String) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 59,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::nonempty_string",
        "package": "Icetakes/Judgment",
        "name": "nonempty_string",
        "signature": "(String, Yichus/Json::Json) -> Yichus/Json::DecodeResult[String]",
        "signatureId": "(Bosatsu/Predef::String, Yichus/Json::Json) -> Yichus/Json::DecodeResult[Bosatsu/Predef::String]",
        "exported": false,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 29,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::required_basis_points",
        "package": "Icetakes/Judgment",
        "name": "required_basis_points",
        "signature": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Int]",
        "signatureId": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Bosatsu/Predef::Int]",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 64,
        "repeatedBlockMass": 10,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 2
      },
      {
        "id": "Icetakes/Judgment::required_event_time",
        "package": "Icetakes/Judgment",
        "name": "required_event_time",
        "signature": "Yichus/Json::Json -> Yichus/Json::DecodeResult[EventTimeEstimate]",
        "signatureId": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Icetakes/Judgment::EventTimeEstimate]",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 26,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::role_value_decoders",
        "package": "Icetakes/Judgment",
        "name": "role_value_decoders",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 13,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::apply_job_result",
        "package": "Icetakes/JudgmentCompletion",
        "name": "apply_job_result",
        "signature": "forall a: *. Yichus/Job::JobResult -> Yichus/Transaction::Txn[a, CompletionError, Yichus/Job::Job]",
        "signatureId": "forall a: *. Yichus/Job::JobResult -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Yichus/Job::Job]",
        "exported": false,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 18,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::completion_reading",
        "package": "Icetakes/JudgmentCompletion",
        "name": "completion_reading",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 100,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::nonnegative",
        "package": "Icetakes/JudgmentCompletion",
        "name": "nonnegative",
        "signature": "Int -> Bool",
        "signatureId": "Bosatsu/Predef::Int -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 16,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::read_job",
        "package": "Icetakes/JudgmentCompletion",
        "name": "read_job",
        "signature": "forall a: *. (Yichus/Transaction::TxTable[a, Yichus/Job::Job], String) -> Yichus/Transaction::Txn[a, CompletionError, Yichus/Job::Job]",
        "signatureId": "forall a: *. (Yichus/Transaction::TxTable[a, Yichus/Job::Job], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Yichus/Job::Job]",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 23,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::read_task",
        "package": "Icetakes/JudgmentCompletion",
        "name": "read_task",
        "signature": "forall a: *. (Yichus/Transaction::TxTable[a, JudgmentTask], String) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentTask]",
        "signatureId": "forall a: *. (Yichus/Transaction::TxTable[a, Icetakes/JudgmentStore::JudgmentTask], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentTask]",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 23,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::require_task_matches_job",
        "package": "Icetakes/JudgmentCompletion",
        "name": "require_task_matches_job",
        "signature": "forall a: *. (JudgmentTask, String, Int) -> Yichus/Transaction::Txn[a, CompletionError, ()]",
        "signatureId": "forall a: *. (Icetakes/JudgmentStore::JudgmentTask, Bosatsu/Predef::String, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, ()]",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 48,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::same_lease",
        "package": "Icetakes/JudgmentCompletion",
        "name": "same_lease",
        "signature": "(Yichus/Job::LeaseToken, Yichus/Job::LeaseToken) -> Bool",
        "signatureId": "(Yichus/Job::LeaseToken, Yichus/Job::LeaseToken) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 91,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::same_model_completion",
        "package": "Icetakes/JudgmentCompletion",
        "name": "same_model_completion",
        "signature": "(ModelCompletion, ModelCompletion) -> Bool",
        "signatureId": "(Icetakes/JudgmentStore::ModelCompletion, Icetakes/JudgmentStore::ModelCompletion) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 111,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentStore::jobs_table",
        "package": "Icetakes/JudgmentStore",
        "name": "jobs_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Yichus/Job::Job]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Yichus/Job::Job]",
        "exported": true,
        "layer": 0,
        "fanIn": 5,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentStore::judgment_artifacts_table",
        "package": "Icetakes/JudgmentStore",
        "name": "judgment_artifacts_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, JudgmentArtifact]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/JudgmentStore::JudgmentArtifact]",
        "exported": true,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentStore::judgment_attempts_table",
        "package": "Icetakes/JudgmentStore",
        "name": "judgment_attempts_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, JudgmentAttempt]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": true,
        "layer": 0,
        "fanIn": 3,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentStore::judgment_tables",
        "package": "Icetakes/JudgmentStore",
        "name": "judgment_tables",
        "signature": "Yichus/Organize::FamilySpec",
        "signatureId": "Yichus/Organize::FamilySpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 16,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentStore::judgment_tasks_table",
        "package": "Icetakes/JudgmentStore",
        "name": "judgment_tasks_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, JudgmentTask]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/JudgmentStore::JudgmentTask]",
        "exported": true,
        "layer": 0,
        "fanIn": 3,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::access_rules",
        "package": "Icetakes/LawyerPolicy",
        "name": "access_rules",
        "signature": "Yichus/Access::AccessSpec",
        "signatureId": "Yichus/Access::AccessSpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 40,
        "repeatedBlockMass": 20,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 3
      },
      {
        "id": "Icetakes/LawyerPolicy::activation_receipts_table",
        "package": "Icetakes/LawyerPolicy",
        "name": "activation_receipts_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, ActivationReceipt]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/LawyerPolicy::ActivationReceipt]",
        "exported": false,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::active_generation",
        "package": "Icetakes/LawyerPolicy",
        "name": "active_generation",
        "signature": "Option[ActivePolicy] -> Int",
        "signatureId": "Bosatsu/Predef::Option[Icetakes/LawyerPolicy::ActivePolicy] -> Bosatsu/Predef::Int",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 15,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::active_policy_table",
        "package": "Icetakes/LawyerPolicy",
        "name": "active_policy_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, ActivePolicy]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/LawyerPolicy::ActivePolicy]",
        "exported": true,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::all_true",
        "package": "Icetakes/LawyerPolicy",
        "name": "all_true",
        "signature": "List[Bool] -> Bool",
        "signatureId": "Bosatsu/Predef::List[Bosatsu/Predef::Bool] -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 7,
        "fanOut": 0,
        "size": 61,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::bounded_text",
        "package": "Icetakes/LawyerPolicy",
        "name": "bounded_text",
        "signature": "(String, Int) -> Bool",
        "signatureId": "(Bosatsu/Predef::String, Bosatsu/Predef::Int) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 3,
        "fanOut": 0,
        "size": 42,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::in_range",
        "package": "Icetakes/LawyerPolicy",
        "name": "in_range",
        "signature": "(Int, Int, Int) -> Bool",
        "signatureId": "(Bosatsu/Predef::Int, Bosatsu/Predef::Int, Bosatsu/Predef::Int) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 34,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::policies_table",
        "package": "Icetakes/LawyerPolicy",
        "name": "policies_table",
        "signature": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, PolicyRevision]",
        "signatureId": "forall a: *. Yichus/Transaction::Scope[a] -> Yichus/Transaction::TxTable[a, Icetakes/LawyerPolicy::PolicyRevision]",
        "exported": true,
        "layer": 0,
        "fanIn": 3,
        "fanOut": 0,
        "size": 5,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::policy_reading",
        "package": "Icetakes/LawyerPolicy",
        "name": "policy_reading",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 40,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::provider_policy",
        "package": "Icetakes/LawyerPolicy",
        "name": "provider_policy",
        "signature": "LawyerPolicy -> Yichus/OpenRouter::ProviderPolicy",
        "signatureId": "Icetakes/LawyerPolicy::LawyerPolicy -> Yichus/OpenRouter::ProviderPolicy",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 11,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::same_providers",
        "package": "Icetakes/LawyerPolicy",
        "name": "same_providers",
        "signature": "(List[String], List[String]) -> Bool",
        "signatureId": "(Bosatsu/Predef::List[Bosatsu/Predef::String], Bosatsu/Predef::List[Bosatsu/Predef::String]) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 84,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::access_rules",
        "package": "Icetakes/LawyerPreparation",
        "name": "access_rules",
        "signature": "Yichus/Access::AccessSpec",
        "signatureId": "Yichus/Access::AccessSpec",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 52,
        "repeatedBlockMass": 30,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 4
      },
      {
        "id": "Icetakes/LawyerPreparation::input_revision",
        "package": "Icetakes/LawyerPreparation",
        "name": "input_revision",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 1,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::lawyer_attempts",
        "package": "Icetakes/LawyerPreparation",
        "name": "lawyer_attempts",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "layer": 0,
        "fanIn": 1,
        "fanOut": 0,
        "size": 1,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::lawyer_retry_millis",
        "package": "Icetakes/LawyerPreparation",
        "name": "lawyer_retry_millis",
        "signature": "Int",
        "signatureId": "Bosatsu/Predef::Int",
        "exported": false,
        "layer": 0,
        "fanIn": 2,
        "fanOut": 0,
        "size": 1,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::lawyer_stage",
        "package": "Icetakes/LawyerPreparation",
        "name": "lawyer_stage",
        "signature": "String",
        "signatureId": "Bosatsu/Predef::String",
        "exported": true,
        "layer": 0,
        "fanIn": 3,
        "fanOut": 0,
        "size": 1,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::preparation_reading",
        "package": "Icetakes/LawyerPreparation",
        "name": "preparation_reading",
        "signature": "Yichus/Organize::ReadingOrder",
        "signatureId": "Yichus/Organize::ReadingOrder",
        "exported": true,
        "layer": 0,
        "fanIn": 0,
        "fanOut": 0,
        "size": 52,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::command_local_key",
        "package": "Icetakes/ArticleRetrieval",
        "name": "command_local_key",
        "signature": "RetrieveContributionInput -> String",
        "signatureId": "Icetakes/ArticleRetrieval::RetrieveContributionInput -> Bosatsu/Predef::String",
        "exported": true,
        "layer": 1,
        "fanIn": 4,
        "fanOut": 2,
        "size": 22,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::fetch_request",
        "package": "Icetakes/ArticleRetrieval",
        "name": "fetch_request",
        "signature": "(Contribution, Yichus/Job::Job) -> Yichus/ArticleFetch::ArticleRequest",
        "signatureId": "(Icetakes/ContributionModel::Contribution, Yichus/Job::Job) -> Yichus/ArticleFetch::ArticleRequest",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 1,
        "size": 36,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::read_contribution",
        "package": "Icetakes/ArticleRetrieval",
        "name": "read_contribution",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], String) -> Yichus/Transaction::Txn[a, RetrievalError, Contribution]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ContributionModel::Contribution]",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 1,
        "size": 22,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::command_local_key",
        "package": "Icetakes/ContributionIntake",
        "name": "command_local_key",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": false,
        "layer": 1,
        "fanIn": 2,
        "fanOut": 2,
        "size": 19,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::contribution_progress",
        "package": "Icetakes/ContributionModel",
        "name": "contribution_progress",
        "signature": "Yichus/Job::Job -> ContributionProgress",
        "signatureId": "Yichus/Job::Job -> Icetakes/ContributionModel::ContributionProgress",
        "exported": true,
        "layer": 1,
        "fanIn": 2,
        "fanOut": 1,
        "size": 17,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::contribution_ref",
        "package": "Icetakes/ContributionModel",
        "name": "contribution_ref",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "layer": 1,
        "fanIn": 7,
        "fanOut": 2,
        "size": 14,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::job_key",
        "package": "Icetakes/ContributionModel",
        "name": "job_key",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "layer": 1,
        "fanIn": 5,
        "fanOut": 2,
        "size": 14,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::same_content",
        "package": "Icetakes/ContributionModel",
        "name": "same_content",
        "signature": "((String, String, Urgency), (String, String, Urgency)) -> Bool",
        "signatureId": "((Bosatsu/Predef::String, Bosatsu/Predef::String, Icetakes/ContributionModel::Urgency), (Bosatsu/Predef::String, Bosatsu/Predef::String, Icetakes/ContributionModel::Urgency)) -> Bosatsu/Predef::Bool",
        "exported": true,
        "layer": 1,
        "fanIn": 2,
        "fanOut": 1,
        "size": 51,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::validate_idempotency_key",
        "package": "Icetakes/ContributionModel",
        "name": "validate_idempotency_key",
        "signature": "String -> Option[SubmissionError]",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::Option[Icetakes/ContributionModel::SubmissionError]",
        "exported": true,
        "layer": 1,
        "fanIn": 3,
        "fanOut": 1,
        "size": 40,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::decode_evidence_ref",
        "package": "Icetakes/Judgment",
        "name": "decode_evidence_ref",
        "signature": "(Yichus/Json::Json, List[EvidenceRef], List[EvidenceRef]) -> Yichus/Json::DecodeResult[EvidenceRef]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef], Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::EvidenceRef]",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 1,
        "size": 67,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::expected_fields",
        "package": "Icetakes/Judgment",
        "name": "expected_fields",
        "signature": "(List[String], List[(String, Yichus/Json::Json)]) -> Yichus/Json::DecodeResult[()]",
        "signatureId": "(Bosatsu/Predef::List[Bosatsu/Predef::String], Bosatsu/Predef::List[(Bosatsu/Predef::String, Yichus/Json::Json)]) -> Yichus/Json::DecodeResult[()]",
        "exported": false,
        "layer": 1,
        "fanIn": 3,
        "fanOut": 1,
        "size": 72,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::required_brief_bullets",
        "package": "Icetakes/Judgment",
        "name": "required_brief_bullets",
        "signature": "Yichus/Json::Json -> Yichus/Json::DecodeResult[List[String]]",
        "signatureId": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Bosatsu/Predef::List[Bosatsu/Predef::String]]",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 1,
        "size": 94,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::required_nonempty_string",
        "package": "Icetakes/Judgment",
        "name": "required_nonempty_string",
        "signature": "(String, Yichus/Json::Json) -> Yichus/Json::DecodeResult[String]",
        "signatureId": "(Bosatsu/Predef::String, Yichus/Json::Json) -> Yichus/Json::DecodeResult[Bosatsu/Predef::String]",
        "exported": false,
        "layer": 1,
        "fanIn": 4,
        "fanOut": 1,
        "size": 13,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::accepted_attempt",
        "package": "Icetakes/JudgmentCompletion",
        "name": "accepted_attempt",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Job::Job, JudgmentTask, CompleteJudgmentInput, String, Judgment, Int) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Job::Job, Icetakes/JudgmentStore::JudgmentTask, Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String, Icetakes/Judgment::Judgment, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 4,
        "size": 148,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::malformed_attempt",
        "package": "Icetakes/JudgmentCompletion",
        "name": "malformed_attempt",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Job::Job, JudgmentTask, CompleteJudgmentInput, String, String, String, Int) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Job::Job, Icetakes/JudgmentStore::JudgmentTask, Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String, Bosatsu/Predef::String, Bosatsu/Predef::String, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 3,
        "size": 72,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::same_completion_input",
        "package": "Icetakes/JudgmentCompletion",
        "name": "same_completion_input",
        "signature": "(CompleteJudgmentInput, CompleteJudgmentInput) -> Bool",
        "signatureId": "(Icetakes/JudgmentStore::CompleteJudgmentInput, Icetakes/JudgmentStore::CompleteJudgmentInput) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 2,
        "size": 71,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::validate_model_completion",
        "package": "Icetakes/JudgmentCompletion",
        "name": "validate_model_completion",
        "signature": "ModelCompletion -> Option[CompletionError]",
        "signatureId": "Icetakes/JudgmentStore::ModelCompletion -> Bosatsu/Predef::Option[Icetakes/JudgmentCompletion::CompletionError]",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 1,
        "size": 103,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::policy_ref",
        "package": "Icetakes/LawyerPolicy",
        "name": "policy_ref",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "layer": 1,
        "fanIn": 4,
        "fanOut": 2,
        "size": 14,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::read_active_policy",
        "package": "Icetakes/LawyerPolicy",
        "name": "read_active_policy",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PolicyError, Option[ActivePolicy]]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPolicy::PolicyError, Bosatsu/Predef::Option[Icetakes/LawyerPolicy::ActivePolicy]]]",
        "exported": true,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 2,
        "size": 11,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::same_activation",
        "package": "Icetakes/LawyerPolicy",
        "name": "same_activation",
        "signature": "(ActivatePolicyInput, ActivatePolicyInput) -> Bool",
        "signatureId": "(Icetakes/LawyerPolicy::ActivatePolicyInput, Icetakes/LawyerPolicy::ActivatePolicyInput) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 1,
        "size": 51,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::same_policy",
        "package": "Icetakes/LawyerPolicy",
        "name": "same_policy",
        "signature": "(LawyerPolicy, LawyerPolicy) -> Bool",
        "signatureId": "(Icetakes/LawyerPolicy::LawyerPolicy, Icetakes/LawyerPolicy::LawyerPolicy) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 2,
        "size": 166,
        "repeatedBlockMass": 51,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 4
      },
      {
        "id": "Icetakes/LawyerPolicy::valid_providers",
        "package": "Icetakes/LawyerPolicy",
        "name": "valid_providers",
        "signature": "List[String] -> Bool",
        "signatureId": "Bosatsu/Predef::List[Bosatsu/Predef::String] -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 1,
        "size": 79,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::create_preparation",
        "package": "Icetakes/LawyerPreparation",
        "name": "create_preparation",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], String, String) -> Yichus/Transaction::Txn[a, PreparationError, LawyerPrepared]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Bosatsu/Predef::String, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPreparation::PreparationError, Icetakes/LawyerPreparation::LawyerPrepared]",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 6,
        "size": 91,
        "repeatedBlockMass": 9,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 2
      },
      {
        "id": "Icetakes/LawyerPreparation::same_preparation",
        "package": "Icetakes/LawyerPreparation",
        "name": "same_preparation",
        "signature": "(Yichus/Job::Job, JudgmentTask, String, String) -> Bool",
        "signatureId": "(Yichus/Job::Job, Icetakes/JudgmentStore::JudgmentTask, Bosatsu/Predef::String, Bosatsu/Predef::String) -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 1,
        "fanIn": 1,
        "fanOut": 3,
        "size": 157,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::finish_command",
        "package": "Icetakes/ArticleRetrieval",
        "name": "finish_command",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, RetrievalOutcome) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::RetrievalOutcome) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "layer": 2,
        "fanIn": 3,
        "fanOut": 2,
        "size": 27,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::persist_job",
        "package": "Icetakes/ArticleRetrieval",
        "name": "persist_job",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Contribution, Yichus/Job::JobResult) -> Yichus/Transaction::Txn[a, RetrievalError, Yichus/Job::Job]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/ContributionModel::Contribution, Yichus/Job::JobResult) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Yichus/Job::Job]",
        "exported": false,
        "layer": 2,
        "fanIn": 4,
        "fanOut": 2,
        "size": 40,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::read_fetch_job",
        "package": "Icetakes/ArticleRetrieval",
        "name": "read_fetch_job",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], String) -> Yichus/Transaction::Txn[a, RetrievalError, ContributionJob]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ContributionModel::ContributionJob]",
        "exported": false,
        "layer": 2,
        "fanIn": 3,
        "fanOut": 2,
        "size": 24,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::contribution_status",
        "package": "Icetakes/ContributionIntake",
        "name": "contribution_status",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, SubmissionStatusInput) -> Yichus/IO::IO[SubmissionStatus]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/ContributionIntake::SubmissionStatusInput) -> Yichus/IO::IO[Icetakes/ContributionIntake::SubmissionStatus]",
        "exported": true,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 6,
        "size": 104,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::create_submission",
        "package": "Icetakes/ContributionIntake",
        "name": "create_submission",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, SubmitContributionInput, String) -> Yichus/Transaction::Txn[a, SubmissionError, SubmissionReceipt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ContributionIntake::SubmitContributionInput, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/ContributionModel::SubmissionError, Icetakes/ContributionIntake::SubmissionReceipt]",
        "exported": false,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 9,
        "size": 160,
        "repeatedBlockMass": 11,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 2
      },
      {
        "id": "Icetakes/ContributionIntake::same_submission",
        "package": "Icetakes/ContributionIntake",
        "name": "same_submission",
        "signature": "(SubmitContributionInput, SubmitContributionInput) -> Bool",
        "signatureId": "(Icetakes/ContributionIntake::SubmitContributionInput, Icetakes/ContributionIntake::SubmitContributionInput) -> Bosatsu/Predef::Bool",
        "exported": true,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 1,
        "size": 51,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::validate_submission",
        "package": "Icetakes/ContributionIntake",
        "name": "validate_submission",
        "signature": "SubmitContributionInput -> Option[SubmissionError]",
        "signatureId": "Icetakes/ContributionIntake::SubmitContributionInput -> Bosatsu/Predef::Option[Icetakes/ContributionModel::SubmissionError]",
        "exported": true,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 2,
        "size": 104,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionModel::input_matches_job",
        "package": "Icetakes/ContributionModel",
        "name": "input_matches_job",
        "signature": "(Contribution, ContributionJob) -> Bool",
        "signatureId": "(Icetakes/ContributionModel::Contribution, Icetakes/ContributionModel::ContributionJob) -> Bosatsu/Predef::Bool",
        "exported": true,
        "layer": 2,
        "fanIn": 2,
        "fanOut": 4,
        "size": 128,
        "repeatedBlockMass": 16,
        "repeatedBlockGroups": 2,
        "repeatedBlockInstances": 4
      },
      {
        "id": "Icetakes/ContributionModel::same_contribution",
        "package": "Icetakes/ContributionModel",
        "name": "same_contribution",
        "signature": "(Contribution, Contribution) -> Bool",
        "signatureId": "(Icetakes/ContributionModel::Contribution, Icetakes/ContributionModel::Contribution) -> Bosatsu/Predef::Bool",
        "exported": true,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 1,
        "size": 131,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::decode_evidence_refs",
        "package": "Icetakes/Judgment",
        "name": "decode_evidence_refs",
        "signature": "(List[Yichus/Json::Json], List[EvidenceRef], List[EvidenceRef]) -> Yichus/Json::DecodeResult[List[EvidenceRef]]",
        "signatureId": "(Bosatsu/Predef::List[Yichus/Json::Json], Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef], Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]]",
        "exported": false,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 1,
        "size": 81,
        "repeatedBlockMass": 18,
        "repeatedBlockGroups": 2,
        "repeatedBlockInstances": 4
      },
      {
        "id": "Icetakes/Judgment::required_urgency_assessment",
        "package": "Icetakes/Judgment",
        "name": "required_urgency_assessment",
        "signature": "Yichus/Json::Json -> Yichus/Json::DecodeResult[UrgencyAssessment]",
        "signatureId": "Yichus/Json::Json -> Yichus/Json::DecodeResult[Icetakes/Judgment::UrgencyAssessment]",
        "exported": false,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 1,
        "size": 36,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::validate_completion_input",
        "package": "Icetakes/JudgmentCompletion",
        "name": "validate_completion_input",
        "signature": "CompleteJudgmentInput -> Option[CompletionError]",
        "signatureId": "Icetakes/JudgmentStore::CompleteJudgmentInput -> Bosatsu/Predef::Option[Icetakes/JudgmentCompletion::CompletionError]",
        "exported": false,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 1,
        "size": 49,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::lookup_plan",
        "package": "Icetakes/LawyerPolicy",
        "name": "lookup_plan",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], PolicyLookup) -> Yichus/Transaction::Txn[a, PolicyError, Option[ResolvedPolicy]]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPolicy::PolicyLookup) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPolicy::PolicyError, Bosatsu/Predef::Option[Icetakes/LawyerPolicy::ResolvedPolicy]]",
        "exported": false,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 5,
        "size": 81,
        "repeatedBlockMass": 15,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 2
      },
      {
        "id": "Icetakes/LawyerPolicy::select_policy",
        "package": "Icetakes/LawyerPolicy",
        "name": "select_policy",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], ActivatePolicyInput) -> Yichus/Transaction::Txn[a, PolicyError, ActivePolicy]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPolicy::ActivatePolicyInput) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::ActivePolicy]",
        "exported": false,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 7,
        "size": 159,
        "repeatedBlockMass": 15,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 2
      },
      {
        "id": "Icetakes/LawyerPolicy::valid_policy",
        "package": "Icetakes/LawyerPolicy",
        "name": "valid_policy",
        "signature": "PublishPolicyInput -> Bool",
        "signatureId": "Icetakes/LawyerPolicy::PublishPolicyInput -> Bosatsu/Predef::Bool",
        "exported": false,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 4,
        "size": 107,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::lawyer_ref",
        "package": "Icetakes/LawyerPreparation",
        "name": "lawyer_ref",
        "signature": "String -> String",
        "signatureId": "Bosatsu/Predef::String -> Bosatsu/Predef::String",
        "exported": true,
        "layer": 2,
        "fanIn": 1,
        "fanOut": 3,
        "size": 16,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::checked_job",
        "package": "Icetakes/ArticleRetrieval",
        "name": "checked_job",
        "signature": "forall a: *. (Contribution, ContributionJob) -> Yichus/Transaction::Txn[a, RetrievalError, Yichus/Job::Job]",
        "signatureId": "forall a: *. (Icetakes/ContributionModel::Contribution, Icetakes/ContributionModel::ContributionJob) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Yichus/Job::Job]",
        "exported": false,
        "layer": 3,
        "fanIn": 3,
        "fanOut": 1,
        "size": 23,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::record_result",
        "package": "Icetakes/ArticleRetrieval",
        "name": "record_result",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, FetchContext, Yichus/ArticleFetch::ArticleFetchResult, Yichus/Job::Job, Int) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::FetchContext, Yichus/ArticleFetch::ArticleFetchResult, Yichus/Job::Job, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "layer": 3,
        "fanIn": 1,
        "fanOut": 5,
        "size": 110,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::recover_before_claim",
        "package": "Icetakes/ArticleRetrieval",
        "name": "recover_before_claim",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Contribution, Yichus/Job::Job, Int) -> Yichus/Transaction::Txn[a, RetrievalError, Yichus/Job::Job]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/ContributionModel::Contribution, Yichus/Job::Job, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Yichus/Job::Job]",
        "exported": false,
        "layer": 3,
        "fanIn": 1,
        "fanOut": 1,
        "size": 56,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::submit_plan",
        "package": "Icetakes/ContributionIntake",
        "name": "submit_plan",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, SubmitContributionInput) -> Yichus/Transaction::Txn[a, SubmissionError, SubmissionReceipt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ContributionIntake::SubmitContributionInput) -> Yichus/Transaction::Txn[a, Icetakes/ContributionModel::SubmissionError, Icetakes/ContributionIntake::SubmissionReceipt]",
        "exported": false,
        "layer": 3,
        "fanIn": 1,
        "fanOut": 5,
        "size": 78,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::required_evidence_refs",
        "package": "Icetakes/Judgment",
        "name": "required_evidence_refs",
        "signature": "(Yichus/Json::Json, List[EvidenceRef]) -> Yichus/Json::DecodeResult[List[EvidenceRef]]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]]",
        "exported": false,
        "layer": 3,
        "fanIn": 3,
        "fanOut": 1,
        "size": 29,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::activate_plan",
        "package": "Icetakes/LawyerPolicy",
        "name": "activate_plan",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], ActivatePolicyInput) -> Yichus/Transaction::Txn[a, PolicyError, ActivePolicy]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPolicy::ActivatePolicyInput) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::ActivePolicy]",
        "exported": false,
        "layer": 3,
        "fanIn": 1,
        "fanOut": 7,
        "size": 112,
        "repeatedBlockMass": 22,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 2
      },
      {
        "id": "Icetakes/LawyerPolicy::publish_plan",
        "package": "Icetakes/LawyerPolicy",
        "name": "publish_plan",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], PublishPolicyInput) -> Yichus/Transaction::Txn[a, PolicyError, PolicyRevision]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPolicy::PublishPolicyInput) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::PolicyRevision]",
        "exported": false,
        "layer": 3,
        "fanIn": 1,
        "fanOut": 6,
        "size": 126,
        "repeatedBlockMass": 21,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 2
      },
      {
        "id": "Icetakes/LawyerPolicy::read_policy",
        "package": "Icetakes/LawyerPolicy",
        "name": "read_policy",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, PolicyLookup) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PolicyError, Option[ResolvedPolicy]]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/LawyerPolicy::PolicyLookup) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPolicy::PolicyError, Bosatsu/Predef::Option[Icetakes/LawyerPolicy::ResolvedPolicy]]]",
        "exported": true,
        "layer": 3,
        "fanIn": 1,
        "fanOut": 1,
        "size": 10,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::require_source",
        "package": "Icetakes/LawyerPreparation",
        "name": "require_source",
        "signature": "forall a: *. (Contribution, ArticleSnapshot, ContributionJob, String) -> Yichus/Transaction::Txn[a, PreparationError, String]",
        "signatureId": "forall a: *. (Icetakes/ContributionModel::Contribution, Icetakes/ContributionModel::ArticleSnapshot, Icetakes/ContributionModel::ContributionJob, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPreparation::PreparationError, Bosatsu/Predef::String]",
        "exported": false,
        "layer": 3,
        "fanIn": 1,
        "fanOut": 3,
        "size": 98,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::complete_active",
        "package": "Icetakes/ArticleRetrieval",
        "name": "complete_active",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, FetchContext, Yichus/ArticleFetch::ArticleFetchResult) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::FetchContext, Yichus/ArticleFetch::ArticleFetchResult) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 7,
        "size": 91,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::recover_active",
        "package": "Icetakes/ArticleRetrieval",
        "name": "recover_active",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, FetchContext, Int) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Icetakes/ArticleRetrieval::FetchContext, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 5,
        "size": 100,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::start_command",
        "package": "Icetakes/ArticleRetrieval",
        "name": "start_command",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, Int) -> Yichus/Transaction::Txn[a, RetrievalError, Preparation]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Bosatsu/Predef::Int) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::Preparation]",
        "exported": false,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 10,
        "size": 182,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::submit_contribution",
        "package": "Icetakes/ContributionIntake",
        "name": "submit_contribution",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, SubmitContributionInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[SubmissionError, SubmissionReceipt]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/ContributionIntake::SubmitContributionInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/ContributionModel::SubmissionError, Icetakes/ContributionIntake::SubmissionReceipt]]",
        "exported": true,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 1,
        "size": 12,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::decode_devils_advocate_value",
        "package": "Icetakes/Judgment",
        "name": "decode_devils_advocate_value",
        "signature": "(Yichus/Json::Json, List[EvidenceRef]) -> Yichus/Json::DecodeResult[DevilsAdvocateJudgment]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::DevilsAdvocateJudgment]",
        "exported": false,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 3,
        "size": 72,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::decode_lawyer_value",
        "package": "Icetakes/Judgment",
        "name": "decode_lawyer_value",
        "signature": "(Yichus/Json::Json, List[EvidenceRef]) -> Yichus/Json::DecodeResult[LawyerJudgment]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::LawyerJudgment]",
        "exported": false,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 7,
        "size": 129,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::decode_taxonomy_value",
        "package": "Icetakes/Judgment",
        "name": "decode_taxonomy_value",
        "signature": "(Yichus/Json::Json, List[EvidenceRef]) -> Yichus/Json::DecodeResult[TaxonomyJudgment]",
        "signatureId": "(Yichus/Json::Json, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::TaxonomyJudgment]",
        "exported": false,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 3,
        "size": 63,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::activate_policy",
        "package": "Icetakes/LawyerPolicy",
        "name": "activate_policy",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, ActivatePolicyInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PolicyError, ActivePolicy]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/LawyerPolicy::ActivatePolicyInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::ActivePolicy]]",
        "exported": true,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 1,
        "size": 10,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::publish_policy",
        "package": "Icetakes/LawyerPolicy",
        "name": "publish_policy",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, PublishPolicyInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PolicyError, PolicyRevision]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/LawyerPolicy::PublishPolicyInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPolicy::PolicyError, Icetakes/LawyerPolicy::PolicyRevision]]",
        "exported": true,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 1,
        "size": 10,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::source_ready",
        "package": "Icetakes/LawyerPreparation",
        "name": "source_ready",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], String) -> Yichus/Transaction::Txn[a, PreparationError, String]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPreparation::PreparationError, Bosatsu/Predef::String]",
        "exported": false,
        "layer": 4,
        "fanIn": 1,
        "fanOut": 6,
        "size": 73,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::complete_plan",
        "package": "Icetakes/ArticleRetrieval",
        "name": "complete_plan",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput, Yichus/ArticleFetch::ArticleFetchResult) -> Yichus/Transaction::Txn[a, RetrievalError, RetrievalStatus]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput, Yichus/ArticleFetch::ArticleFetchResult) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]",
        "exported": false,
        "layer": 5,
        "fanIn": 1,
        "fanOut": 4,
        "size": 76,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::prepare_plan",
        "package": "Icetakes/ArticleRetrieval",
        "name": "prepare_plan",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, RetrieveContributionInput) -> Yichus/Transaction::Txn[a, RetrievalError, Preparation]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput) -> Yichus/Transaction::Txn[a, Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::Preparation]",
        "exported": false,
        "layer": 5,
        "fanIn": 1,
        "fanOut": 6,
        "size": 120,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ContributionIntake::api",
        "package": "Icetakes/ContributionIntake",
        "name": "api",
        "signature": "Yichus/Service::ServiceDef",
        "signatureId": "Yichus/Service::ServiceDef",
        "exported": true,
        "layer": 5,
        "fanIn": 0,
        "fanOut": 2,
        "size": 54,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/Judgment::decode_judgment",
        "package": "Icetakes/Judgment",
        "name": "decode_judgment",
        "signature": "(JudgmentSchema, String, List[EvidenceRef]) -> Yichus/Json::DecodeResult[Judgment]",
        "signatureId": "(Icetakes/Judgment::JudgmentSchema, Bosatsu/Predef::String, Bosatsu/Predef::List[Icetakes/Judgment::EvidenceRef]) -> Yichus/Json::DecodeResult[Icetakes/Judgment::Judgment]",
        "exported": true,
        "layer": 5,
        "fanIn": 1,
        "fanOut": 3,
        "size": 64,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPolicy::api",
        "package": "Icetakes/LawyerPolicy",
        "name": "api",
        "signature": "Yichus/Service::ServiceDef",
        "signatureId": "Yichus/Service::ServiceDef",
        "exported": true,
        "layer": 5,
        "fanIn": 0,
        "fanOut": 4,
        "size": 111,
        "repeatedBlockMass": 11,
        "repeatedBlockGroups": 1,
        "repeatedBlockInstances": 2
      },
      {
        "id": "Icetakes/LawyerPreparation::prepare_plan",
        "package": "Icetakes/LawyerPreparation",
        "name": "prepare_plan",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], PrepareLawyerInput) -> Yichus/Transaction::Txn[a, PreparationError, LawyerPrepared]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/LawyerPreparation::PrepareLawyerInput) -> Yichus/Transaction::Txn[a, Icetakes/LawyerPreparation::PreparationError, Icetakes/LawyerPreparation::LawyerPrepared]",
        "exported": false,
        "layer": 5,
        "fanIn": 1,
        "fanOut": 6,
        "size": 129,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::retrieve_contribution",
        "package": "Icetakes/ArticleRetrieval",
        "name": "retrieve_contribution",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, RetrieveContributionInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[RetrievalError, RetrievalStatus]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/ArticleRetrieval::RetrieveContributionInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/ArticleRetrieval::RetrievalError, Icetakes/ArticleRetrieval::RetrievalStatus]]",
        "exported": true,
        "layer": 6,
        "fanIn": 1,
        "fanOut": 2,
        "size": 107,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "package": "Icetakes/JudgmentCompletion",
        "name": "new_completion_attempt",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], CompleteJudgmentInput, String) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "layer": 6,
        "fanIn": 1,
        "fanOut": 8,
        "size": 122,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::prepare_lawyer",
        "package": "Icetakes/LawyerPreparation",
        "name": "prepare_lawyer",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, PrepareLawyerInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[PreparationError, LawyerPrepared]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/LawyerPreparation::PrepareLawyerInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/LawyerPreparation::PreparationError, Icetakes/LawyerPreparation::LawyerPrepared]]",
        "exported": true,
        "layer": 6,
        "fanIn": 1,
        "fanOut": 1,
        "size": 10,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/ArticleRetrieval::api",
        "package": "Icetakes/ArticleRetrieval",
        "name": "api",
        "signature": "Yichus/Service::ServiceDef",
        "signatureId": "Yichus/Service::ServiceDef",
        "exported": true,
        "layer": 7,
        "fanIn": 0,
        "fanOut": 1,
        "size": 58,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "package": "Icetakes/JudgmentCompletion",
        "name": "completion_attempt_plan",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], CompleteJudgmentInput, String) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "layer": 7,
        "fanIn": 1,
        "fanOut": 3,
        "size": 73,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::completion_plan",
        "package": "Icetakes/JudgmentCompletion",
        "name": "completion_plan",
        "signature": "forall a: *. (Yichus/Transaction::Scope[a], CompleteJudgmentInput, String) -> Yichus/Transaction::Txn[a, CompletionError, JudgmentAttempt]",
        "signatureId": "forall a: *. (Yichus/Transaction::Scope[a], Icetakes/JudgmentStore::CompleteJudgmentInput, Bosatsu/Predef::String) -> Yichus/Transaction::Txn[a, Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]",
        "exported": false,
        "layer": 8,
        "fanIn": 1,
        "fanOut": 2,
        "size": 23,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/JudgmentCompletion::complete_judgment",
        "package": "Icetakes/JudgmentCompletion",
        "name": "complete_judgment",
        "signature": "(Yichus/Data::Db, Yichus/Access::Principal, CompleteJudgmentInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[CompletionError, JudgmentAttempt]]",
        "signatureId": "(Yichus/Data::Db, Yichus/Access::Principal, Icetakes/JudgmentStore::CompleteJudgmentInput) -> Yichus/IO::IO[Yichus/Transaction::Outcome[Icetakes/JudgmentCompletion::CompletionError, Icetakes/JudgmentStore::JudgmentAttempt]]",
        "exported": true,
        "layer": 9,
        "fanIn": 1,
        "fanOut": 1,
        "size": 15,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      },
      {
        "id": "Icetakes/LawyerPreparation::api",
        "package": "Icetakes/LawyerPreparation",
        "name": "api",
        "signature": "Yichus/Service::ServiceDef",
        "signatureId": "Yichus/Service::ServiceDef",
        "exported": true,
        "layer": 10,
        "fanIn": 0,
        "fanOut": 2,
        "size": 102,
        "repeatedBlockMass": 0,
        "repeatedBlockGroups": 0,
        "repeatedBlockInstances": 0
      }
    ],
    "edges": [
      {
        "from": "Icetakes/ArticleRetrieval::api",
        "to": "Icetakes/ArticleRetrieval::retrieve_contribution",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::checked_job",
        "to": "Icetakes/ContributionModel::input_matches_job",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::command_local_key",
        "to": "Icetakes/Identity::frame",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::command_local_key",
        "to": "Icetakes/Identity::site_id",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::checked_job",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::contribution_id",
        "span": 4
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::fetch_transition",
        "span": 4
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::persist_job",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::read_fetch_job",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ArticleRetrieval::record_result",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_active",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "span": 3
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_plan",
        "to": "Icetakes/ArticleRetrieval::command_local_key",
        "span": 4
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_plan",
        "to": "Icetakes/ArticleRetrieval::commands_table",
        "span": 5
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_plan",
        "to": "Icetakes/ArticleRetrieval::complete_active",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::complete_plan",
        "to": "Icetakes/ArticleRetrieval::same_command",
        "span": 5
      },
      {
        "from": "Icetakes/ArticleRetrieval::fetch_request",
        "to": "Icetakes/Identity::frame",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::finish_command",
        "to": "Icetakes/ArticleRetrieval::command_local_key",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::finish_command",
        "to": "Icetakes/ArticleRetrieval::commands_table",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::persist_job",
        "to": "Icetakes/ContributionModel::job_key",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::persist_job",
        "to": "Icetakes/ContributionModel::jobs_table",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::command_local_key",
        "span": 4
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::commands_table",
        "span": 5
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::recover_active",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::same_command",
        "span": 5
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ArticleRetrieval::start_command",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::prepare_plan",
        "to": "Icetakes/ContributionModel::validate_idempotency_key",
        "span": 4
      },
      {
        "from": "Icetakes/ArticleRetrieval::read_contribution",
        "to": "Icetakes/ContributionModel::contributions_table",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::read_fetch_job",
        "to": "Icetakes/ContributionModel::job_key",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::read_fetch_job",
        "to": "Icetakes/ContributionModel::jobs_table",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ArticleRetrieval::contribution_id",
        "span": 3
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ArticleRetrieval::finish_command",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ContributionModel::contribution_progress",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::record_result",
        "to": "Icetakes/ContributionModel::snapshots_table",
        "span": 3
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::checked_job",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::contribution_id",
        "span": 4
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::finish_command",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::persist_job",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_active",
        "to": "Icetakes/ArticleRetrieval::read_fetch_job",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::recover_before_claim",
        "to": "Icetakes/ArticleRetrieval::persist_job",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::retrieve_contribution",
        "to": "Icetakes/ArticleRetrieval::complete_plan",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::retrieve_contribution",
        "to": "Icetakes/ArticleRetrieval::prepare_plan",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::checked_job",
        "span": 1
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::command_local_key",
        "span": 3
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::commands_table",
        "span": 4
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::contribution_id",
        "span": 4
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::fetch_request",
        "span": 3
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::finish_command",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::persist_job",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::read_contribution",
        "span": 3
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::read_fetch_job",
        "span": 2
      },
      {
        "from": "Icetakes/ArticleRetrieval::start_command",
        "to": "Icetakes/ArticleRetrieval::recover_before_claim",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::api",
        "to": "Icetakes/ContributionIntake::contribution_status",
        "span": 3
      },
      {
        "from": "Icetakes/ContributionIntake::api",
        "to": "Icetakes/ContributionIntake::submit_contribution",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::command_local_key",
        "to": "Icetakes/Identity::frame",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::command_local_key",
        "to": "Icetakes/Identity::site_id",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionIntake::can_read_contribution_job",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionIntake::command_local_key",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionIntake::receipt_rows",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionModel::contribution_progress",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionModel::job_rows",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::contribution_status",
        "to": "Icetakes/ContributionModel::validate_idempotency_key",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionIntake::charter_version",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionIntake::fetch_max_attempts",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionIntake::receipts_table",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::contributions_table",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::fetch_stage",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::job_key",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/ContributionModel::jobs_table",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::create_submission",
        "to": "Icetakes/Identity::site_id",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::same_submission",
        "to": "Icetakes/ContributionModel::same_content",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::submit_contribution",
        "to": "Icetakes/ContributionIntake::submit_plan",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::command_local_key",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::create_submission",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::receipts_table",
        "span": 3
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::same_submission",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::submit_plan",
        "to": "Icetakes/ContributionIntake::validate_submission",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionIntake::validate_submission",
        "to": "Icetakes/ContributionModel::over_limit",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionIntake::validate_submission",
        "to": "Icetakes/ContributionModel::validate_idempotency_key",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::contribution_progress",
        "to": "Icetakes/ContributionModel::progress_state",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::contribution_ref",
        "to": "Icetakes/Identity::frame",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::contribution_ref",
        "to": "Icetakes/Identity::site_id",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::input_matches_job",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::input_matches_job",
        "to": "Icetakes/ContributionModel::fetch_stage",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionModel::input_matches_job",
        "to": "Icetakes/ContributionModel::job_key",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::input_matches_job",
        "to": "Icetakes/Identity::site_id",
        "span": 2
      },
      {
        "from": "Icetakes/ContributionModel::job_key",
        "to": "Icetakes/ContributionModel::fetch_stage",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::job_key",
        "to": "Icetakes/Identity::frame",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::same_content",
        "to": "Icetakes/ContributionModel::same_urgency",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::same_contribution",
        "to": "Icetakes/ContributionModel::same_content",
        "span": 1
      },
      {
        "from": "Icetakes/ContributionModel::validate_idempotency_key",
        "to": "Icetakes/ContributionModel::over_limit",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::decode_devils_advocate_value",
        "to": "Icetakes/Judgment::expected_fields",
        "span": 3
      },
      {
        "from": "Icetakes/Judgment::decode_devils_advocate_value",
        "to": "Icetakes/Judgment::required_evidence_refs",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::decode_devils_advocate_value",
        "to": "Icetakes/Judgment::required_nonempty_string",
        "span": 3
      },
      {
        "from": "Icetakes/Judgment::decode_evidence_ref",
        "to": "Icetakes/Judgment::member_evidence",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::decode_evidence_refs",
        "to": "Icetakes/Judgment::decode_evidence_ref",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::decode_judgment",
        "to": "Icetakes/Judgment::decode_devils_advocate_value",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::decode_judgment",
        "to": "Icetakes/Judgment::decode_lawyer_value",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::decode_judgment",
        "to": "Icetakes/Judgment::decode_taxonomy_value",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::expected_fields",
        "span": 3
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_basis_points",
        "span": 4
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_brief_bullets",
        "span": 3
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_event_time",
        "span": 4
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_evidence_refs",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_nonempty_string",
        "span": 3
      },
      {
        "from": "Icetakes/Judgment::decode_lawyer_value",
        "to": "Icetakes/Judgment::required_urgency_assessment",
        "span": 2
      },
      {
        "from": "Icetakes/Judgment::decode_taxonomy_value",
        "to": "Icetakes/Judgment::expected_fields",
        "span": 3
      },
      {
        "from": "Icetakes/Judgment::decode_taxonomy_value",
        "to": "Icetakes/Judgment::required_evidence_refs",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::decode_taxonomy_value",
        "to": "Icetakes/Judgment::required_nonempty_string",
        "span": 3
      },
      {
        "from": "Icetakes/Judgment::expected_fields",
        "to": "Icetakes/Judgment::member_string",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::required_brief_bullets",
        "to": "Icetakes/Judgment::nonempty_string",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::required_evidence_refs",
        "to": "Icetakes/Judgment::decode_evidence_refs",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::required_nonempty_string",
        "to": "Icetakes/Judgment::nonempty_string",
        "span": 1
      },
      {
        "from": "Icetakes/Judgment::required_urgency_assessment",
        "to": "Icetakes/Judgment::required_nonempty_string",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::accepted_attempt",
        "to": "Icetakes/JudgmentCompletion::apply_job_result",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::accepted_attempt",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::accepted_attempt",
        "to": "Icetakes/JudgmentStore::judgment_artifacts_table",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::accepted_attempt",
        "to": "Icetakes/JudgmentStore::judgment_attempts_table",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::complete_judgment",
        "to": "Icetakes/JudgmentCompletion::completion_plan",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "to": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "to": "Icetakes/JudgmentCompletion::same_completion_input",
        "span": 6
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "to": "Icetakes/JudgmentStore::judgment_attempts_table",
        "span": 7
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_plan",
        "to": "Icetakes/JudgmentCompletion::completion_attempt_plan",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::completion_plan",
        "to": "Icetakes/JudgmentCompletion::validate_completion_input",
        "span": 6
      },
      {
        "from": "Icetakes/JudgmentCompletion::malformed_attempt",
        "to": "Icetakes/JudgmentCompletion::apply_job_result",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::malformed_attempt",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::malformed_attempt",
        "to": "Icetakes/JudgmentStore::judgment_attempts_table",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/Judgment::decode_judgment",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::accepted_attempt",
        "span": 5
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::malformed_attempt",
        "span": 5
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::read_job",
        "span": 6
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::read_task",
        "span": 6
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentCompletion::require_task_matches_job",
        "span": 6
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "span": 6
      },
      {
        "from": "Icetakes/JudgmentCompletion::new_completion_attempt",
        "to": "Icetakes/JudgmentStore::judgment_tasks_table",
        "span": 6
      },
      {
        "from": "Icetakes/JudgmentCompletion::same_completion_input",
        "to": "Icetakes/JudgmentCompletion::same_lease",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::same_completion_input",
        "to": "Icetakes/JudgmentCompletion::same_model_completion",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::validate_completion_input",
        "to": "Icetakes/JudgmentCompletion::validate_model_completion",
        "span": 1
      },
      {
        "from": "Icetakes/JudgmentCompletion::validate_model_completion",
        "to": "Icetakes/JudgmentCompletion::nonnegative",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::activation_receipts_table",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::all_true",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::bounded_text",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::in_range",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::policy_ref",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::same_activation",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_plan",
        "to": "Icetakes/LawyerPolicy::select_policy",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::activate_policy",
        "to": "Icetakes/LawyerPolicy::activate_plan",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::api",
        "to": "Icetakes/LawyerPolicy::activate_policy",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::api",
        "to": "Icetakes/LawyerPolicy::publish_policy",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::api",
        "to": "Icetakes/LawyerPolicy::read_active_policy",
        "span": 4
      },
      {
        "from": "Icetakes/LawyerPolicy::api",
        "to": "Icetakes/LawyerPolicy::read_policy",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/Identity::site_id",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/LawyerPolicy::all_true",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/LawyerPolicy::policies_table",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/LawyerPolicy::policy_ref",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::lookup_plan",
        "to": "Icetakes/LawyerPolicy::provider_policy",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::policy_ref",
        "to": "Icetakes/Identity::frame",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::policy_ref",
        "to": "Icetakes/Identity::site_id",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/Identity::site_id",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::all_true",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::policies_table",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::policy_ref",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::same_policy",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_plan",
        "to": "Icetakes/LawyerPolicy::valid_policy",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::publish_policy",
        "to": "Icetakes/LawyerPolicy::publish_plan",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::read_active_policy",
        "to": "Icetakes/Identity::site_id",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::read_active_policy",
        "to": "Icetakes/LawyerPolicy::active_policy_table",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::read_policy",
        "to": "Icetakes/LawyerPolicy::lookup_plan",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::same_activation",
        "to": "Icetakes/LawyerPolicy::all_true",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::same_policy",
        "to": "Icetakes/LawyerPolicy::all_true",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::same_policy",
        "to": "Icetakes/LawyerPolicy::same_providers",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/Identity::site_id",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::activation_receipts_table",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::active_generation",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::active_policy_table",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::all_true",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::policies_table",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::select_policy",
        "to": "Icetakes/LawyerPolicy::policy_ref",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_policy",
        "to": "Icetakes/LawyerPolicy::all_true",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_policy",
        "to": "Icetakes/LawyerPolicy::bounded_text",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_policy",
        "to": "Icetakes/LawyerPolicy::in_range",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_policy",
        "to": "Icetakes/LawyerPolicy::valid_providers",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPolicy::valid_providers",
        "to": "Icetakes/LawyerPolicy::bounded_text",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::api",
        "to": "Icetakes/JudgmentCompletion::complete_judgment",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::api",
        "to": "Icetakes/LawyerPreparation::prepare_lawyer",
        "span": 4
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/JudgmentStore::judgment_tasks_table",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/LawyerPreparation::input_revision",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_attempts",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_retry_millis",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::create_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_stage",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::lawyer_ref",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::lawyer_ref",
        "to": "Icetakes/Identity::frame",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPreparation::lawyer_ref",
        "to": "Icetakes/LawyerPreparation::lawyer_stage",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_lawyer",
        "to": "Icetakes/LawyerPreparation::prepare_plan",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/JudgmentStore::jobs_table",
        "span": 5
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/JudgmentStore::judgment_tasks_table",
        "span": 5
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/LawyerPreparation::create_preparation",
        "span": 4
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/LawyerPreparation::lawyer_ref",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/LawyerPreparation::same_preparation",
        "span": 4
      },
      {
        "from": "Icetakes/LawyerPreparation::prepare_plan",
        "to": "Icetakes/LawyerPreparation::source_ready",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::require_source",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "span": 2
      },
      {
        "from": "Icetakes/LawyerPreparation::require_source",
        "to": "Icetakes/ContributionModel::input_matches_job",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::require_source",
        "to": "Icetakes/ContributionModel::same_contribution",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::same_preparation",
        "to": "Icetakes/LawyerPreparation::input_revision",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::same_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_retry_millis",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::same_preparation",
        "to": "Icetakes/LawyerPreparation::lawyer_stage",
        "span": 1
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::contribution_ref",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::contributions_table",
        "span": 4
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::job_key",
        "span": 3
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::jobs_table",
        "span": 4
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/ContributionModel::snapshots_table",
        "span": 4
      },
      {
        "from": "Icetakes/LawyerPreparation::source_ready",
        "to": "Icetakes/LawyerPreparation::require_source",
        "span": 1
      }
    ],
    "clonePairs": [],
    "measures": {
      "definitions": 139,
      "edges": 214,
      "layers": 11,
      "layerSkips": 107,
      "maxDirectDeps": 10,
      "widestDefinition": "Icetakes/ArticleRetrieval::start_command",
      "usedOnce": 76,
      "usedMany": 41,
      "maxSize": 182,
      "largestDefinition": "Icetakes/ArticleRetrieval::start_command",
      "duplicatedMass": 262,
      "clonePairs": 0
    }
  }
}
