Repository navigation
feat(labs): chấm tự động lab L02–L06 trên AutoCAD thật - #32
Merged
Merged
Conversation
- labs/: starter files (L02–L05), reference solutions (LoiGiai/), grader commands and run-lab.ps1. 20 checks; the real CadContext runs headless through a GetAcadDocument shim. - Sample drawing (LAB_SAMPLE / -SaveSample) with dynamic blocks cloned from the Autodesk sample set installed with AutoCAD; SKIP when it is missing. - L05 part 2 and L06 grade v1.0.0 code from a git worktree (-FrameworkRoot). - Runner closes the CER dialog its own crashed session opened, and keeps stdin open so an extra prompt times out instead of crashing. - Docs: modifying a ForRead object and GetObject on a disposed transaction abort AutoCAD (fatal error), they do not throw; fix T01, T03, T10. Drop the T10 rule-6 advice to copy HeadlessLab onto v1.0.0 (it does not build). - CI builds labs (starter + solutions); Dependabot scans /labs; plugin excludes labs\**. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In a multi-line pwsh step only the last command's exit code decides the step result, so a broken starter build was masked by a passing solutions build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Phần còn lại của GĐ2 (bài tập chấm tự động): bộ chấm cho lab L02–L06 của T10, chạy trên AutoCAD thật bằng accoreconsole
/isolate(không đổi thiết lập AutoCAD của máy).Có gì
labs/L02…L05/: file bài làm có sẵn chữ ký vàTODO.labs/LoiGiai/: lời giải mẫu.labs/Grader/: lệnh chấmLAB_GRADE_*.labs/run-lab.ps1: build, chạy từng phiên accoreconsole, in[PASS]/[FAIL]/[SKIP]kèm lý do.DxfNamemà không mở entity nào (đọcTransaction.GetAllObjects()); tên thật của dynamic block*U…; không có gì mởForWrite; Layout1.PromptingForPoint).OnLayersExact(B-17).RemoveMetadataErase Xrecord (B-09).CadContextthật chạy trong accoreconsole nhờ shim choGetAcadDocument(COM của AcMgd, chỉ dùng để gom Undo).v1.0.0): làm trong mộtgit worktree, chấm từ repo chính bằng-FrameworkRoot <worktree>.Phát hiện khi làm (đã sửa tài liệu)
ForReadkhông ném exception. AutoCAD dừng hẳn:INTERNAL ERROR: !dbobji.cpp@8668: eNotOpenForWrite. Đã thử gánColorIndex,AppendEntity,Erase.GetObjecttrên transaction đã Dispose cũng vậy:FATAL ERROR: Unhandled Access Violation. T01 §4.2, T03 B2 và T10 L03 trước đây ghi là exception, nên học viên làm theo sẽ làm sập AutoCAD đang dùng. Giờ các trang đó ghi đúng hành vi, và hai thí nghiệm chạy qua runner.tests/integration/HeadlessLab/sangv1.0.0. Làm vậy thì HeadlessLab không biên dịch được (thiếu file framework mới), và pluginv1.0.0báo 4 lỗi vì csproj cũ biên dịch nhầm nó vào plugin. Đã thay bằng cách làm qua worktree.senddmp.exe). Runner đóng đúng hộp thoại do phiên của nó mở, nên không gửi gì cho Autodesk.Đã kiểm (AutoCAD 2024, accoreconsole)
main(lỗi đã sửa ở PR fix: resolve the technical backlog (B-01…B-29) + HeadlessLab on real AutoCAD #6); trên worktreev1.0.0thì đỏ, áp bản sửa thì xanh.GetObject,br.Name,LayerTableForWrite, ModelSpace thay cho CurrentSpace,Commitở TN1,ForWriteở TN2, chỉ đọc thuộc tính ở TN3,LockDocumentở TN4,Executenối tiếp ở TN5, không đổi màu ở TN6, không đổi UCS → WCS, bản thô có đổi hệ, prompt trongExecute, hỏi thừa một điểm, filter thiếu`*U*, không lọc lại theo tên thật): cả 16 đều bị bắt, đúng kiểm tra, đúng lý do.AC1032), chấm lại trên chính file đó: đạt. Nhánh SKIP: thử bằng cách tạm đổi tên file mẫu.--IncludeDemos false, hive tạm): plugin build sạch, lab build cả hai bản, chấm L02 và L03-TN5 đạt.CadCoreFramework.slnRelease-warnaserror0 cảnh báo; 376/376 test (net48 và net8).labs/Labs.csprojRelease-warnaserror, cả code khởi đầu lẫn lời giải. Jobdocs: link, ⏱, mermaid, code mẫu, bài tập đều 0 lỗi. Workflow và dependabot.yml qua schema SchemaStore.Chưa kiểm
labs\bin\Debug\net48\CadCoreFramework.Labs.dllvà các lệnhTRAIN_DUMP,TRAIN_DOORS,TRAIN_LINE2P,LAB_SAMPLE(labs/README "Thử tay trong AutoCAD"). training/README ghi rõ mục này là chưa thử.🤖 Generated with Claude Code