Repository navigation
[RFC] Restricted classroom publication and roster-based access: school deployment experience and learning-observation integration #2407
yipwingtim
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
This RFC proposes an initial scope for restricted classroom publication and roster-based access, informed by an existing school deployment.
It builds on the completed owner/identity and server-only persistence foundation in #1658. It does not propose built-in accounts, a native OIDC client, or teacher/student roles in core.
For learning observations, this RFC complements Discussion #1919 and tracking issue #1920. It focuses on how restricted publication and deployment-managed membership establish an authorized learning context. It does not propose a second observation schema, aggregation model, or teacher dashboard.
The purpose of this RFC is to:
Related: #23, #1658, Discussion #1919, #1920, #237, and #2308.
Motivation
A school may already have authentication and an authoritative directory of students. It needs to publish a classroom to a selected group without making the content available to every authenticated user or giving learners document ownership.
The deployment needs to answer:
Ownership, content access, runtime participation, and permission to read learning reports are different decisions. Joining a roster must not grant document editing rights or expose another learner's private runtime state.
Current school implementation: prior art
The implementation below is deployment-specific prior art, not a proposal to merge the school fork wholesale.
Authentication and identity
The deployment uses school OAuth login/logout and a signed application session.
An OwnerAuthMethod validates the session and returns an OwnerPrincipal through the existing authentication seam. The adapter currently uses the school user identifier as ownerId.
This demonstrates that school authentication can integrate without introducing an authentication protocol into core.
Limitations:
Classroom management and publication
Classroom management is restricted to the document owner.
The teaching layer stores publication records and supports:
For roster-based viewing, the current implementation compares the authenticated school user ID with the roster's student number.
Limitations:
Rosters
The owner can import and manage student records for a classroom-associated roster.
Repeated imports update records using the course/student-number relationship.
This is a learner access roster. It is separate from the Agent roster used to configure classroom characters and voices.
Limitations:
Learning records
The school implementation stores learning sessions, heartbeat-based activity duration, scene events, and quiz submission notifications in PostgreSQL.
It also provides administrative summaries by classroom and learner.
Important limitations:
These records are useful implementation experience, but they are not an implementation of #1919's observation contract.
Scope
In scope for this RFC
Out of scope
A small reference policy may be useful, but whether portable roster storage belongs in core or an optional integration remains an open question.
Existing upstream foundations
The current foundation already provides:
This RFC does not ask to rebuild those facilities.
The persistence hooks inspected do not currently offer a general restricted-document-read policy callback. The school implementation therefore adds its viewing policy to multiple route paths.
That integration cost motivates discussion of a consistent authorization boundary. It does not establish that a new hook is necessarily the best solution.
Proposed design principles
1. Keep ownership separate from access
A classroom retains one canonical owner.
Roster membership may grant access to an authorized learning view. It does not grant permission to edit, delete, publish, or manage the source document.
Likewise, permission to view course content must not automatically grant access to:
The implementation must identify which content and assets belong to the learner-visible publication.
2. Resolve identity on the server
A browser must not select an arbitrary learner identity through a request field.
Authentication adapters provide the principal. Deployment policy maps that principal to membership.
Names are display labels, not credentials or deduplication keys. A student number may be one deployment's mapping input, but it should not become a required core identifier format.
Unsupported identity modes should be rejected explicitly. A shared-owner installation must not silently represent all students as separate learners.
3. Separate restricted access from reporting registration
A roster that grants access and a registration that determines reporting participation are related but distinct.
Discussion #1919 proposes lightweight registration and teacher confirmation for shared-course reporting. This RFC should not silently replace that workflow with formal enrollment, nor assume that roster import constitutes consent to reporting.
We need an explicit decision about how deployment-managed membership relates to:
4. Use one policy across entry points
The design should inventory and cover relevant entry points, including:
A library-listing hook improves discovery but is not an authorization boundary.
A central policy decision alone is also insufficient unless downstream reads and runtime operations enforce the same context.
5. Make publication and learning context explicit
A stage ID alone is insufficient for reporting about a particular share.
The integration should align with #1919's learner × share × content-version context. The server must authorize that context before admitting observations or runtime activity.
A publication record may identify a restricted share, but its relationship to upstream sharing identifiers and immutable content definitions needs agreement.
This RFC does not introduce a separate content-version model. Pinning, republishing, cohorts, and historical interpretation should align with #1919.
6. Define revocation and lifecycle behavior
The design must distinguish:
These decisions should not be implicit side effects of removing a roster row.
Identity claims, owner changes, classroom deletion, and learner deletion also need explicit handling for host-owned membership and publication data. This RFC does not assume existing core lifecycle mechanisms automatically include those tables.
Relationship to learning observations
Discussion #1919 should remain the reference for:
This RFC contributes the admission and context questions around those observations:
For durable quiz/PBL capture, the transaction boundary and retry-receipt concern raised in #1919 apply here as well. A browser notification after a successful business write is insufficient.
An implementation slice should include the fixture described there: commit completion, lose the response, retry the operation, and verify one business fact and one durable delivery entry. Conflicting reuse of the operation ID must fail.
We should coordinate that contract in #1919/#1920 rather than implement it independently in the school integration.
Core and deployment responsibilities
Migration and privacy
The school tables should not be copied into core unchanged.
A migration design should:
Learners should be told what is collected and who can see it. Historical self-study or unrelated conversations must not become visible merely because a learner joins a roster.
Suggested implementation slices
Each slice should be independently reviewable and avoid introducing the entire school administration stack.
Proposed acceptance criteria
Open questions for maintainers
Feedback on these boundaries would be helpful before implementation PRs are prepared.
All reactions