- Shell 52.8%
- Python 36.9%
- RPGLE 7.3%
- CLIPS 1.9%
- SQLPL 0.8%
- Other 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
The Binjovi deploy stage reads the flat release repository, so the routine loss profile is now staged in each release as `loss-profile.json`, and the deploy applies that copy with the pipeline's engine. This release is the first one that carries the staged profile. Claude-Session: https://claude.ai/code/session_01HPdKaFBKQVs8hzfgXMrnwV |
||
| .vscode | ||
| docs | ||
| fixture | ||
| native | ||
| QDDSSRC | ||
| QRPGLESRC | ||
| recovery | ||
| scripts | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| CHANGELOG.md | ||
| extract.sh | ||
| Makefile | ||
| README.md | ||
| test-1-open-for-business.sh | ||
| test-2-cannot-afford.sh | ||
| test-3-closing-time.sh | ||
| VERSION | ||
rpg-lemonade
This project is a playable Lemonade Stand game for the IBM i green screen. It is a
reimplementation of the classic Apple II and MECC business simulation. The game uses RPG and
DDS. It runs over the 5250 protocol through the zelnet client. The project is a
"crowd-pleaser" showcase for the ibmi-rpg pipeline. The pipeline compiles the game on a
real IBM i host (pub400) over the zelnet Host Server client. It also tests the greenscreen
game headless with zelnet --play.
Why Lemonade Stand? This game already fits the shape of a 5250 app. Each day, you read the weather. Then you set the number of glasses to make, the number of advertising signs, and the price. The program simulates demand and returns a profit-and-loss report. The game is pure block-mode and turn-based, with a character-cell display. It uses no game engine. It is just a business simulation.
What it is
- Greenscreen:
QDDSSRC/LEMSCR.dspfholds four records.TITLEshows the splash screen.PLAYsets glasses, signs, and price.RESULTshows the day's profit-and-loss report.ENDGAMEshows the final standing. - Program:
QRPGLESRC/LEMONADE.rpgleruns the game loop. It also runs a documented, seedable economic model. Weather and random events drive demand. The program generates random numbers withCEERAN0. You can seed this with an entry parameter. This makes the--playbehavior test give the same result each time.
Build / test / play
- Run
bash scripts/deploy.shto compile theDSPF -> RPGchain on pub400. The build treats warnings as errors. - Run
bash test-1-open-for-business.sh,bash test-2-cannot-afford.sh, andbash test-3-closing-time.shto drive the greenscreen game headless withzelnet --play. Each test checks one scenario. A full day must post a profit-and-loss report. An over-spend order must be refused. The stand must close correctly. Each test passes no matter what weather the game rolls. This set of tests is the behavior gate. - Run
bash extract.shto pull the source members off the box and back into Git. This is the import round-trip.
Branches + environments
trunkis the integration branch. Open a feature PR to it. Request its release through Binjovi after the Build passes. Do not merge the PR directly in Forgejo. Only the Binjovi release identity can advance this branch.mainholds releases only. The promote step advances it by fast-forward.- Environments map to IBM i libraries on pub400.
SOMEARA1is the dev and CI scratch library.SOMEARA2is staging. It holds trunk builds, behavioral reels, and the SAVF package source.SOMEARABis prod. It is deploy-only. CRTDUPOBJ promotes objects into it under an integrity gate.
To play the game interactively, run zelnet term pub400.com, then CALL SOMEARAB/LEMONADE.
Press F3 to quit. This command calls the PROD deploy. Use CALL SOMEARA2/LEMONADE for
staging.
Controlled source loss
Every Binjovi deployment of this application ends with a routine source
loss, so the box always carries a decades-old simulation: the routine
targets of recovery/loss-profile.json (LM_BASE, LM_SALEUI, LEMONADE,
LEMSCR) lose their source members in SOMEARA1, and LM_SALEUI and LEMONADE
lose their observability in SOMEARAB and SOMEARA1. Staging (SOMEARA2) is
never touched. The originals stay in Git; the next Build re-adds the
members and recompiles. The release stage stages the profile as
loss-profile.json in the release repository, and the deploy applies that
staged copy with the pipeline's own engine (ibmi-rpg-source-loss), which
has the same semantics as the routine mode here. The loss report is in
the deploy log (ibmi-source-loss-report.v3). The twin repository named by the profile's
output_repository (rpg-lemonade-tng) recovers deployable text from that
state. See docs/SOURCE-LOSS.md for the routine mode and for the bounded
operator exercise, which still needs RSTOBJ.
Native Binjovi delivery
Build compiles the exact PR revision in SOMEARA1 with the pinned
ibmi-builder image and its installed zelnet client. Release tests the
combined revision in SOMEARA2. It publishes a save file, the object manifest,
recordings, MP4 reels, and JPEG previews with digests. Deploy copies the
verified release objects to SOMEARAB and rejects a changed staging object set.
Release also saves compiled-objects.txt. Deploy checks the program, bound
module, and display-source metadata before and after the copy. A missing or
different record fails the Deploy. This is compiler/source metadata proof,
not a binary hash.
All phases use native Binjovi agents in the cluster. Shared IBM i work is
serialized. Media rendering runs separately. The recipe is in
sean/binjovi-plans, under recipes/ibmi-rpg and recipes/rpg-lemonade.
Recipe changes do not require a Binjovi server deployment. Historical release
artifacts remain available. See docs/pub400.md for the IBM i connection.
Source capture gate
Each development or staging compile uses the baked Zelnet client to make a strict two-pass export of LEMSCR and LEMONADE. The gate checks the manifest, file sizes, hashes, and exact bytes against this Git revision. It fails if native edits change the source during this check. The full recovery experiment and staged deployment plan are kept in rpg-demo/recovery/PLAN.md.
Native development and source recovery
The expanded business application is in native/. It has 14 program components, a display file, a shared parameter member, and the journaled SQL business fixture. It preserves SEU/PDM editing and compilation in SOMEARA1. Temporary SQL tests use separate T1_ names.
The expanded application is not a staging or production release target yet. A complete application restore must pass before source-loss tests start.
Native pipeline timing
Native agents coordinate source capture, compilation, release verification, and pub400-rpg deployment. IBM i operations remain serialized. Remote compiler time appears in task spans; it is not local syscall work.
Open the project dashboard and expand an execution attempt for the task timeline and available CPU, off-CPU, and syscall profiles. Cached BuildKit steps still appear as cached work; a missing sample does not prove that a task used no CPU.
Select an exact successful Build with
binjovictl release rpg-lemonade --build BUILD_ID --wait.
Then use binjovictl status rpg-lemonade to check its release and any
configured deployment. Telemetry explains time spent; immutable artifact and
revision evidence establish completion.