Skip to content

feat: reconcile academic task status evidence - #30

Merged
Muawiya-contact merged 4 commits into
mainfrom
feat-issue-25-academic-reconciliation
Nov 21, 2026
Merged

Muawiya-contact merged 4 commits into
mainfrom
feat-issue-25-academic-reconciliation

Conversation

@Muawiya-contact

Copy link
Copy Markdown
Member

Closes #25

What changed

  • Adds append-only task observations for NFC portal status/deadline transitions and explicit owner-reported completion.
  • Makes a missing item in a successful NFC listing an unresolved observation, never proof of completion.
  • Records VU availability/deadline observations while documenting that Classic To Do cannot prove submission or grading.
  • Includes completed tasks and recent academic observations in natural status questions, with source-check timestamps.
  • Sends one private summary only when scheduled portal checks find a meaningful change.

Safety model

  • NFC portal states such as submitted, reviewing, graded and expired can change Maya task state because they are authoritative portal evidence.
  • A completion said in text or voice is stored as owner-report, not as a portal-confirmed result.
  • VU Classic To Do does not expose a verified completion state; missing VU rows and passed due dates do not complete a task.

Validation

  • browser-use --doctor
  • npm run typecheck
  • npm run lint
  • node --import tsx --test tests/nfc-sync.test.mjs tests/nfc-scheduler.test.mjs tests/vu-scheduler.test.mjs tests/vu-classic-todo.test.mjs tests/context-phase3.test.mjs tests/natural-done.test.mjs tests/commands.test.mjs (26 passing)
  • git diff --check

Manual verification after deployment

  1. Change an NFC assignment status or deadline in the portal, wait for/trigger the next scheduled NFC sync, and ask Maya what changed?.
  2. Say I completed <task name> and ask what have I completed?; Maya must not describe it as portal-confirmed.
  3. Ensure a known NFC assignment is absent from one successful listing: it must remain unresolved, never be marked done.

No credentials, LMS content, or student data are in this PR.

@netlify

netlify Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for maya-assistant ready!

Name Link
🔨 Latest commit c3ed687
🔍 Latest deploy log https://app.netlify.com/projects/maya-assistant/deploys/6b01420c82a0e124af3a0a4c
😎 Deploy Preview https://deploy-preview-30--maya-assistant.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T07:11:17.399826Z c3ed687 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3656dc40a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/context.ts
Comment on lines +111 to +112
WHERE t.status IN ('open', 'done') OR (t.status = 'expired' AND t.updated_at >= ?)
ORDER BY CASE t.status WHEN 'open' THEN 0 WHEN 'done' THEN 1 ELSE 2 END, t.due_at IS NULL, t.due_at, t.id LIMIT ?`)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep completed tasks out of deadline context

For a question like “when is my assignment due?”, this query now includes completed tasks in the same candidates as open work. The later relevance sort breaks ties by due date, so if at least 14 older completed assignments match the query, they can fill the evidence slots and hide upcoming open deadlines. Include completed tasks only for academic-status questions, or rank open tasks ahead of completed ones.

AGENTS.md reference: AGENTS.md:L5-L6

Useful? React with 👍 / 👎.

@Muawiya-contact

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be417199a9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/context.ts Outdated
status: row.status, updatedAt: row.updatedAt });
}

if (/\b(?:what changed|changes?|status)\b|بدل|حالت/iu.test(question)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include completion provenance in status-answer context

When the owner asks whether an assignment was submitted or what they completed, wantsAcademicStatus includes the task, but this branch only adds observations for questions containing “what changed,” “changes,” or “status.” The model then sees only a generic done task status, so it cannot distinguish an owner-reported completion from portal-confirmed submission and may attribute completion to VU, which does not provide reliable submission evidence. Include observations for submitted/completed questions or otherwise expose the evidence kind.

AGENTS.md reference: AGENTS.md:L5-L7

Useful? React with 👍 / 👎.

@Muawiya-contact

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3ed687818

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +73 to +74
const observation = recordTaskObservation({ taskId: assignment.taskId, source: 'nfc-cms', status: 'missing',
dueAt: null, observedAt: now, evidenceKind: 'missing_from_successful_listing' });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate the NFC listing before marking assignments missing

If the authenticated assignments page has no matching table rows, assignmentRows() returns [] and parsing succeeds; this loop then records every known linked assignment as missing and the scheduler can notify the owner based on that false evidence. Validate that the expected listing was actually read before treating absent IDs as missing.

AGENTS.md reference: AGENTS.md:L5-L6

Useful? React with 👍 / 👎.

Comment thread src/features/context.ts
if (wantsAcademicStatus) {
const since = new Date(now.getTime() - 14 * 24 * 60 * 60_000).toISOString();
for (const source of ['nfc-cms', 'vu-classic-todo', 'owner-report']) {
for (const observation of recentTaskObservations(source, since).slice(-8)) add({

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scope status observations to the requested tasks

When a task’s observation is older than the latest eight observations for its source, this global cap drops it even if the task itself is selected for the question. The context then contains only the task’s generic done status, so Maya cannot distinguish portal-confirmed submission from owner-reported completion; select observations for the relevant task IDs before applying the cap.

Useful? React with 👍 / 👎.

@Muawiya-contact
Muawiya-contact merged commit 3fea8b5 into main Nov 21, 2026
6 checks passed
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.

Make academic task tracking autonomous through continuous status reconciliation

1 participant