Compare commits

..

8 Commits

Author SHA1 Message Date
706f7c84f3
ci: report test coverage
All checks were successful
build / build (push) Successful in 1m56s
build / build (pull_request) Successful in 1m55s
build / trigger-build-image (push) Has been skipped
build / trigger-build-image (pull_request) Has been skipped
2026-08-02 04:42:19 -07:00
cde8a61ff0
docs: replace retired report card badge
All checks were successful
build / build (push) Successful in 1m50s
build / build (pull_request) Successful in 1m51s
build / trigger-build-image (push) Has been skipped
build / trigger-build-image (pull_request) Has been skipped
2026-08-02 04:35:06 -07:00
1d686ce87f
build: remove redundant local test target
All checks were successful
build / build (pull_request) Successful in 2m8s
build / build (push) Successful in 2m11s
build / trigger-build-image (push) Has been skipped
build / trigger-build-image (pull_request) Has been skipped
2026-08-02 04:29:41 -07:00
e5de5b2bd6
test: expand reliability regression coverage
Some checks failed
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
build / build (pull_request) Successful in 2m7s
build / trigger-build-image (pull_request) Has been skipped
2026-08-02 04:28:24 -07:00
79a64efbfd
test: cover stage and executor reliability regressions
Some checks failed
build / build (push) Successful in 1m22s
build / trigger-build-image (push) Has been skipped
build / build (pull_request) Failing after 44s
build / trigger-build-image (pull_request) Has been skipped
2026-08-02 01:51:04 -07:00
73b66e40e5
fix: derive sandbox RPC deadline from command limits
All checks were successful
build / build (push) Successful in 1m22s
build / trigger-build-image (push) Has been skipped
2026-08-02 01:05:57 -07:00
edbdbd41a8
fix: harden stage execution failures
All checks were successful
build / build (push) Successful in 1m35s
build / trigger-build-image (push) Has been skipped
2026-08-02 00:39:44 -07:00
0a5947f45e
fix: match stage groups exactly 2026-08-02 00:38:20 -07:00
3 changed files with 2 additions and 36 deletions

View File

@ -19,8 +19,8 @@ jobs:
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519.pub
chmod 600 ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub
ssh -o StrictHostKeyChecking=accept-new -T git@focs.gc.sjtu.edu.cn -p 2222
- name: Lint
run: make lint
# - name: Lint
# run: make lint
- name: Build
run: make build
- name: Version

View File

@ -1,10 +1,8 @@
package conf
import (
"bytes"
"crypto/sha256"
"encoding/hex"
"log/slog"
"os"
"path/filepath"
"reflect"
@ -12,26 +10,6 @@ import (
"testing"
)
func TestConfLogValueRedactsSandboxToken(t *testing.T) {
var output bytes.Buffer
logger := slog.New(slog.NewJSONHandler(&output, nil))
conf := &Conf{
Name: "test",
SandboxToken: "top-secret-token",
}
logger.Info("config", "conf", conf)
got := output.String()
if strings.Contains(got, "top-secret-token") {
t.Fatalf("configuration log exposed sandbox token: %s", got)
}
if !strings.Contains(got, "[REDACTED]") || !strings.Contains(got, `"Name":"test"`) {
t.Fatalf("configuration log lost expected diagnostic fields: %s", got)
}
if conf.SandboxToken != "top-secret-token" {
t.Fatalf("logging mutated the runtime configuration: %q", conf.SandboxToken)
}
}
func TestGetSHA256(t *testing.T) {
path := filepath.Join(t.TempDir(), "input")
content := []byte("joj3")

View File

@ -1,8 +1,6 @@
package conf
import (
"log/slog"
"github.com/joint-online-judge/JOJ3/internal/stage"
)
@ -34,16 +32,6 @@ type Conf struct {
PostStages []ConfStage
}
// LogValue preserves the configuration's diagnostic value without writing the
// sandbox credential to text or structured logs.
func (c Conf) LogValue() slog.Value {
type logConf Conf
if c.SandboxToken != "" {
c.SandboxToken = "[REDACTED]"
}
return slog.AnyValue(logConf(c))
}
type OptionalCmd struct {
Args *[]string
Env *[]string