Skip to content

Tell learners about gated access before they do any setup - #233

Merged
ivorb merged 2 commits into
mainfrom
gated-task-notices
Aug 17, 2026
Merged

Tell learners about gated access before they do any setup#233
ivorb merged 2 commits into
mainfrom
gated-task-notices

Conversation

@ivorb

@ivorb ivorb commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

What

Tasks B2, B3 and B4 need permissions or licensing many learners don't have, but each buried that below the setup instructions.

B4 was the worst case: it told you to create a Foundry project, clone the code and run a preflight check — and then mentioned the whole task needs a Microsoft 365 Copilot licence.

The fix

A generated access notice at the top of all three pages, so a learner who can't do the task finds out in about thirty seconds rather than after provisioning.

> ### Check your access before you start
>
> **This task needs:** A Microsoft 365 Copilot licence, IT admin consent for Work IQ, and Node.js 18 or later.
>
> Run the command below. If it returns your calendar you're ready; if it reports
> missing consent or no Copilot licence, skip this task.

npm install -g @microsoft/workiq && workiq accept-eula && workiq ask -q "What meetings do I have today?"

> **Don't have it?** Skip this task. Nothing else in this lab depends on it...

That last line matters as much as the requirement: skipping has to feel safe, not lossy.

How it's generated

tools/generate_lab_blocks.py (added in #231) writes it into the markdown from the page's own frontmatter, so the requirement is stated once and can't drift from the lock icons in the lab tables or the demo-only callouts in the workshop view.

Unlike the task table, the notice is generated only where its markers appear. Where it goes is an editorial choice, and a gated task might reasonably carry the warning in its own prose instead — so a missing marker isn't an error here, whereas a landing page without a task table is.

Removes the prose notes this replaces.

Verification

  • Renders on exactly the 3 gated pages and nowhere else
  • Produces a single blockquote rather than splitting in two when there's no command
  • Tier 0 and generate_lab_blocks.py --check pass

Stacking

Branches off poc-lab-views (#231), which introduces the access / requires / verify frontmatter and the generator. Merge #231 first.

…rom it

Per-task section, difficulty and duration existed only as prose inside the
hand-written "Lab at a glance" tables on the three landing pages. Nothing
validated them against the task pages they described, and they had already
drifted.

Moves that data into each task's frontmatter (type, parent, order, section,
difficulty, duration, access) and generates the tables from it.

The tables are written into the markdown by tools/generate_lab_blocks.py
rather than rendered by a Liquid include. The lab pages are read directly by
platforms that never run Liquid - GitHub's own markdown API returns a bare
"{% include ... %}" where the table should be - so the generated content sits
between HTML comment markers, which are invisible in every renderer.
--check runs in content-checks and makes drift a build failure, matching the
Labfiles/_shared/sync.py pattern.

A lab landing page missing its markers is an error, so a new lab cannot
silently ship without a table. The access notice is treated differently: it
is generated only where its markers appear, because where that warning goes
is an editorial choice.

Fixes the drift the backfill exposed:
- level was 300 on every task page, inherited from its lab, while the tables
  listed L200-L400. Level now matches difficulty everywhere.
- islab removed from task pages; a task is a step within a lab, not a lab.
- B2, B3 and B4 marked access: gated, each recording what it needs and how to
  check, so the lock icons come from the same source as the requirement.

Verified: the generated tables reproduce the totals the prose stated by hand
(A 35 min core / 2h25, B 35/1h50, C 30/2h), the generator is idempotent, and
corrupting a block makes --check fail with a diff.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dc4690cc-57d6-48a7-abc8-bc8570113ab1
Tasks B2, B3 and B4 need permissions or licensing many learners don't have,
but each buried that below the setup instructions. B4 was the worst case: it
told you to create a Foundry project, clone the code and run a preflight
check, and only then mentioned the whole task needs a Microsoft 365 Copilot
licence.

Adds a generated access notice at the top of all three, so a learner who
can't do the task finds out in about thirty seconds rather than after
provisioning. It states what the task needs, how to check, and - importantly
- that skipping costs nothing, because nothing else in the lab depends on
these tasks.

The notice is written into the markdown by tools/generate_lab_blocks.py from
the page's own frontmatter, so the requirement is stated once and cannot
drift from the lock icons in the lab tables. It is generated only where its
markers appear: where the warning belongs is an editorial choice, and a gated
task may carry it in its own prose instead.

Removes the prose notes this replaces.

Verified: the notice renders on exactly the three gated pages and nowhere
else, and produces a single blockquote rather than splitting in two when
there is no command to run.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dc4690cc-57d6-48a7-abc8-bc8570113ab1
@ivorb
ivorb force-pushed the gated-task-notices branch from 7410980 to 4e70c9a Compare August 17, 2026 14:54
@ivorb
ivorb changed the base branch from poc-lab-views to lab-metadata August 17, 2026 14:54
@ivorb
ivorb changed the base branch from lab-metadata to main August 17, 2026 15:06
@ivorb
ivorb merged commit b0ff1d4 into main Aug 17, 2026
1 check passed
@ivorb
ivorb deleted the gated-task-notices branch August 17, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant