-
Notifications
You must be signed in to change notification settings - Fork 59
Adventure: π§ͺ Blind by Design β π’ Beginner #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
KatharinaSick
merged 7 commits into
off-on-dev:main
from
aepfli:adventure/blind-by-design-beginner
Apr 30, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
50c4d23
adventure: π§ͺ Blind by Design β π’ Beginner
aepfli b40915d
review: address PR #42 feedback from @KatharinaSick
aepfli 8d63d55
narrative: incorporate the Aletheia Institute framing into the Backstory
aepfli 156ddb4
mkdocs: drop the Intermediate / Expert nav entries from the Beginner-β¦
aepfli 0790ed4
docs(scope): drop the Intermediate / Expert placeholders from the Begβ¦
aepfli 422072e
add a Makefile and add minor doc tweaks
KatharinaSick 94a4a88
blind-by-design: move devcontainer to level directory fow now
KatharinaSick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| target/ | ||
|
|
||
| # The repo root .gitignore excludes .vscode/ globally. Re-include the | ||
| # launch + task configs that ship as part of this scenario β they are not | ||
| # editor preferences, they are the F5 / Run-and-Debug entry points the | ||
| # participant uses to start the lab. | ||
| !*/.vscode/ | ||
| !*/.vscode/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # π§ͺ Adventure 00: Blind by Design | ||
|
|
||
| A research lab is testing a vision-enhancement serum on volunteers. The serum is supposed to take ordinary eyes and produce sharper, even enhanced sight. The lab is a Spring Boot service; OpenFeature is the chart system; `flags.json` decides what reading the lab records for each subject. The protocol is the same for everyone β what differs is the observed outcome, because subjects come in with different biology, dose adherence, and trial-jurisdiction baseline. The flagship Phase 3 trial β a new amplifier algorithm β has started showing trouble: subjects stabilise slower, and roughly one in ten emerge blind. The dashboard that should be tracking all of this is dark. Your mission across three levels: stand up the lab, read the chart by cohort, then turn on the lights and roll back the trial before more subjects lose their sight. | ||
|
|
||
| **Technologies:** OpenFeature Java SDK, flagd, Spring Boot, Grafana LGTM (Tempo + Prometheus + Loki), Testcontainers | ||
|
|
||
| The entire **infrastructure is pre-provisioned in your Codespace**. | ||
| **You don't need to set up anything locally. Just focus on solving the problem.** | ||
|
|
||
| ## π Ready to Start? | ||
|
|
||
| [Choose your level](https://dynatrace-oss.github.io/open-ecosystem-challenges/00-blind-by-design/) and begin learning! |
1 change: 1 addition & 0 deletions
1
adventures/planned/00-blind-by-design/beginner/.mvn/wrapper/maven-wrapper.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip |
14 changes: 14 additions & 0 deletions
14
adventures/planned/00-blind-by-design/beginner/.vscode/launch.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "type": "java", | ||
| "name": "π§ͺ Run the Lab", | ||
| "request": "launch", | ||
| "mainClass": "dev.openfeature.demo.java.demo.Laboratory", | ||
| "projectName": "demo", | ||
| "console": "integratedTerminal", | ||
| "cwd": "${workspaceFolder}" | ||
| } | ||
| ] | ||
| } |
14 changes: 14 additions & 0 deletions
14
adventures/planned/00-blind-by-design/beginner/.vscode/tasks.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "π§ͺ Verify Solution", | ||
| "type": "shell", | ||
| "command": "./verify.sh", | ||
| "options": { "cwd": "${workspaceFolder}" }, | ||
| "problemMatcher": [], | ||
| "presentation": { "reveal": "always", "panel": "dedicated" }, | ||
| "group": { "kind": "test", "isDefault": true } | ||
| } | ||
| ] | ||
| } |
32 changes: 32 additions & 0 deletions
32
...ures/planned/00-blind-by-design/beginner/00-blind-by-design_01-beginner/devcontainer.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "name": "π§ͺ Adventure 00 | π’ Beginner (Stand up the lab)", | ||
| "dockerComposeFile": "docker-compose.yml", | ||
| "service": "workspace", | ||
| "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/adventures/planned/00-blind-by-design/beginner", | ||
| "postCreateCommand": "bash /workspaces/${localWorkspaceFolderBasename}/.devcontainer/00-blind-by-design_01-beginner/post-create.sh", | ||
| "postStartCommand": "bash /workspaces/${localWorkspaceFolderBasename}/.devcontainer/00-blind-by-design_01-beginner/post-start.sh", | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "vscjava.vscode-java-pack", | ||
| "vmware.vscode-spring-boot", | ||
| "vscjava.vscode-spring-boot-dashboard", | ||
| "redhat.vscode-xml" | ||
| ] | ||
| }, | ||
| "codespaces": { | ||
| "openFiles": [ | ||
| "adventures/planned/00-blind-by-design/docs/beginner.md", | ||
| "adventures/planned/00-blind-by-design/beginner/src/main/java/dev/openfeature/demo/java/demo/Trial.java", | ||
| "adventures/planned/00-blind-by-design/beginner/flags.json" | ||
| ] | ||
| } | ||
| }, | ||
| "forwardPorts": [8080], | ||
| "portsAttributes": { | ||
|
aepfli marked this conversation as resolved.
|
||
| "8080": { "label": "Lab (Spring Boot)", "onAutoForward": "notify" } | ||
| }, | ||
| "otherPortsAttributes": { | ||
| "onAutoForward": "ignore" | ||
| } | ||
| } | ||
39 changes: 39 additions & 0 deletions
39
...res/planned/00-blind-by-design/beginner/00-blind-by-design_01-beginner/docker-compose.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Multi-container devcontainer for Beginner. The lab itself runs in | ||
| # `workspace`; flagd runs as a sibling so participants meet the realistic | ||
| # shape ("the SDK talks RPC to a separate flag service") from level 1 | ||
| # instead of running file-mode in-process and throwing it away for | ||
| # Intermediate. | ||
| # | ||
| # Both services bind-mount the same workspace at the same path. flagd | ||
| # watches the participant's flags.json directly β edit it in the IDE, | ||
| # the file watcher reloads, the next request sees the new variant. | ||
|
|
||
| services: | ||
| workspace: | ||
| image: mcr.microsoft.com/devcontainers/java:1-21 | ||
| volumes: | ||
| - ../..:/workspaces/${localWorkspaceFolderBasename:-open-ecosystem-challenges}:cached | ||
| command: sleep infinity | ||
| environment: | ||
| # The flagd Java provider reads these env vars by default when | ||
| # FlagdOptions.builder() is invoked without an explicit host/port. | ||
| # Pre-set so a vanilla `Resolver.RPC` config Just Works inside the | ||
| # devcontainer β and a participant who runs the lab from their host | ||
| # machine after `docker compose up flagd` will hit `localhost:8013` | ||
| # via the published port. | ||
| - FLAGD_HOST=flagd | ||
| - FLAGD_PORT=8013 | ||
|
|
||
| flagd: | ||
| image: ghcr.io/open-feature/flagd:v0.15.4 | ||
| container_name: side-effects-beginner-flagd | ||
| volumes: | ||
| - ../..:/workspaces/${localWorkspaceFolderBasename:-open-ecosystem-challenges}:ro | ||
| command: | ||
| - start | ||
| - --uri | ||
| - file:/workspaces/${localWorkspaceFolderBasename:-open-ecosystem-challenges}/adventures/planned/00-blind-by-design/beginner/flags.json | ||
| # No `ports:` block β the lab reaches flagd on the docker-internal | ||
| # network as `flagd:8013`. We deliberately do not publish to the host: | ||
| # only :8080 is forwarded into the Codespace, so participants see one | ||
| # port to click in the Ports tab. |
28 changes: 28 additions & 0 deletions
28
adventures/planned/00-blind-by-design/beginner/00-blind-by-design_01-beginner/post-create.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
|
|
||
| REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" | ||
| CHALLENGE_DIR="$REPO_ROOT/adventures/planned/00-blind-by-design/beginner" | ||
|
|
||
| # shellcheck disable=SC1091 | ||
| source "$REPO_ROOT/lib/scripts/tracker.sh" | ||
| set_tracking_context "00-blind-by-design" "beginner" | ||
| track_codespace_created | ||
|
|
||
| # Install gum (used by the verify.sh output helpers). | ||
| "$REPO_ROOT/lib/shared/init.sh" --version v0.17.0 # https://github.com/charmbracelet/gum/releases | ||
|
|
||
| # jq is needed by verify.sh; the Java devcontainer image is debian-based. | ||
| if ! command -v jq >/dev/null 2>&1; then | ||
| sudo apt-get update -y | ||
| sudo apt-get install -y --no-install-recommends jq | ||
| fi | ||
|
|
||
| # Java 21 is provided by the devcontainer image (mcr.microsoft.com/devcontainers/java:1-21-bullseye). | ||
| # Pre-fetch Maven dependencies so the IDE is responsive immediately. | ||
|
aepfli marked this conversation as resolved.
|
||
| echo "β¨ Resolving Maven dependencies for the lab..." | ||
| cd "$CHALLENGE_DIR" | ||
| chmod +x ./mvnw | ||
| ./mvnw -q -B -DskipTests dependency:go-offline || true | ||
|
|
||
| echo "β Post-create complete." | ||
51 changes: 51 additions & 0 deletions
51
adventures/planned/00-blind-by-design/beginner/00-blind-by-design_01-beginner/post-start.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
|
|
||
| REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" | ||
| CHALLENGE_DIR="$REPO_ROOT/adventures/planned/00-blind-by-design/beginner" | ||
|
|
||
| cat <<EOF | ||
|
|
||
| β¨ Adventure 00 β Level 1 (π’ Beginner): Stand up the lab | ||
|
|
||
| π Challenge directory: | ||
| $CHALLENGE_DIR | ||
|
|
||
| 𧬠A flagd sidecar is already running next to your workspace | ||
| - gRPC eval :8013 (this is what your FlagdProvider will talk to) | ||
| - management :8014 (Prometheus metrics + /healthz, /readyz) | ||
| - sync :8015 (used in the Intermediate IN_PROCESS sidebar) | ||
| - OFREP :8016 (HTTP eval API, handy for poking flagd directly) | ||
| FLAGD_HOST=flagd is exported into this shell, so a default | ||
| Resolver.RPC config picks the sidecar up automatically. | ||
|
|
||
| βΆ Run the lab β one launch config in .vscode/launch.json: | ||
| π§ͺ Run the Lab | ||
| Open the Run and Debug view (Ctrl/Cmd + Shift + D) and hit βΆ. | ||
|
|
||
| Or from the terminal: | ||
| ./mvnw spring-boot:run | ||
|
|
||
| π In another terminal, hit it: | ||
| curl -s http://localhost:8080/ | jq | ||
|
|
||
| β Run the verification when you're ready: | ||
| ./verify.sh | ||
| or use the π§ͺ Verify Solution task: Tasks β Run Test Task. | ||
|
|
||
| EOF | ||
|
|
||
| # Track that the environment is ready. | ||
| # shellcheck disable=SC1091 | ||
| source "$REPO_ROOT/lib/scripts/tracker.sh" | ||
| track_codespace_initialized | ||
|
|
||
| # Open the relevant files in the connected editor. customizations.codespaces.openFiles | ||
| # is unreliable for dockerComposeFile-based devcontainers (the orchestrator merges | ||
| # devcontainer.json and the field is sometimes dropped). `code` is the same CLI the | ||
| # editor uses internally and works against either the web or desktop client. | ||
| if command -v code >/dev/null 2>&1; then | ||
| code "$REPO_ROOT/adventures/planned/00-blind-by-design/docs/beginner.md" \ | ||
| "$CHALLENGE_DIR/src/main/java/dev/openfeature/demo/java/demo/Trial.java" \ | ||
| 2>/dev/null || true | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # ============================================================================ | ||
| # Makefile for Blind by Design - Beginner Level: Stand up the lab | ||
| # ============================================================================ | ||
| # This Makefile provides convenient commands for running | ||
| # the Spring Boot lab and verifying your solution. | ||
| # ============================================================================ | ||
|
|
||
| .PHONY: help lab probe verify | ||
|
|
||
| # Default target - show help | ||
| help: | ||
| @echo "Blind by Design - Beginner Level: Stand up the lab" | ||
| @echo "" | ||
| @echo "Application:" | ||
| @echo " make lab - Start the Spring Boot lab on :8080" | ||
| @echo " make probe - Hit the lab endpoint and pretty-print the response" | ||
| @echo "" | ||
| @echo "Verification:" | ||
| @echo " make verify - Run verification checks" | ||
|
|
||
| # ---------------------------------------------------------------------------- | ||
| # Application Targets | ||
| # ---------------------------------------------------------------------------- | ||
|
|
||
| lab: | ||
| @./mvnw spring-boot:run | ||
|
|
||
| probe: | ||
| @curl -s http://localhost:8080/ | jq | ||
|
|
||
| # ---------------------------------------------------------------------------- | ||
| # Verification Targets | ||
| # ---------------------------------------------------------------------------- | ||
|
|
||
| verify: | ||
| @./verify.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "flags": {} | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.