chore(rebar): Pier_T_rebar 작업 폴더 초기 구성 및 외부 의존 파일 통합
- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환 - Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용 - pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관) - worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md) - D:\Rhino-MCP 경로 참조를 새 위치로 치환 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
964a841de1
3978 files changed
+58013356
No files matched your search
@@ -0,0 +1,50 @@
|
||||
"""Offline container smoke check: seed cache, filename normalization and DWG decode.
|
||||
|
||||
Run with a read-only existing DWG mounted at /test-input.dwg. No AI calls.
|
||||
"""
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import re
|
||||
import sys
|
||||
import tempfile
|
||||
sys.path.insert(0, '/app/src/backend')
|
||||
from shared_cache_seed import install_bundle
|
||||
from model_snapshot_lookup import job_drawings, lookup
|
||||
from dwg_conversion import convert_dwg
|
||||
|
||||
|
||||
def main():
|
||||
source = Path('/test-input.dwg')
|
||||
raw_hash = hashlib.sha256(source.read_bytes()).hexdigest()
|
||||
with tempfile.TemporaryDirectory(prefix='packaged-dwg-test-') as tmp:
|
||||
data = Path(tmp)
|
||||
install_bundle(Path('/app/shared-cache/selected-models.zip'), data)
|
||||
jobs = data / '8097-jobs'
|
||||
matches = []
|
||||
for file in jobs.glob('*.json'):
|
||||
job = json.loads(file.read_text())
|
||||
drawings = job_drawings(job, data / 'uploads')
|
||||
hit = lookup(jobs, drawings, data / 'uploads')
|
||||
assert hit and hit['jobId'] == file.stem
|
||||
renamed = [dict(row, name=re.sub(r'_(\d\d)_', r'(\1)', row['name'])) for row in drawings]
|
||||
assert lookup(jobs, renamed, data / 'uploads')['jobId'] == file.stem
|
||||
if len(drawings) > 1:
|
||||
assert lookup(jobs, renamed[:-1], data / 'uploads') is None
|
||||
changed = [dict(row) for row in drawings]
|
||||
changed[0]['sha256'] = 'f' * 64
|
||||
assert lookup(jobs, changed, data / 'uploads') is None
|
||||
matches.extend(row for row in drawings if row['sha256'] == raw_hash)
|
||||
assert matches, 'Input DWG does not correspond to a retained model'
|
||||
audit = convert_dwg(source, data / 'decoded.dxf')
|
||||
expected = matches[0]['conversionAudit']
|
||||
assert audit['source_sha256'] == raw_hash
|
||||
assert audit['entity_count'] == expected['entity_count'], (audit['entity_count'], expected['entity_count'])
|
||||
print(json.dumps({'cached_models_checked': len(list(jobs.glob('*.json'))),
|
||||
'dwg_entity_count': audit['entity_count'],
|
||||
'dxf_bytes_equal_to_saved_conversion': audit['output_sha256'] == expected['output_sha256'],
|
||||
'ai_calls': 0}))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in new issue
Block a user