Skip to content

Re-validate loops 3 and 4 on preprod; fix the lessons and examples that teach them - #27

Merged
workshop-maybe merged 2 commits into
mainfrom
fix/revalidate-credential-loops
Sep 24, 2026
Merged

workshop-maybe merged 2 commits into
mainfrom
fix/revalidate-credential-loops

Conversation

@workshop-maybe

Copy link
Copy Markdown
Contributor

Stacked on #25 (base branch fix/preprod-fee-schedule). Retarget to main once #25 merges.

Ran course.credential (loop 3) and project.credential (loop 4) end to end on preprod on 2026-09-23 against gateway API 2.5.2, then brought every surface that describes them in line with what the chain did.

What the run showed

Observed
Course commitment assignment_submit creates it directly in SUBMITTED → ACCEPTED → CREDENTIAL_CLAIMED. No AWAITING_SUBMISSION on this path.
Project commitment project_join creates it in COMMITTED → ACCEPTED → REWARDED.
Contributor deposit project_join locks ~2.3 ADA, not ~14.5.
tasks_manage deposit_value Paid from the manager's wallet into the treasury (listed in treasury_fundings), not drawn from the treasury.
Fees enroll 2.64 · assess 0.27 · course claim −1.65 · join 2.82 · task assess 0.35 · project claim +5.64 (5 ADA reward, 1 ADA commission)

Every figure in tx-loops.yaml and cost-registry.json now carries the tx it was read from.

Examples were broken — now rewritten and run

Against CLI 1.1.1 and the live API, both scripts failed before their second transaction: alias lookup (user me has no top-level alias), tx sign output (signed_tx, not tx_hex), tx status (state, not status — the poll loop could never see updated), course list[-1] discovery, create-module positional course id, missing approve → PENDING_TX → assignment import, project_create treasury_deposit (not in the schema), and project show (doesn't exist).

Both rewritten and run end to end on preprod: course script 6/6 txs (claim 790b262305d8c1e43824f29c9e5444ddd2879199d6aaee8a7240502f481450be), project script 6/6 (claim 515d2bbb0f4563d7889eebca53271242ca162bee1d2900a18ab22c2d9622b3d0). project-lifecycle.sh uses tx run, because project_join needs task_hash in its registration metadata and tx register can't send metadata. Both take an optional SUBMIT_URL, and both prerequisite blocks now spell out that the submit URL must be the full /tx/submit route.

Also fixed along the way

  • project-ops: add-funds, managers and blacklist bodies didn't match the schema; project list-tasks isn't a command.
  • create-module takes --course-id; its positional argument is an outline path. Fixed in 500.3, 500.5, 700.4, course-ops.
  • Lesson 600.3's argument that the project deposit is "ten times" the course deposit no longer holds (they're both ~2.3 ADA); rewritten so the stakes live in the treasury and escrow, which is where they are.
  • 700.3's "Don't tell the user the operation failed" now says what it meant — don't show your app's end user a failure — and no longer reads as an instruction to an agent.
  • assignment-update records its measured lower bound (0.274 ADA when evidence doesn't grow).

Not verified — flagged, not guessed

  • Is treasury_fund still needed for task rewards when tasks_manage pays its deposit_value from the manager's wallet? The run did both, so this PR documents what happened and leaves loop 2's "REQUIRED" note alone.
  • Refuse and deny paths weren't exercised. 500.4's refuse path follows status-enums.md (REFUSED → SUBMITTED).
  • status-enums.md (derived from the API's healer) lists PENDING_TX_COMMIT → AWAITING_SUBMISSION; the observed path skips that. Noted there rather than rewriting the source-derived table.

Merge notes

Closes #14. Closes #16.

…mples

Ran course.credential and project.credential end to end on preprod
(2026-09-23, gateway API 2.5.2) with the create step gone, and brought
everything that describes them in line with what the chain did.

Observed:
- Course: assignment_submit creates the commitment directly in
  SUBMITTED, then ACCEPTED -> CREDENTIAL_CLAIMED. No AWAITING_SUBMISSION
  on this path.
- Project: project_join creates it in COMMITTED, then ACCEPTED ->
  REWARDED.
- project_join locks ~2.3 ADA, not ~14.5. tasks_manage deposit_value is
  paid from the manager's wallet into the treasury, not drawn from it.
- Enrollment 2.64 ADA, assess 0.27, course claim -1.65, project claim
  +5.64 on a 5 ADA reward with the 1 ADA minimum commission.

tx-loops.yaml: loops 3 and 4 validated with measured fees, statuses and
tx hashes; loop 2's deposit_value note corrected; narration rewritten as
current state. cost-registry.json: participant costs and loop totals.
status-enums.md: observed happy paths noted.

Both example scripts were broken against CLI 1.1.1 and the live API
(alias lookup, tx sign/submit/status fields, course_id discovery,
create-module flag, missing approve/PENDING_TX and assignment import,
project_create treasury_deposit, project show). Rewritten and each run
end to end on preprod.

Lessons 500.4, 500.5, 600.1, 600.3, 600.4, 700.2 and skills
cost-estimator, course-ops, project-ops, explore-api follow. project-ops
also had wrong bodies for add-funds, managers and blacklist. 700.3 no
longer tells the reader "don't tell the user" in a way an agent could
take as an instruction.

Closes #14. Closes #16.
…rod run

- Examples: set-submit-header takes key and value as separate arguments.
- 700.2: teacher assess ~0.27, student net ~0.99, tasks_manage ~0.32 plus the
  reward paid into the treasury; rubric recomputed and the open treasury_fund
  question noted.
- cost-estimator, project-ops: tasks_manage pays the reward into the treasury.
- cost-registry: assignments-assess note matches the observed no-refund delta.
- 600.4: the treasury is funded in its own transaction.
@workshop-maybe
workshop-maybe force-pushed the fix/revalidate-credential-loops branch from 11b99ac to bc7560d Compare September 24, 2026 10:28
@workshop-maybe
workshop-maybe changed the base branch from fix/preprod-fee-schedule to main September 24, 2026 10:28
@workshop-maybe
workshop-maybe merged commit 122807d into main Sep 24, 2026
1 check passed
@workshop-maybe
workshop-maybe deleted the fix/revalidate-credential-loops branch September 24, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant