← Back to Pull requests

Reject fractional marks in the data file #137

Open
unknown opened this pull request with 172 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 25, 2026 13:15 UTC
Author

Fixes #132

A hand-edited participation score or grade such as 5.9 or 100.9 in tassist.json loads as 5 or 100 without any warning, and the next save writes the truncated value back. The UG requires whole numbers, and an invalid file should be protected rather than changed.

What changed

  • JsonUtil turns off Jackson's ACCEPT_FLOAT_AS_INT, so a fractional number in a whole-number field makes the file invalid. The existing invalid-file protection then applies: data-changing commands are rejected and the file is left as it is.

  • Two tests in JsonTAssistStorageTest cover a fractional participation score and a fractional grade. Both fail without the fix.

  • The UG's "Editing the data file" section says a fractional score or grade makes the file invalid.
  • @arav31, heads-up on grades: this also changes how assignment grades are read. A grade such as 87.5 in the data file is now rejected instead of being loaded as 87. Entering grades through assignment grade is unchanged.

    Notes for reviewers

  • The setting applies to every whole-number field the mapper reads, including the window position in preferences.json.

  • Values such as 5.0 are also rejected. Accepting them while rejecting 5.9 would need custom parsing code.

  • The startup message still does not say why the file was rejected. That is #118, which is a separate change.
  • Diff: 172 lines (+129 / -43) across 2 files Reviewer: copilot-pull-request-reviewer[bot] Review duration: 0m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.35) × (1 − Review Confidence (0.18)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.35 · 172 lines diff across 2 files
    0.35
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 19% · Reviewer familiarity: 35%
    17%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.308
    Real PR Conversation Timeline
    1 comments
    "Review active on #137"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 17.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 35.3% (MEDIUM) · Higher = larger blast radius
    35.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 17.8% · Lower = rushed or shallow review
    17.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 29.0% · Safe to merge
    29.0%