Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Searched open and closed MatrixOne issues for "SQL file access policy is required", "line_terminator_boundary_test", and "ReadFileOffset". The first two searches found no match. Issues #30341, #30378 and #30394 concern CSV splitting/reader ownership, rather than these fixtures missing the required SQL file authority context.
Branch Name
main; also observed on PR #27716, branch m-27655.
Commit ID
Official main: 47b9690.
PR head: 16fa9d9.
Other Environment Information
- CI: Ubuntu/Linux x86_64, Go 1.27.1, CGo enabled,
matrixone_testbuild tag. - Local paired reproduction: Darwin/arm64, Go 1.27.1, repository
mo-cgo-testwrapper with existing native libraries verified as read-only build inputs. - Run 38933060718, original attempt 1, source PR fix: correct information schema views metadata #27716.
Actual Behavior
The four ReadFileOffset test groups in pkg/sql/colexec/external/line_terminator_boundary_test.go fail before reaching their delimiter/reader-ownership oracles:
- TestReadFileOffsetNonStrictLineTerminators: 9 failing child cases.
- TestReadFileOffsetNonStrictOverlappingBoundary: 4 failing child cases.
- TestReadFileOffsetConflictingFieldTerminator: 8 failing child cases.
- TestReadFileOffsetProbeOwnership: 7 failing child cases.
Both CI producers report the same 28 failing children plus their four parent tests. The stable error is:
Error Trace: pkg/sql/colexec/external/line_terminator_boundary_test.go:160
Error: Received unexpected error:
internal error: SQL file access policy is required
Test: TestReadFileOffsetNonStrictLineTerminators/custom_embedded_LF
For the injected-error cases, the observed chain contains the same admission error instead of the intended read failed/close failed error. Other assertion locations are lines 214, 287, 358 and 361.
The tests construct context.Background() and put it into tree.ExternParam.ExParam.Ctx. ReadFileOffset calls plan.GetForETLWithType, which reaches SQL file access admission. fileservice.admitSQLFilePath correctly rejects a context without its statement-scoped policy. These fixtures do not establish that policy, so the intended ETL operation and its assertions are never reached. The fixtures and the policy enforcement are both present in official main; PR #27716 does not modify these tests or the admission mechanism.
Expected Behavior
The test fixtures should establish the appropriate statement-scoped SQL file access identity through the supported policy API before exercising an ETL file path. Production admission must continue rejecting a missing policy. All distinct splitting and reader-ownership oracles should remain enabled.
Steps to Reproduce
On official main 47b9690 with the repository CGo dependencies installed:
.agents/skills/mo-dev/scripts/mo-cgo-test \
-short -v -tags matrixone_test -p 2 -count=1 -timeout=180s \
-covermode=set -coverprofile="$TMPDIR/external-policy.cover" \
-run '^TestReadFileOffset(NonStrictLineTerminators|NonStrictOverlappingBoundary|ConflictingFieldTerminator|ProbeOwnership)$' \
./pkg/sql/colexec/externalThe paired local experiment executed this exact selection at the PR head and at exact official-main source inputs. Both exited 1 with all 28 child cases failing with the identical missing-policy signature (PR 3.926s; main 0.950s).
To preserve the managed PR worktree and comply with its prohibition on creating/checking out another worktree, the main control used a complete Go build overlay: all 79 differing tracked paths between the two revisions were mapped to their exact main blobs, including additions and deletions. All 3,581 selected repository compiler/embed inputs across 263 packages were independently checked against main Git blob hashes. Go module files and the native-library source trees are identical. The selected tests use literal CSV content and test-created temporary files; no differing tracked runtime fixture is read. The PR worktree stayed clean throughout. This is an exact-main source control on Darwin, not a claim to have reproduced the entire Linux CI environment.
CI coverage command uses go test -mod=readonly -count=1 -json -short -v -tags matrixone_test -timeout 20m -p <bounded parallelism> -covermode=set -coverprofile=... -coverpkg=<selected packages> <scope>. The ordinary UT producer uses the race-enabled CGo harness. The local focused coverage run proves this deterministic admission failure without claiming full-repository coverage or race success.
Additional information
All four failed jobs' complete logs were inspected:
| Check | Job | Failure |
|---|---|---|
| Matrixone CI execution / UT Test on Ubuntu/x86 | 117081718788 | UNIT TESTING FAILED: go-test=1, analysis=0; shell exit 2; the same four ReadFileOffset groups |
| Matrixone UT Coverage execution / UT Coverage on Ubuntu/x86 | 117081783002 | Run coverage unit tests / Fail on coverage UT failure; test exit 1; same four groups |
| Matrixone Coverage execution / Coverage | 117103756675 | coverage merge blocked: a required producer did not publish a complete coverage profile; no coverage verdict was calculated |
| CI Required | 117109277423 | Error: matrixone-ci: failure, downstream required-job aggregation |
Readable coverage incident artifact: ut-coverage-report-attempt-1. It records all 33 failure events including the package event. This is a deterministic main test-contract integration defect, not a flaky classification or a coverage percentage failure.
After this issue is verified, one gh run rerun 38933060718 --failed will be requested under the automated CI intake authorization. A rerun is not expected to repair the fixture defect; no assertion, policy check, unrelated production code, or PR review state is being changed to mask it.
Activity
iamlinjunhong commentedon Oct 16, 2026
Attempt 2 of run 38933060718 has completed and reproduced the same deterministic failure at PR #27716 head
16fa9d92f1dfc4895d1b6147e2626632581d8e2b.Complete failed-job logs were read with
gh run view 38933060718 --log-failed(8,800 lines). Both producers report only these four failing test groups inpkg/sql/colexec/external/line_terminator_boundary_test.go:TestReadFileOffsetNonStrictLineTerminators,TestReadFileOffsetNonStrictOverlappingBoundary,TestReadFileOffsetConflictingFieldTerminator, andTestReadFileOffsetProbeOwnership(28 failing children and four parents). The stable signature remainsinternal error: SQL file access policy is required, including the injected-error cases receiving that error instead of their intended read/close error.UNIT TESTING FAILED: go-test=1, analysis=0, shell exit 2.coverage merge blocked: a required producer did not publish a complete coverage profile; no coverage verdict was calculated.Error: matrixone-ci: failure.Official main is still
47b9690d7caec56b589fdefaf0684177412cffb2. The previously recorded exact-main control therefore remains valid: all 3,581 selected compiler inputs in 263 repository packages matched main Git blobs, and the same 28 child cases failed with the same admission error on both PR and main source inputs. The policy implementation and these test fixtures are outside PR #27716's changes. This is not reclassified as flaky merely because another attempt was run.The one authorized failed-jobs rerun for this run has been consumed. No further rerun is requested. The remaining repair is to establish the supported statement-scoped SQL file access policy in the four test fixtures while preserving production admission and all splitting/reader-ownership assertions. This upstream fixture repair should be handled under this issue rather than adding unrelated changes to the VIEWS PR.
iamlinjunhong commentedon Oct 16, 2026
Additional exact-head occurrence: PR #30184, head
76f07bf691f4f921f567e88092e23e528ef0bf6a, run 38937537614, attempt 1.All four failed-job logs were retrieved with
gh run view 38937537614 --log-failed(9,207 lines) and their failing steps inspected. Both UT producers report the same four parent groups and 28 children already covered by this issue:TestReadFileOffsetNonStrictLineTerminators(9 children)TestReadFileOffsetNonStrictOverlappingBoundary(4 children)TestReadFileOffsetConflictingFieldTerminator(8 children)TestReadFileOffsetProbeOwnership(7 children)The normalized error remains:
The injected read/close-error cases also receive this admission error before reaching their intended oracle. No additional failing package, timeout, data race, compiler/type error or static-analysis failure appears in these failed-job logs.
UNIT TESTING FAILED: go-test=1, analysis=0, shell exit 2coverage merge blocked: a required producer did not publish a complete coverage profile; no coverage verdict was calculatedError: matrixone-ci: failureThe UT invocation is
make ut UT_CONFIGURED=1 UT_PARALLEL=8 UT_TIMEOUT=40 UT_SHARD=all, using the CGo/race/matrixone_testharness. Coverage invokesgo test -mod=readonly -count=1 -json -short -v -tags matrixone_test -timeout=20m -p 8 -covermode=set -coverprofile=... -coverpkg=... <scope>.Attribution under the known-open-defect evidence path:
context.Background()reachesReadFileOffset -> plan.GetForETLWithType -> fileservice.GetForETL -> admitSQLFilePathwithout a statement-scoped SQL policy. Production admission is correct; the fixtures omit required authority.16fa9d92f1dfc4895d1b6147e2626632581d8e2b, run 38933060718 attempt 2, UT job 117111435336. GitHub GET verifies that head, failed Unit Testing step andamd64-mo-shanghai-8c16grunner label. Its same four-group/missing-policy failure and exact official-main control are already recorded above.47b9690d7caec56b589fdefaf0684177412cffb2; PR test(sql): lock normalized signed-zero set operations #30184 contains it. The complete 35-file PR diff does not alter the external loader tests/implementation, fileservice policy/admission or CI harness. The failing test file, external implementation and fileservice sources are byte-identical to main. Althoughplan/utils.gohas unrelated set-operation changes, bothetlPathWithTypeandGetForETLWithTypeare byte-identical to main. The failure occurs in admission before expression execution; the PR's set-key executor/registry and scalar fallback do not participate in that call path.Reproduction remains the focused
mo-cgo-testcommand in this issue's Steps to Reproduce at official main; no new local baseline execution or flaky classification is claimed in this event. The earlier exact-main control and independent Linux occurrence satisfy the approved open-defect comparison path. The PR worktree remains clean and no unrelated fixture, production policy or assertion was modified.After this evidence is posted and verified, one
gh run rerun 38937537614 --failedwill be requested. This is the first failed-jobs rerun for this run. It is a CI recheck, not a claim that rerunning repairs this deterministic upstream fixture defect.iamlinjunhong commentedon Oct 16, 2026
Additional occurrence on PR #30297, exact head
728780bacfad85ddf1db69f36879af62d7ebab5d: run 38940003540, attempt 1.The complete failed-job logs were read with
gh run view 38940003540 --log-failed(9,353 lines). Both UT producers report only the same four parent groups and 28 children covered by this issue:TestReadFileOffsetNonStrictLineTerminators(9),TestReadFileOffsetNonStrictOverlappingBoundary(4),TestReadFileOffsetConflictingFieldTerminator(8), andTestReadFileOffsetProbeOwnership(7).Injected read/close-error cases receive the same admission error instead of their intended error. No additional failed package, data race, timeout, compile/type error or static-analysis failure appears in these failed-job logs.
matrixone-ci: failureUT runs
make ut UT_CONFIGURED=1 UT_PARALLEL=8 UT_TIMEOUT=40 UT_SHARD=allwith CGo, race andmatrixone_test. Coverage usesgo test -mod=readonly -count=1 -json -short -v -tags matrixone_test -timeout=20m -p 8 -covermode=set -coverprofile=... -coverpkg=... <scope>. CI is Linux/amd64, Go 1.27.1.Attribution under the known-open-defect evidence path:
context.Background():ReadFileOffset -> plan.GetForETLWithType -> fileservice.GetForETL -> getForETLWithParsedPath -> admitSQLFilePath. Admission fails before the delimiter and reader-ownership oracles. Production policy enforcement remains valid.16fa9d92f1dfc4895d1b6147e2626632581d8e2b, runner labelamd64-mo-shanghai-8c16g. Read its complete 6,198-line job log; it contains only the same four failing groups and missing-policy signature. This issue's existing exact-main control at47b9690d7caec56b589fdefaf0684177412cffb2remains applicable; no new local main run is claimed.47b9690d7caec56b589fdefaf0684177412cffb2, already contained in PR fix(sql): report explicit cast overflow warnings #30297. The complete PR delta is 17 files (15 Go and two CAST BVT files). It does not change the external-loader tests, SQL file admission mechanism or CI harness. The failing fixture, external implementation and fileservice admission sources match main Git blobs. Although the PR changes constant folding inplan/utils.go,GetForETLWithTypeandetlPathWithTypeare byte-identical to main; the CAST changes do not participate in this admission failure.-tags matrixone_test -short -vet=all -p 2 -count=1(7.856s, 0.892s, 12.002s and 0.993s); real one-CN MySQLTestPreparedNumericTemporalContractswith-count=1(root 8.93s, package/cleanup 10.171s), covering per-row warnings, temporal ownership across DECIMAL widths, prepared reuse and neighboring contracts. Current-head Linux arm64 SCA and both enabled BVT checks also succeeded. The worktree is clean.A focused local reproduction using the repository wrapper,
-race -tags matrixone_test -short -vet=off -p 2 -count=1 -timeout=180s, and the four-root selection from this issue exited 1 with all 28 children failing with the same policy signature (package 1.103s). Local tests ran on Darwin/arm64, Go 1.27.1, with verified existing CGo libraries; this is not a claim to reproduce the entire Linux CI environment.This is the deterministic main fixture integration defect already tracked here. No unrelated test, production admission, assertion or PR review state was changed. After this evidence is posted and verified, one
gh run rerun 38940003540 --failedwill be requested, the first failed-jobs rerun for this run. A rerun is a CI recheck, not a claim that it repairs the fixture defect.iamlinjunhong commentedon Oct 16, 2026
Additional occurrence on PR #30438, exact head
ccbc51664de60f4edbe4bcf03daa39560d486a89: run 38952815249, attempt 1.All four failed jobs' complete logs were read (
gh run view 38952815249 --log-failed, 8,576 lines). Both UT producers report the same four ReadFileOffset groups and 28 children covered by this issue. The stable error isinternal error: SQL file access policy is required, including injected read/close cases failing at admission before their intended oracle. No additional failing package, race, timeout, compiler or static-check failure was found.make ut UT_CONFIGURED=1 UT_PARALLEL=8 UT_TIMEOUT=40 UT_SHARD=all; CGo/race/matrixone_test; test status 1, shell exit 2matrixone-ci: failureKnown-open-defect comparison evidence was verified:
ReadFileOffset -> plan.GetForETLWithType -> fileservice.GetForETL -> admitSQLFilePath. The handcrafted ExternParam reaches admission directly; it does not parse SQL or use the INLINE format-name grammar.16fa9d92f1dfc4895d1b6147e2626632581d8e2b. GitHub GET confirms its failed Unit Testing step andamd64-mo-shanghai-8c16grunner. The same four-group failure and exact-main source control at47b9690d7caec56b589fdefaf0684177412cffb2are already recorded in this issue.-short -tags matrixone_test -v -count=1 -timeout=180s(1.324s, all 18 TestLoadInlineFormat children passed). Exact-head Linux/x64 race CI also records TestLoadInlineFormatOverMySQLProtocol and both same-instance passes as passed (root 1.38s), and all embed package batches passed.Fresh local focused coverage reproduction at this PR head used:
It exited 1 with the same 28 failing children (package 1.267s). This local Darwin/arm64 reproduction does not claim Linux platform equivalence or a new failure on current main.
Official main has now advanced to
4e325495984c5f8a8dbf15500caa086d9e9159d1, which contains the exact four-fixture fix from #30439. The planned repair of PR #30438 is to rebase onto that merged upstream fix, preserve its original four-file patch, validate the previously failing tests, and push with the original exact-head lease. Production admission and existing assertions remain intact.Under the approved CI intake procedure, one failed-jobs rerun of run 38952815249 will be requested after this evidence is posted and verified. The old-head rerun is a recheck, not the repair or acceptance proof; the new rebased head will trigger fresh CI.