Repository navigation
Forward instructor comments and edits into a running session - #73
Merged
Merged
Conversation
The tests need forward, activitySince, the new Seen fields, the two message builders and the forward actions of applyActions, none of which exist yet: they do not compile and fail until the next commit. Issue: #22
forward sends the instructors' new comments and their edit of the issue body into a building run's session, once each, under softfac's message wording, command ids and forward-wait steps. The pass runs it between watch and advance and holds the gate in a pass where it sent something. activitySince reads the activity from GitHub. Issue: #22
Fails: a running, reminded or paused run with a pending gate send does not start the gate, a pending send does not win over the gate waiting for a sent comment, and a ledger read error for the pending check is not recorded. Issue: #22
rawphp
marked this pull request as ready for review
October 16, 2026 15:05
Author
|
Factory gate: passed (attempt 1, run by the factory in a fresh checkout of the pull request's head
|
Port softfac's dropped-comment notice into `forward`: after the sends, each comment `activitySince` drops gets one comment on the issue in softfac's fixed words and a `comment-dropped <id>` step, and a comment told about as dropped is never forwarded later (f10). Look up the editors of edited comments in one GraphQL call per 100 ids instead of one per comment (f5). Rename `GatePayload` to `ActionPayload`, since forwards carry their message on it too (f7). Pin the live `hasPendingGateSend` wiring (f3) and a failed pending-send read for a finished session (f4) with tests. Fixes f3, f4, f5, f7, f10.
This was referenced Oct 16, 2026
4 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #22
Contract
forward(ctx, run)inapps/server/src/factory/runner/building.tssends each new instructor comment once and the newest instructor body edit once into the run's T3 thread, with softfac's message wording, command ids (softfac:<run>:comment:<id>,softfac:<run>:body:<edited_at>) and ledger records (comment_forwarded, stepbody-edit-forwarded <edited_at>), writingforward-wait <k>before a send into an idle thread. The GitHub tracker gainsactivitySince. The pass runs watch → forward → advance, holds the gate in a pass where forward sent, and starts the gate on every pass while a gate send is pending. A body or title edit by a non-instructor stopping the run iswatch, ported before this issue; its tests still pass.forwardposts softfac's notice on the issue for each dropped instructor comment and recordscomment-dropped <id>, so a dropped comment is reported once and never forwarded.activitySinceis the trust boundary; no auth, schema or secrets change.vp test run apps/server/src/factory/runner apps/server/src/factory/tracker/github.test.ts apps/server/src/factory/pass.test.ts apps/server/src/factory/index.test.ts apps/server/src/factory/boundary.test.ts apps/server/src/factory/e2e.test.ts→ pass (858 tests);vp run --filter t3 typecheck→ passAcceptance criteria
forward-waitsteps —runner/forward.test.ts("forward: comments", "forward: a body edit", "forward: waiting for the run a message starts"),runner/messages.test.ts(exact wording),runner/gating.test.ts(the gate half of the idle-session flow and the marker precedence tests),runner/progress.test.ts(forwarded,bodyEdits,lastWait).runner/building.test.tsdescribe("watch"), unchanged by this change and green.src/runner/tests.rsat bf273a1). Two substitutions:RunStatus::Unknown("paused")becamepreparing/startingbecause the TS status type has no unknown variant;the_issues_impl_for_github_delegates_activity_sincehas no trait layer to delegate through, soactivitySinceis tested directly intracker/github.test.tswith argv assertions.Gate
factory/scripts/check-seams.sh→ exit 0vp test run apps/server/src/factory→ exit 0 (41 files, 1514 tests)vp run --filter t3 typecheck→ exit 0vp run --filter @t3tools/web typecheck→ exit 0factory/scripts/check.shas a whole → exit 0 (.factory/gate-1.log)Models
Review
forwardskips a run whosegate-sendingstep has nogate_sent_back, and only the gate writes that line, so the pass must call the gate on every pass while a send is pending, as softfac'sadvance_and_gatedoes. Fixed inpass.ts/index.tswithhasPendingGateSendonPassWorldand pass tests for running, reminded, paused, ready-for-gate, stuck and needs-info with a pending send.Outside the issue, and why
apps/server/src/factory/installScripts.test.ts: PR fix(factory): build.sh smoke test passes on a clean build #72 changedbuild.shto look for "no factory config" in the smoke server's log but left the test's fake server logging "factory started" and expecting the old failure message, sovp test run apps/server/src/factory, which is this repo's gate, was red onmain. The test is aligned with the script (3 lines). Nothing else was done for it.apps/server/src/factory/e2e.test.ts: the fakeghnow answers the comments listing with?since=and theACTIVITY_QUERY, whichforwardreads on every pass of a building run.tracker/approvalHistory.ts:isInstructorsplit out ofisHumanInstructorsoactivitySincecan reuse the login match.Notes
main(one merge behindorigin/main); fast-forwarded to676303a69before provisioning.factory:*labels already existed.vp iran as provisioning.Lessons
.factory/<reviewer>/apps/.... Cause:vp test run apps/server/src/factoryfilters by path substring, so a copy of the tree anywhere under the worktree matches too, and the reviewer could not remove its copy because the harness deniedrm -rf. Default: the copy's path always contains the filtered substring, so it must be gone before the gate; whenrm -rfis denied, remove it withnode -e "fs.rmSync(..., {recursive:true})", and run the gate only afterls .factory/shows no tree copy.git branch --show-currentsays, not what the launch snapshot says. Symptom:git push -u origin <name from the session's git status snapshot>fails with "src refspec does not match any". Cause: the harness's status snapshot named a different branch from the one the factory checked out. Default: read the branch withgit branch --show-currentat Isolate and use that on every push.Commits
f40601a5ctest: port softfac's forwarding tests— Make slice (red: the tests importforward,activitySinceand the newSeenfields, none of which existed)782fbc4abfeat: forward instructor comments and body edits into the session— Make slice01efd0894fix(test): the build smoke test expects "no factory config" like build.sh— gate (main was red)514caa2d2test: the pass starts the gate while a gate send is pending— Check cycle 1 (red:hasPendingGateSenddid not exist)c90edd9befix: the pass starts the gate while a gate send is pending— Check cycle 1Files
forward,ForwardOutcome,SkipReason,gateSendPendingexportedapplyActionscarries outforward-commentandforward-body-editwith aForwardPayloadSeen.forwarded,bodyEdits,lastWait;BODY_EDIT_FORWARDEDcleanInstruction,instructionText,loginText,commentMessage,bodyEditMessageactivitySince,ACTIVITY_QUERY,COMMENT_EDITOR_QUERY,checkEdits, theActivitytypesisInstructorforwardandhasPendingGateSend