Add DVP&R traceability and Playwright coverage for requirement validation#154
Conversation
Agent-Logs-Url: https://github.com/JosephPBaruch/CharAI/sessions/abdf826f-8470-4ba7-815a-24b80e839b68 Co-authored-by: JosephPBaruch <132173774+JosephPBaruch@users.noreply.github.com>
| - When a documented scenario is added to Playwright, update the matrix | ||
| from `Gap` to `Covered` and record the exact spec name. | ||
| - If reporting changes from the HTML reporter to another format, update | ||
| the CI execution and result-location sections above. |
There was a problem hiding this comment.
@copilot Find where the model requiremetns have accuracy requirements but this isn't good for a regression model. We will use r2 instead and this will be validated on model greation in the pipeline. There is currently a PR up fo this.
There was a problem hiding this comment.
Updated the regression-model validation wording to use R²-based pipeline validation in 764996d.
| | Prescription-map output exposes ROI-oriented map data rather than only raw form submission success. | `docs/01_Problem_Definition/Requirements.md` (`## Functional Requirements` -> `### User-Facing Input/Output`) | `User requests prescription maps`; `Export prescription maps` | `frontend/tests/charai.spec.ts`: `User creates field and views prescription map` (line 104) | Covered | The test validates `Analysis Summary`, `Total Grid Cells`, and exported GeoJSON grid cells containing a `paybackPeriod` property, which is the ROI-oriented field used by the product. | | ||
| | Users can export prescription-map results. | `docs/01_Problem_Definition/Requirements.md` (`## Functional Requirements` -> `### User-Facing Input/Output`) | `Export prescription maps` | `frontend/tests/charai.spec.ts`: `User creates field and views prescription map` (line 104) | Covered | Verifies download of a JSON file and parses the downloaded content. | | ||
| | Users can provide land area by uploading a file. | `docs/01_Problem_Definition/Requirements.md` (`## Functional Requirements` -> `### User-Facing Input/Output`) | `User enters land area using an uploaded file` | No current Playwright spec in `frontend/tests/charai.spec.ts` | Gap | The behavior is documented in both feature files, but there is not yet an executable Playwright test covering the upload path. | | ||
| | A signed-in user can access previous prescription-map data. | `docs/01_Problem_Definition/CharAI.feature` only | `User signs in` | No current Playwright assertion specifically proving retrieval of a previously created map after a new sign-in session | Gap | Authentication is covered, but this scenario detail is not yet explicitly automated. | |
There was a problem hiding this comment.
@copilot Was this: stateed in the .feature: A signed-in user can access previous prescription-map data. if it was, then create a test fo rthis now, you should be able to do this. If not, remove it from this file.
There was a problem hiding this comment.
This requirement is stated in the .feature, and I added Playwright coverage plus updated the traceability entry in 764996d.
| | Users can export prescription-map results. | `docs/01_Problem_Definition/Requirements.md` (`## Functional Requirements` -> `### User-Facing Input/Output`) | `Export prescription maps` | `frontend/tests/charai.spec.ts`: `User creates field and views prescription map` (line 104) | Covered | Verifies download of a JSON file and parses the downloaded content. | | ||
| | Users can provide land area by uploading a file. | `docs/01_Problem_Definition/Requirements.md` (`## Functional Requirements` -> `### User-Facing Input/Output`) | `User enters land area using an uploaded file` | No current Playwright spec in `frontend/tests/charai.spec.ts` | Gap | The behavior is documented in both feature files, but there is not yet an executable Playwright test covering the upload path. | | ||
| | A signed-in user can access previous prescription-map data. | `docs/01_Problem_Definition/CharAI.feature` only | `User signs in` | No current Playwright assertion specifically proving retrieval of a previously created map after a new sign-in session | Gap | Authentication is covered, but this scenario detail is not yet explicitly automated. | | ||
| | The system supports multiple users concurrently. | `docs/01_Problem_Definition/CharAI.feature` only | `System supports multiple users` | No current Playwright spec in `frontend/tests/charai.spec.ts` | Gap | This scenario is documented but not yet represented as a Playwright test. | |
Agent-Logs-Url: https://github.com/JosephPBaruch/CharAI/sessions/5d452bef-0877-4d31-9cb1-c38d5e52a0db Co-authored-by: JosephPBaruch <132173774+JosephPBaruch@users.noreply.github.com>
Agent-Logs-Url: https://github.com/JosephPBaruch/CharAI/sessions/5d452bef-0877-4d31-9cb1-c38d5e52a0db Co-authored-by: JosephPBaruch <132173774+JosephPBaruch@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Pull in recent changes from main. Then add details on how the ci is checking that the r2 of the accuracy and add details to the dvp and r. Change the r2 threshold in the ci to be higher (.2). Rename the dvp and r file to just be dvp and r. |
…mentation-for-tests Co-authored-by: JosephPBaruch <132173774+JosephPBaruch@users.noreply.github.com>
…I R2 details Agent-Logs-Url: https://github.com/JosephPBaruch/CharAI/sessions/f4a1a779-95b2-4314-8177-79b505637f0c Co-authored-by: JosephPBaruch <132173774+JosephPBaruch@users.noreply.github.com>
Done in f6cf189:
|
Adds a DVP&R document that connects the product requirements and documented user scenarios to the current Playwright suite and CI reporting path, and extends the Playwright suite to cover additional documented requirements. The updated scope makes the existing validation coverage scannable, converts the regression-model validation language to R²-based pipeline validation, and turns previously documented gaps into executable browser tests.
New DVP&R traceability document
docs/06_Design_Validation/DVPR.mddocs/01_Problem_Definition/Requirements.mddocs/01_Problem_Definition/CharAI.featurefrontend/tests/CharAI.featurefrontend/tests/charai.spec.tsbackend/YieldPredictionModel/CreateAndTrainYieldCalculatorModel.pybackend/YieldPredictionModel/README.mdbackend/DockerfileRequirements-to-test mapping
New Playwright coverage
frontend/tests/charai.spec.tsinto shared helpers to keep the new coverage maintainableModel R² validation in CI
MIN_R2_THRESHOLDfrom 0.0 to 0.2 in the training script and updatedbackend/YieldPredictionModel/README.mdto matchci.yaml→docker/bake-actionwithCACHEBUST→Dockerfile→ training script accuracy gatedocs/06_Design_Validation/ValidationPlan.mdwith the specific R² threshold (0.2) and CI enforcement detailsCI execution and reporting
.github/workflows/ci.yamlfrontend/tests/playwright-report/playwright-reportMerged main branch changes
Maintenance guidance
MIN_R2_THRESHOLDchangesExample traceability entry shape: